| 
					
				 | 
			
			
				@ -35,6 +35,7 @@ import org.springframework.util.CollectionUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.util.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.io.IOException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.sql.PreparedStatement; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.logging.Logger; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -765,14 +766,18 @@ public class UserService extends BaseJpaService<UserDO, UserDao> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t\tbase_role ROLE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tWHERE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t\tusr .saas_id = saas. ID\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tAND usr .role_id = ROLE . ID\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tAND (usr . NAME LIKE '%%' OR '' = '%%')\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tAND (saas. ID = '' OR '' = '')\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tAND (usr .role_id = '' OR '' = '')\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tORDER BY\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t\tusr .create_time DESC"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tAND usr .role_id = ROLE . ID\n" ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!realName.equals(null) && !realName.equals("")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    finalSql = finalSql + " and usr . NAME LIKE '%"+realName+"%'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!saasidValue.equals(null) && !saasidValue.equals("")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    finalSql = finalSql + " and saas. id = '"+saasidValue+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!roleIdValue.equals(null) && !roleIdValue.equals("")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    finalSql = finalSql + " and usr .role_id = '"+roleIdValue+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                finalSql = finalSql + " ORDER BY usr .create_time DESC"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Logger.getAnonymousLogger().info("finalSql="+finalSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = finalSql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                .replace("{realName}","%" + realName + "%") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                .replace("{saasid}",saasidValue) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -823,10 +828,17 @@ public class UserService extends BaseJpaService<UserDO, UserDao> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "WHERE " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  usr.saas_id = saas.id " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  AND " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  usr.role_id = role.id " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " and (usr.name like '{realName}' or '' ='{realName}') " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  and (saas.id = '{saasid}' or '' = '{saasid}') " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  and ( usr.role_id = '{roleId}' or '' = '{roleId}') "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "  usr.role_id = role.id " ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!realName.equals(null) && !realName.equals("")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    countSql = countSql + " and usr . NAME LIKE '%"+realName+"%'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!saasidValue.equals(null) && !saasidValue.equals("")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    countSql = countSql + " and saas. id = '"+saasidValue+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(!roleIdValue.equals(null) && !roleIdValue.equals("")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    countSql = countSql + " and usr .role_id = '"+roleIdValue+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Logger.getAnonymousLogger().info("countSql="+countSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String finalCountSql = countSql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                .replace("{realName}", "%" + realName + "%") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                .replace("{saasid}",  saasidValue ) 
			 |