public interface UacMapper
| 限定符和类型 | 方法和说明 |
|---|---|
int |
batchUpdateToTarget(List<UpdateParam> updateParamList)
批量向target中更新数据
|
List<Object> |
listPrimary(@NotNull @NotBlank String tableName,
String tableAlias,
@NotNull @NotBlank String primaryColumn,
String whereSql)
从source表中取出条件匹配的行记录主键列表
|
List<Map<String,Object>> |
selectFromSource(@NotNull @NotBlank String tableName,
@NotNull @NotEmpty List<String> selectColumns,
String primaryColumn,
@NotNull @NotEmpty List<Object> primaryList)
从source表中取出数据
|
int |
updateToTarget(UpdateParam updateParam)
向target中更新数据
|
@Select(value="<script>select ${primaryColumn} from ${tableName} <if test=\"tableAlias!=null and tableAlias!=\'\'\"> ${tableAlias} </if> <choose> <when test=\"whereSql != null and whereSql!=\'\'\"> where ${whereSql} </when> <otherwise> </otherwise></choose></script>")
List<Object> listPrimary(@NotNull @NotBlank @Param(value="tableName")
@NotNull @NotBlank String tableName,
@Param(value="tableAlias")
String tableAlias,
@NotNull @NotBlank @Param(value="primaryColumn")
@NotNull @NotBlank String primaryColumn,
@Param(value="whereSql")
String whereSql)
tableName - tableAlias - primaryColumn - whereSql - @Select(value="<script>select <foreach collection=\"selectColumns\" separator=\",\" index=\"index\" item=\"item\"> ${item}</foreach>from ${tableName} where ${primaryColumn} in (<foreach collection=\"primaryList\" separator=\",\" index=\"index\" item=\"item\"> #{item}</foreach>) group by <foreach collection=\"selectColumns\" separator=\",\" index=\"index\" item=\"item\"> ${item}</foreach></script>")
List<Map<String,Object>> selectFromSource(@NotNull @NotBlank @Param(value="tableName")
@NotNull @NotBlank String tableName,
@NotNull @NotEmpty @Param(value="selectColumns")
@NotNull @NotEmpty List<String> selectColumns,
@Param(value="primaryColumn")
String primaryColumn,
@NotNull @NotEmpty @Param(value="primaryList")
@NotNull @NotEmpty List<Object> primaryList)
tableName - selectColumns - primaryColumn - primaryList - @Update(value="<script><foreach collection=\"updateParamList\" index=\"index\" item=\"updateParam\"> update ${updateParam.tableName} <choose> <when test=\"updateParam.updateValue != null\"> set ${updateParam.updateColumn} = #{updateParam.updateValue} </when> <otherwise> set ${updateParam.updateColumn} = null </otherwise> </choose> where ${updateParam.whereColumn} = #{updateParam.whereValue} ;</foreach> </script>")
int batchUpdateToTarget(@Param(value="updateParamList")
List<UpdateParam> updateParamList)
updateParamList - @Update(value="<script>update ${updateParam.tableName} <choose> <when test=\"updateParam.updateValue != null\"> set ${updateParam.updateColumn} = #{updateParam.updateValue} </when> <otherwise> set ${updateParam.updateColumn} = null </otherwise> </choose>where ${updateParam.whereColumn} = #{updateParam.whereValue} </script>")
int updateToTarget(@Param(value="updateParam")
UpdateParam updateParam)
updateParam - Copyright © 2020. All rights reserved.