韩帛霖 1 год назад
Родитель
Сommit
d18d727f39

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/CommonController.java

@@ -60,7 +60,7 @@ public class CommonController extends BaseController {
     @GetMapping("/getTableList")
     public TableDataInfo queryTableList(CommonEntity commonEntity) {
         TableSql tableSql = iTableSqlService.selectTableSqlByTSqlKey(commonEntity.getFormMap().get("SQLKEY").toString());
-        startPage();
+        startPage();  // 校验是否sqlserver 否执行 是执行另一种方式的分页
         return getDataTable(commonService.queryTableList(commonEntity, tableSql));
     }
 

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommonServiceImpl.java

@@ -74,6 +74,7 @@ public class CommonServiceImpl implements ICommonService {
         List<String> test = Arrays.asList(whereTerm);
         // 拼接条件
         conditions.forEach((key, val) -> {
+            // 把前端回传的查询参数值名称驼峰转下划线命名,进行筛选是否存在匹配项
             String sqlWhere = test.stream().filter(item -> item.contains(toUnderScoreCase(key))).findAny().get();
             if (sqlWhere.indexOf("#{timeframe}") != -1) {  // 时间范围查询拼接
                 endSQL.append(" AND " + sqlWhere.replace("#{timeframe}", "'" + val.toString().split(",")[0] + "'" + " and " + "'" + val.toString().split(",")[1] + "'"));