|
@@ -73,14 +73,14 @@ public interface StandardMapper {
|
|
/**
|
|
/**
|
|
* 功能描述: 通用修改 {@link SqlProvider#update(java.util.Map)}
|
|
* 功能描述: 通用修改 {@link SqlProvider#update(java.util.Map)}
|
|
*
|
|
*
|
|
- * @param tableName tableName
|
|
|
|
- * @param packCommitData packCommitData
|
|
|
|
- * @param packColCondition packColCondition
|
|
|
|
|
|
+ * @param tableName tableName
|
|
|
|
+ * @param packCommitData packCommitData
|
|
|
|
+ * @param condition condition
|
|
* @return int
|
|
* @return int
|
|
*/
|
|
*/
|
|
@UpdateProvider(type = SqlProvider.class, method = "update")
|
|
@UpdateProvider(type = SqlProvider.class, method = "update")
|
|
int update(@Param("tableName") String tableName, @Param("packCommitData") JSONObject packCommitData
|
|
int update(@Param("tableName") String tableName, @Param("packCommitData") JSONObject packCommitData
|
|
- , @Param("packColCondition") JSONObject packColCondition);
|
|
|
|
|
|
+ , @Param("packColCondition") JSONObject packColCondition, @Param("condition") JSONObject condition);
|
|
|
|
|
|
|
|
|
|
/* ***************************************************** select ******************************************************/
|
|
/* ***************************************************** select ******************************************************/
|
|
@@ -120,16 +120,17 @@ public interface StandardMapper {
|
|
* 功能描述: 自定义查询,需要查询的字段和value都在condition中
|
|
* 功能描述: 自定义查询,需要查询的字段和value都在condition中
|
|
* {@link SqlProvider#selectByCondition(Map)}
|
|
* {@link SqlProvider#selectByCondition(Map)}
|
|
*
|
|
*
|
|
- * @param tableName tableName
|
|
|
|
- * @param packCondition 封装好的查询条件
|
|
|
|
- * @param showData 需要查询的列
|
|
|
|
- * @param orderBy orderBy
|
|
|
|
- * @param limit 分页
|
|
|
|
- * @param offset 分页, 可以为null
|
|
|
|
|
|
+ * @param tableName tableName
|
|
|
|
+ * @param condition 封装好的查询条件
|
|
|
|
+ * @param showData 需要查询的列
|
|
|
|
+ * @param orderBy orderBy
|
|
|
|
+ * @param limit 分页
|
|
|
|
+ * @param offset 分页, 可以为null
|
|
* @return java.util.List<com.alibaba.fastjson.JSONObject>
|
|
* @return java.util.List<com.alibaba.fastjson.JSONObject>
|
|
*/
|
|
*/
|
|
@SelectProvider(type = SqlProvider.class, method = "selectByCondition")
|
|
@SelectProvider(type = SqlProvider.class, method = "selectByCondition")
|
|
List<JSONObject> selectByCondition(@Param("tableName") String tableName
|
|
List<JSONObject> selectByCondition(@Param("tableName") String tableName
|
|
|
|
+ , @Param("condition") JSONObject condition
|
|
, @Param("packCondition") JSONObject packCondition
|
|
, @Param("packCondition") JSONObject packCondition
|
|
, @Param("showData") List<String> showData
|
|
, @Param("showData") List<String> showData
|
|
, @Param("orderBy") String orderBy
|
|
, @Param("orderBy") String orderBy
|
|
@@ -140,17 +141,18 @@ public interface StandardMapper {
|
|
* 功能描述: 自定义查询,需要查询的字段和value都在condition中
|
|
* 功能描述: 自定义查询,需要查询的字段和value都在condition中
|
|
* {@link SqlProvider#selectByLeftJoinCondition(Map)}
|
|
* {@link SqlProvider#selectByLeftJoinCondition(Map)}
|
|
*
|
|
*
|
|
- * @param queryBySql queryBySql
|
|
|
|
- * @param packCondition 封装好的查询条件
|
|
|
|
- * @param showData 需要查询的列
|
|
|
|
- * @param orderBy orderBy
|
|
|
|
- * @param limit 分页
|
|
|
|
- * @param offset 分页, 可以为null
|
|
|
|
|
|
+ * @param queryBySql queryBySql
|
|
|
|
+ * @param condition 封装好的查询条件
|
|
|
|
+ * @param showData 需要查询的列
|
|
|
|
+ * @param orderBy orderBy
|
|
|
|
+ * @param limit 分页
|
|
|
|
+ * @param offset 分页, 可以为null
|
|
* @return java.util.List<com.alibaba.fastjson.JSONObject>
|
|
* @return java.util.List<com.alibaba.fastjson.JSONObject>
|
|
*/
|
|
*/
|
|
@SelectProvider(type = SqlProvider.class, method = "selectByLeftJoinCondition")
|
|
@SelectProvider(type = SqlProvider.class, method = "selectByLeftJoinCondition")
|
|
List<JSONObject> selectByLeftJoinCondition(@Param("queryBySql") QueryBySqlDto queryBySql
|
|
List<JSONObject> selectByLeftJoinCondition(@Param("queryBySql") QueryBySqlDto queryBySql
|
|
, @Param("packCondition") JSONObject packCondition
|
|
, @Param("packCondition") JSONObject packCondition
|
|
|
|
+ , @Param("condition") JSONObject condition
|
|
, @Param("showData") List<String> showData
|
|
, @Param("showData") List<String> showData
|
|
, @Param("orderBy") String orderBy
|
|
, @Param("orderBy") String orderBy
|
|
, @Param("limit") int limit
|
|
, @Param("limit") int limit
|
|
@@ -161,35 +163,36 @@ public interface StandardMapper {
|
|
* 功能描述: 自定义查询,需要查询的字段和value都在condition中
|
|
* 功能描述: 自定义查询,需要查询的字段和value都在condition中
|
|
* {@link SqlProvider#countByCondition(Map)}
|
|
* {@link SqlProvider#countByCondition(Map)}
|
|
*
|
|
*
|
|
- * @param tableName tableName
|
|
|
|
- * @param packCondition 封装好的查询条件
|
|
|
|
|
|
+ * @param tableName tableName
|
|
|
|
+ * @param condition condition
|
|
* @return int
|
|
* @return int
|
|
*/
|
|
*/
|
|
@SelectProvider(type = SqlProvider.class, method = "countByCondition")
|
|
@SelectProvider(type = SqlProvider.class, method = "countByCondition")
|
|
- int countByCondition(@Param("tableName") String tableName, @Param("packCondition") JSONObject packCondition);
|
|
|
|
|
|
+ int countByCondition(@Param("tableName") String tableName, @Param("packCondition") JSONObject packCondition, @Param("condition") JSONObject condition);
|
|
|
|
|
|
/**
|
|
/**
|
|
* 功能描述: 连表查询
|
|
* 功能描述: 连表查询
|
|
* {@link SqlProvider#countByLeftJoinCondition(Map)}
|
|
* {@link SqlProvider#countByLeftJoinCondition(Map)}
|
|
*
|
|
*
|
|
- * @param queryBySql dto
|
|
|
|
- * @param packCondition packCondition
|
|
|
|
|
|
+ * @param queryBySql dto
|
|
|
|
+ * @param condition condition
|
|
* @return int
|
|
* @return int
|
|
*/
|
|
*/
|
|
@SelectProvider(type = SqlProvider.class, method = "countByLeftJoinCondition")
|
|
@SelectProvider(type = SqlProvider.class, method = "countByLeftJoinCondition")
|
|
- int countByLeftJoinCondition(@Param("packCondition") JSONObject packCondition, @Param("queryBySql") QueryBySqlDto queryBySql);
|
|
|
|
|
|
+ int countByLeftJoinCondition(@Param("packCondition") JSONObject packCondition, @Param("queryBySql") QueryBySqlDto queryBySql, @Param("condition") JSONObject condition);
|
|
|
|
|
|
/**
|
|
/**
|
|
* 功能描述: 根据tableName和map(属性名和属性值)进行查查
|
|
* 功能描述: 根据tableName和map(属性名和属性值)进行查查
|
|
* {@link SqlProvider#getByMap(java.util.Map)}
|
|
* {@link SqlProvider#getByMap(java.util.Map)}
|
|
*
|
|
*
|
|
- * @param tableName tableName
|
|
|
|
- * @param packCondition 属性名和属性值 条件
|
|
|
|
- * @param limitOne true sql加上limit 1, false 则不加
|
|
|
|
|
|
+ * @param tableName tableName
|
|
|
|
+ * @param condition 属性名和属性值 条件
|
|
|
|
+ * @param limitOne true sql加上limit 1, false 则不加
|
|
* @return java.util.List<com.alibaba.fastjson.JSONObject>
|
|
* @return java.util.List<com.alibaba.fastjson.JSONObject>
|
|
*/
|
|
*/
|
|
@SelectProvider(type = SqlProvider.class, method = "getByMap")
|
|
@SelectProvider(type = SqlProvider.class, method = "getByMap")
|
|
List<JSONObject> getByMap(@Param("tableName") String tableName, @Param("packCondition") JSONObject packCondition
|
|
List<JSONObject> getByMap(@Param("tableName") String tableName, @Param("packCondition") JSONObject packCondition
|
|
|
|
+ , @Param("condition") JSONObject condition
|
|
, @Param("limitOne") boolean limitOne);
|
|
, @Param("limitOne") boolean limitOne);
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -277,7 +280,7 @@ public interface StandardMapper {
|
|
packCondition(packColCondition, sql);
|
|
packCondition(packColCondition, sql);
|
|
|
|
|
|
String sqlStr = sql.toString();
|
|
String sqlStr = sql.toString();
|
|
- LOGGER.info("通用删除的sql语句为: {} \r\n condition: {}", sqlStr, condition);
|
|
|
|
|
|
+ LOGGER.info("通用删除的sql语句为: {} \r\n packColCondition: {}", sqlStr, packColCondition);
|
|
return sqlStr;
|
|
return sqlStr;
|
|
}
|
|
}
|
|
|
|
|