|
|
@ -44,6 +44,7 @@ import org.thingsboard.server.dao.service.PaginatedRemover; |
|
|
import org.thingsboard.server.dao.service.Validator; |
|
|
import org.thingsboard.server.dao.service.Validator; |
|
|
import org.thingsboard.server.dao.service.validator.TenantDataValidator; |
|
|
import org.thingsboard.server.dao.service.validator.TenantDataValidator; |
|
|
import org.thingsboard.server.dao.settings.AdminSettingsService; |
|
|
import org.thingsboard.server.dao.settings.AdminSettingsService; |
|
|
|
|
|
import org.thingsboard.server.dao.trendz.TrendzSettingsService; |
|
|
import org.thingsboard.server.dao.usagerecord.ApiUsageStateService; |
|
|
import org.thingsboard.server.dao.usagerecord.ApiUsageStateService; |
|
|
import org.thingsboard.server.dao.user.UserService; |
|
|
import org.thingsboard.server.dao.user.UserService; |
|
|
|
|
|
|
|
|
@ -81,6 +82,8 @@ public class TenantServiceImpl extends AbstractCachedEntityService<TenantId, Ten |
|
|
@Autowired |
|
|
@Autowired |
|
|
private QrCodeSettingService qrCodeSettingService; |
|
|
private QrCodeSettingService qrCodeSettingService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
|
|
|
private TrendzSettingsService trendzSettingsService; |
|
|
|
|
|
@Autowired |
|
|
private TenantDataValidator tenantValidator; |
|
|
private TenantDataValidator tenantValidator; |
|
|
@Autowired |
|
|
@Autowired |
|
|
protected TbTransactionalCache<TenantId, Boolean> existsTenantCache; |
|
|
protected TbTransactionalCache<TenantId, Boolean> existsTenantCache; |
|
|
@ -166,6 +169,7 @@ public class TenantServiceImpl extends AbstractCachedEntityService<TenantId, Ten |
|
|
adminSettingsService.deleteAdminSettingsByTenantId(tenantId); |
|
|
adminSettingsService.deleteAdminSettingsByTenantId(tenantId); |
|
|
qrCodeSettingService.deleteByTenantId(tenantId); |
|
|
qrCodeSettingService.deleteByTenantId(tenantId); |
|
|
notificationSettingsService.deleteNotificationSettings(tenantId); |
|
|
notificationSettingsService.deleteNotificationSettings(tenantId); |
|
|
|
|
|
trendzSettingsService.deleteTrendzSettings(tenantId); |
|
|
|
|
|
|
|
|
tenantDao.removeById(tenantId, tenantId.getId()); |
|
|
tenantDao.removeById(tenantId, tenantId.getId()); |
|
|
publishEvictEvent(new TenantEvictEvent(tenantId, true)); |
|
|
publishEvictEvent(new TenantEvictEvent(tenantId, true)); |
|
|
|