minor refactoring
This commit is contained in:
		
							parent
							
								
									3eb7efe0ad
								
							
						
					
					
						commit
						6f833a3b18
					
				@ -42,7 +42,7 @@ public class DefaultTbDomainService extends AbstractTbEntityService implements T
 | 
			
		||||
        TenantId tenantId = domain.getTenantId();
 | 
			
		||||
        try {
 | 
			
		||||
            Domain savedDomain = checkNotNull(domainService.saveDomain(tenantId, domain));
 | 
			
		||||
            if (!CollectionUtils.isEmpty(oAuth2Clients)) {
 | 
			
		||||
            if (CollectionUtils.isNotEmpty(oAuth2Clients)) {
 | 
			
		||||
                domainService.updateOauth2Clients(domain.getTenantId(), savedDomain.getId(), oAuth2Clients);
 | 
			
		||||
            }
 | 
			
		||||
            logEntityActionService.logEntityAction(tenantId, savedDomain.getId(), savedDomain, actionType, user, oAuth2Clients);
 | 
			
		||||
 | 
			
		||||
@ -42,7 +42,7 @@ public class DefaultTbMobileAppService extends AbstractTbEntityService implement
 | 
			
		||||
        TenantId tenantId = mobileApp.getTenantId();
 | 
			
		||||
        try {
 | 
			
		||||
            MobileApp savedMobileApp = checkNotNull(mobileAppService.saveMobileApp(tenantId, mobileApp));
 | 
			
		||||
            if (!CollectionUtils.isEmpty(oauth2Clients)) {
 | 
			
		||||
            if (CollectionUtils.isNotEmpty(oauth2Clients)) {
 | 
			
		||||
                mobileAppService.updateOauth2Clients(tenantId, savedMobileApp.getId(), oauth2Clients);
 | 
			
		||||
            }
 | 
			
		||||
            logEntityActionService.logEntityAction(tenantId, savedMobileApp.getId(), savedMobileApp, actionType, user);
 | 
			
		||||
 | 
			
		||||
@ -32,7 +32,7 @@ public interface OAuth2ClientDao extends Dao<OAuth2Client> {
 | 
			
		||||
 | 
			
		||||
    List<OAuth2Client> findEnabledByDomainName(String domainName);
 | 
			
		||||
 | 
			
		||||
    List<OAuth2Client> findEnabledByPckNameAndPlatformType(String pkgName, PlatformType platformType);
 | 
			
		||||
    List<OAuth2Client> findEnabledByPkgNameAndPlatformType(String pkgName, PlatformType platformType);
 | 
			
		||||
 | 
			
		||||
    List<OAuth2Client> findByDomainId(UUID domainId);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -61,7 +61,7 @@ public class OAuth2ClientServiceImpl extends AbstractEntityService implements OA
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<OAuth2ClientLoginInfo> findOAuth2ClientLoginInfosByMobilePkgNameAndPlatformType(String pkgName, PlatformType platformType) {
 | 
			
		||||
        log.trace("Executing findOAuth2ClientLoginInfosByMobilePkgNameAndPlatformType pkgName=[{}] platformType=[{}]",pkgName, platformType);
 | 
			
		||||
        return oauth2ClientDao.findEnabledByPckNameAndPlatformType(pkgName, platformType)
 | 
			
		||||
        return oauth2ClientDao.findEnabledByPkgNameAndPlatformType(pkgName, platformType)
 | 
			
		||||
                .stream()
 | 
			
		||||
                .map(OAuth2Utils::toClientLoginInfo)
 | 
			
		||||
                .collect(Collectors.toList());
 | 
			
		||||
 | 
			
		||||
@ -64,7 +64,7 @@ public class JpaOAuth2ClientDao extends JpaAbstractDao<OAuth2ClientEntity, OAuth
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<OAuth2Client> findEnabledByPckNameAndPlatformType(String pkgName, PlatformType platformType) {
 | 
			
		||||
    public List<OAuth2Client> findEnabledByPkgNameAndPlatformType(String pkgName, PlatformType platformType) {
 | 
			
		||||
        return DaoUtil.convertDataList(repository.findEnabledByPkgNameAndPlatformType(pkgName,
 | 
			
		||||
                platformType != null ? platformType.name() : null));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user