Add logic to handle update process tenant on TbTenantService
This commit is contained in:
		
							parent
							
								
									eda943dcfb
								
							
						
					
					
						commit
						964fb16f71
					
				@ -52,7 +52,7 @@ public class DefaultTbTenantService extends AbstractTbEntityService implements T
 | 
			
		||||
        boolean created = tenant.getId() == null;
 | 
			
		||||
        Tenant oldTenant = !created ? tenantService.findTenantById(tenant.getId()) : null;
 | 
			
		||||
 | 
			
		||||
        Tenant savedTenant = checkNotNull(tenantService.saveTenant(tenant, false));
 | 
			
		||||
        Tenant savedTenant = checkNotNull(tenantService.saveTenant(tenant, !created));
 | 
			
		||||
        if (created) {
 | 
			
		||||
            installScripts.createDefaultRuleChains(savedTenant.getId());
 | 
			
		||||
            installScripts.createDefaultEdgeRuleChains(savedTenant.getId());
 | 
			
		||||
 | 
			
		||||
@ -49,10 +49,10 @@ public interface DeviceService extends EntityDaoService {
 | 
			
		||||
 | 
			
		||||
    Device findDeviceByTenantIdAndName(TenantId tenantId, String name);
 | 
			
		||||
 | 
			
		||||
    Device saveDevice(Device device, boolean doValidate);
 | 
			
		||||
 | 
			
		||||
    Device saveDevice(Device device);
 | 
			
		||||
 | 
			
		||||
    Device saveDevice(Device device, boolean doValidate);
 | 
			
		||||
 | 
			
		||||
    Device saveDeviceWithAccessToken(Device device, String accessToken);
 | 
			
		||||
 | 
			
		||||
    Device saveDeviceWithCredentials(Device device, DeviceCredentials deviceCredentials);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user