Commit 7404f8086cc67317f02ae272814af7e871130923

Authored by chenjunyu_1481036421
1 parent 3dafaa64

fix:修改租户名称时,不新建默认设备(修改引入问题)

... ... @@ -289,11 +289,11 @@ public class TkAdminController extends BaseController {
289 289 if (isCreate) {
290 290 installScripts.createDefaultRuleChains(tbTenant.getId());
291 291 installScripts.createDefaultEdgeRuleChains(tbTenant.getId());
  292 + //Thingskit function
  293 + RuleChain ruleChain =ruleChainService.getRootTenantRuleChain(tbTenant.getId());
  294 + deviceProfileService.createDeviceProfile(tbTenant.getId(),"默认MQTT网关设备", DeviceTypeEnum.GATEWAY,ruleChain.getId());
  295 + deviceProfileService.createDeviceProfile(tbTenant.getId(),"默认MQTT直连设备", DeviceTypeEnum.DIRECT_CONNECTION,ruleChain.getId());
292 296 }
293   - //Thingskit function
294   - RuleChain ruleChain =ruleChainService.getRootTenantRuleChain(tbTenant.getId());
295   - deviceProfileService.createDeviceProfile(tbTenant.getId(),"默认MQTT网关设备", DeviceTypeEnum.GATEWAY,ruleChain.getId());
296   - deviceProfileService.createDeviceProfile(tbTenant.getId(),"默认MQTT直连设备", DeviceTypeEnum.DIRECT_CONNECTION,ruleChain.getId());
297 297
298 298 tenantProfileCache.evict(tbTenant.getId());
299 299 tbClusterService.onTenantChange(tbTenant, null);
... ...