refactor mapper xml

This commit is contained in:
Timi
2026-08-12 16:11:08 +08:00
parent 5f36844279
commit ee530d2a8c
31 changed files with 308 additions and 38 deletions
@@ -0,0 +1,22 @@
<?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" >
<mapper namespace="com.imyeyu.api.modules.gao.mapper.GaoEventRoleRelationMapper">
<select id="selectAllByEventIdList" resultType="com.imyeyu.api.modules.gao.entity.GaoEventRoleRelation">
SELECT
*
FROM `gao_event_role_relation`
WHERE
TRUE
<if test="idList != null and !idList.isEmpty()">
AND `event_id` IN
<foreach collection="idList" item="id" separator="," open="(" close=")">
#{id}
</foreach>
</if>
<if test="idList == null or idList.isEmpty()">
AND FALSE
</if>
AND `deleted_at` IS NULL
ORDER BY `created_at`
</select>
</mapper>