2024-10-01 22:23:00 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
2024-10-02 14:48:56 +08:00
|
|
|
<mapper namespace="cn.bunny.services.mapper.${originalName}Mapper">
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
|
<resultMap id="BaseResultMap" type="$type">
|
|
|
|
#foreach($field in $baseResultMaps)
|
|
|
|
<id column="$field.column" property="$field.property"/>
|
|
|
|
#end
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
$baseColumnList
|
|
|
|
</sql>
|
2024-10-01 22:23:00 +08:00
|
|
|
|
|
|
|
<!-- 分页查询${classTitle}内容 -->
|
2024-10-02 14:48:56 +08:00
|
|
|
<select id="selectListByPage" resultType="$type">
|
|
|
|
select <include refid="Base_Column_List"/>
|
|
|
|
from $tableName
|
2024-10-01 22:23:00 +08:00
|
|
|
<where>
|
2024-10-02 14:48:56 +08:00
|
|
|
#foreach($field in $pageQueryMap)
|
|
|
|
<if test="dto.${field.property} != null and dto.${field.property} != ''">
|
|
|
|
$field.column like CONCAT('%',#{dto.${field.property}},'%')
|
|
|
|
</if>
|
|
|
|
#end
|
2024-10-01 22:23:00 +08:00
|
|
|
</where>
|
|
|
|
order by update_time
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 物理删除${classTitle} -->
|
|
|
|
<delete id="deleteBatchIdsWithPhysics">
|
|
|
|
delete
|
2024-10-02 14:48:56 +08:00
|
|
|
from $tableName
|
2024-10-01 22:23:00 +08:00
|
|
|
where id in
|
|
|
|
<foreach collection="ids" item="id" open="(" close=")" separator=",">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
</mapper>
|