diff --git a/src/main/java/com/iflytop/uf/UfActiveRecordMapper.java b/src/main/java/com/iflytop/uf/UfActiveRecordMapper.java index 1ae7136..cf2c731 100644 --- a/src/main/java/com/iflytop/uf/UfActiveRecordMapper.java +++ b/src/main/java/com/iflytop/uf/UfActiveRecordMapper.java @@ -10,7 +10,15 @@ public interface UfActiveRecordMapper { "SELECT * FROM ${tableName} " + "" + "WHERE " + - "`${key}` = #{value}" + + "" + + "" + + "`${key}` IN " + + "(#{valueItem})" + + "" + + "" + + "`${key}` = #{value}" + + "" + + "" + " " + "" + "ORDER BY " + @@ -27,11 +35,19 @@ public interface UfActiveRecordMapper { "SELECT COUNT(*) FROM ${tableName} " + "" + "WHERE " + - "`${key}` = #{value}" + + "" + + "" + + "`${key}` IN " + + "(#{valueItem})" + + "" + + "" + + "`${key}` = #{value}" + + "" + + "" + "" + "" ) - Integer count(UfActiveRecordCriteria criteria); + Integer count(String tableName, Map conditions); @Select("SELECT * FROM ${tableName} WHERE id = #{id}") Map findById(String tableName, String id); @@ -49,12 +65,24 @@ public interface UfActiveRecordMapper { @Update( "" ) Integer update(String tableName, String id, Map data); + @Update( + "" + ) + Integer updateAll(String tableName, Map conditions, Map data); + @Delete("DELETE FROM ${tableName} WHERE id = #{id}") Integer delete(String tableName, String id); }