Commit 91d9e624 by 陶光胜

取数平台调整

parent 9ea3b354
...@@ -161,22 +161,29 @@ public class FreeQueryController { ...@@ -161,22 +161,29 @@ public class FreeQueryController {
Integer dataPermission = this.enterpriseService.getEnterpriseSettingByEnterpriseId(SessionContextUtils.getLoginUserEnterpriseId()).getDataPermission(); Integer dataPermission = this.enterpriseService.getEnterpriseSettingByEnterpriseId(SessionContextUtils.getLoginUserEnterpriseId()).getDataPermission();
System.out.println("!!!!!!!!:"+dataPermission); System.out.println("!!!!!!!!:"+dataPermission);
String curLimit = "1000"; String curLimit = "1000";
if(sql.indexOf("limit")>0 || sql.indexOf("LIMIT")>0){ if(sql.indexOf("extract_member_information") > 0){
int start = 0; sql = "SELECT tmpTable.* FROM (" + sql + ") AS tmpTable LIMIT 1000";
if(sql.indexOf("limit")>0){ } else {
start = sql.indexOf("limit") + 6; if(sql.indexOf("limit")>0 || sql.indexOf("LIMIT")>0){
} else { int start = 0;
start = sql.indexOf("LIMIT") + 6; if(sql.indexOf("limit")>0){
} start = sql.indexOf("limit") + 6;
curLimit = sql.substring(start); } else {
if(curLimit.indexOf(",") > 0){ start = sql.indexOf("LIMIT") + 6;
curLimit = curLimit.substring(curLimit.indexOf(",")+1); }
} curLimit = sql.substring(start);
if(Integer.valueOf(curLimit) > 1000){ if(curLimit.indexOf(",") > 0){
curLimit = 1000+""; curLimit = curLimit.substring(curLimit.indexOf(",")+1);
}
if(Integer.valueOf(curLimit) > 1000){
curLimit = 1000+"";
}
} }
sql = sql + " limit " + curLimit;
} }
FreeQueryResult freeQueryResult = this.freeQueryService.getFreeQueryResult(sql + " limit " + curLimit, enterpriseId, queryDataType, dataPermission);
FreeQueryResult freeQueryResult = this.freeQueryService.getFreeQueryResult(sql, enterpriseId, queryDataType, dataPermission);
dto.setEndTime(new Date()); dto.setEndTime(new Date());
this.searchLogService.saveLog(dto); this.searchLogService.saveLog(dto);
return freeQueryResult; return freeQueryResult;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment