|  | @@ -48,13 +48,25 @@ public class DataDashboard extends Controller {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @API(title = "账号列表", apiversion = R.ID2024061110312202.v1.class)
 | 
	
		
			
				|  |  |      public String accountList() throws YosException {
 | 
	
		
			
				|  |  | +        StringBuffer where = new StringBuffer(" 1=1 ");
 | 
	
		
			
				|  |  | +        if (content.containsKey("where")) {
 | 
	
		
			
				|  |  | +            JSONObject whereObject = content.getJSONObject("where");
 | 
	
		
			
				|  |  | +            if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
 | 
	
		
			
				|  |  | +                where.append(" and (");
 | 
	
		
			
				|  |  | +                where.append("t1.accountno like'%").append(whereObject.getString("condition")).append("%' ");
 | 
	
		
			
				|  |  | +                where.append("or t1.name like'%").append(whereObject.getString("condition")).append("%' ");
 | 
	
		
			
				|  |  | +                where.append("or t1.phonenumber like'%").append(whereObject.getString("condition")).append("%' ");
 | 
	
		
			
				|  |  | +                where.append(")");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          int usertype = content.getIntValue("usertype");
 | 
	
		
			
				|  |  |          int type = content.getIntValue("type");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_users",
 | 
	
		
			
				|  |  |                  "accountno", "name", "phonenumber", "userid").setTableAlias("t");
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        querySQL.setWhere(where);
 | 
	
		
			
				|  |  |          if (type == 1) {
 | 
	
		
			
				|  |  |              querySQL.setWhere("t.userid in (" + DataDashboardHelper.getUsedSql(this, usertype) + ")");
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -67,6 +79,7 @@ public class DataDashboard extends Controller {
 | 
	
		
			
				|  |  |          querySQL.setPage(pageSize, pageNumber).setOrderBy(pageSorting);
 | 
	
		
			
				|  |  |          Rows rows = querySQL.query();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          for (Row row : rows) {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              row.put("usertype", usertype);
 | 
	
	
		
			
				|  | @@ -142,7 +155,12 @@ public class DataDashboard extends Controller {
 | 
	
		
			
				|  |  |          t2.addQueryFields("lastrequestdate", "max(lastrequestdate)");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_usersite", "userid").setTableAlias("t1");
 | 
	
		
			
				|  |  | -        querySQL.addJoinTable(JOINTYPE.left, t2, "t2", "t2.usersiteid=t1.usersiteid and t2.userid=t1.userid and t2.siteid=t1.siteid", "lastrequestdate");
 | 
	
		
			
				|  |  | +        if (type == 0) {
 | 
	
		
			
				|  |  | +            querySQL.addJoinTable(JOINTYPE.left, t2, "t2", "t2.usersiteid=t1.usersiteid and t2.userid=t1.userid and t2.siteid=t1.siteid", "lastrequestdate");
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +            querySQL.addJoinTable(JOINTYPE.inner, t2, "t2", "t2.usersiteid=t1.usersiteid and t2.userid=t1.userid and t2.siteid=t1.siteid", "lastrequestdate");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          querySQL.addJoinTable(JOINTYPE.inner, "sys_users", "t3", "t3.userid=t1.userid", "name");
 | 
	
		
			
				|  |  |          querySQL.setSiteid(siteid);
 | 
	
		
			
				|  |  |          querySQL.setWhere("usertype", usertype);
 |