瀏覽代碼

StandardlyMapper 日志

shiqian 4 年之前
父節點
當前提交
e595f42b7c

+ 1 - 1
boman-api/boman-domain/src/main/java/com.boman.domain/GenTableColumn.java

@@ -126,7 +126,7 @@ public class GenTableColumn extends BaseEntity
     private String fieldTranslator;
 
     /**
-     * 扩展属性
+     * 扩展属性 eg:{"col":["start_time","end_time"],"comp":"end_time-start_time"}
      */
     private String extendedAttributes;
 

+ 8 - 10
boman-web-core/src/main/java/com/boman/web/core/mapper/StandardlyMapper.java

@@ -258,7 +258,7 @@ public interface StandardlyMapper {
 
                 sql.WHERE(pkName + " in (" + inSql.toString());
                 String wholeSql = StringUtils.substringBeforeLast(sql.toString(), ",") + "))";
-                LOGGER.info("更改的sql语句为: {}", wholeSql);
+                LOGGER.info("更改的sql语句为: {}, \r\n 更改的数据为: {}", wholeSql, model);
                 return wholeSql;
             } else {
                 throw new IllegalArgumentException("model 无效");
@@ -336,7 +336,7 @@ public interface StandardlyMapper {
                 }
 
                 String sqlStr = sql.toString();
-                LOGGER.info("新增的sql语句为: {}", sqlStr);
+                LOGGER.info("新增的sql语句为: {}, \r\n 新增的数据为: {}", sqlStr, model);
                 return sqlStr;
             }
         }
@@ -366,7 +366,7 @@ public interface StandardlyMapper {
 
             wholeSql.setCharAt(wholeSql.length() - 1, ')');
             String sqlStr = wholeSql.toString();
-            LOGGER.info("批量更新的sql语句为: {}", sqlStr);
+            LOGGER.info("批量更新的sql语句为: {}, \r\n 更改的数据为: {}, \r\n idList: {}", sqlStr, models, idList);
             return sqlStr;
 
         }
@@ -397,7 +397,7 @@ public interface StandardlyMapper {
 
                 sql.setCharAt(sql.length() - 1, ')');
                 String sqlStr = sql.toString();
-                LOGGER.info("删除的sql语句为: {}", sqlStr);
+                LOGGER.info("删除的sql语句为: {}, \r\n idList: {}", sqlStr, ids);
                 return sqlStr;
             }
         }
@@ -516,7 +516,6 @@ public interface StandardlyMapper {
 
         public String selectByCondition(Map<String, Object> para) {
             JSONObject condition = (JSONObject) para.get("condition");
-            LOGGER.info("前台传过来的查询条件: {}", condition.toJSONString());
             JSONObject packCondition = (JSONObject) para.get("packCondition");
             String tableName = (String) para.get("tableName");
             String orderBy = (String) para.get("orderBy");
@@ -545,7 +544,7 @@ public interface StandardlyMapper {
             }
 
             String result = wholeSql.toString();
-            LOGGER.info("查询拼出的sql语句为:{}", result);
+            LOGGER.info("查询拼出的sql语句为:{}, \r\n selectByCondition 查询条件: {}", result, packCondition);
             return result;
         }
 
@@ -567,7 +566,7 @@ public interface StandardlyMapper {
             }
 
             result = limitOne ? result + " limit 1" : result;
-            LOGGER.info("查询拼出的sql语句为:{}", result);
+            LOGGER.info("查询拼出的sql语句为:{}, \r\n getByMap 查询条件: {}", result, condition);
             return result;
         }
 
@@ -599,13 +598,12 @@ public interface StandardlyMapper {
 
             wholeSql.setCharAt(wholeSql.length() - 1, ')');
             String sqlStr = wholeSql.toString();
-            LOGGER.info("批量查找的sql语句为: {}", sqlStr);
+            LOGGER.info("查询拼出的sql语句为:{}, \r\n selectByIdList idList: {}", sqlStr, idList);
             return sqlStr;
         }
 
         public String countByCondition(Map<String, Object> para) {
             JSONObject condition = (JSONObject) para.get("condition");
-            LOGGER.info("前台传过来的查询条件: {}", condition.toJSONString());
             JSONObject packCondition = (JSONObject) para.get("packCondition");
             String tableName = (String) para.get("tableName");
 
@@ -616,7 +614,7 @@ public interface StandardlyMapper {
             packCondition(packCondition, wholeSql);
 
             String result = wholeSql.toString();
-            LOGGER.info("查询count拼出的sql语句为:{}", result);
+            LOGGER.info("查询count拼出的sql语句为:{}, \r\n countByCondition 查询条件: {}", result, packCondition);
             return result;
         }