v1.0.5
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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.common.mapper.AttachmentMapper">
|
||||
<select id="selectByBizIdList" resultType="com.imyeyu.api.modules.common.entity.Attachment">
|
||||
SELECT
|
||||
*
|
||||
FROM `attachment`
|
||||
WHERE
|
||||
`biz_type` = #{bizType}
|
||||
<if test="bizIdList != null and !bizIdList.isEmpty()">
|
||||
AND `biz_id` IN
|
||||
<foreach collection="bizIdList" item="bizId" separator="," open="(" close=")">
|
||||
#{bizId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="bizIdList == null or bizIdList.isEmpty()">
|
||||
AND 1 = 0
|
||||
</if>
|
||||
AND `deleted_at` IS NULL
|
||||
AND (`destroy_at` IS NULL OR UNIX_TIMESTAMP() < `destroy_at`)
|
||||
<if test="attachTypes != null and !attachTypes.isEmpty()">
|
||||
AND `attach_type` IN
|
||||
<foreach collection="attachTypes" item="attachType" separator="," open="(" close=")">
|
||||
#{attachType}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY `created_at` ASC
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user