Browse Source

Fix: Delete tenant assets

pull/204/head
Igor Kulikov 9 years ago
parent
commit
6d1404230c
  1. 5
      dao/src/main/java/org/thingsboard/server/dao/tenant/TenantServiceImpl.java

5
dao/src/main/java/org/thingsboard/server/dao/tenant/TenantServiceImpl.java

@ -24,6 +24,7 @@ import org.thingsboard.server.common.data.Tenant;
import org.thingsboard.server.common.data.id.TenantId;
import org.thingsboard.server.common.data.page.TextPageData;
import org.thingsboard.server.common.data.page.TextPageLink;
import org.thingsboard.server.dao.asset.AssetService;
import org.thingsboard.server.dao.customer.CustomerService;
import org.thingsboard.server.dao.dashboard.DashboardService;
import org.thingsboard.server.dao.device.DeviceService;
@ -56,6 +57,9 @@ public class TenantServiceImpl extends AbstractEntityService implements TenantSe
@Autowired
private CustomerService customerService;
@Autowired
private AssetService assetService;
@Autowired
private DeviceService deviceService;
@ -100,6 +104,7 @@ public class TenantServiceImpl extends AbstractEntityService implements TenantSe
customerService.deleteCustomersByTenantId(tenantId);
widgetsBundleService.deleteWidgetsBundlesByTenantId(tenantId);
dashboardService.deleteDashboardsByTenantId(tenantId);
assetService.deleteAssetsByTenantId(tenantId);
deviceService.deleteDevicesByTenantId(tenantId);
userService.deleteTenantAdmins(tenantId);
ruleService.deleteRulesByTenantId(tenantId);

Loading…
Cancel
Save