AutoreplyDao.xml
655 字节
<?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.w1hd.zzhnc.dao.AutoreplyDao">
<select id="findByKeys" resultType="com.w1hd.zzhnc.model.Autoreply">
SELECT * FROM autoreply
<where>
1=1 AND deleted = 0
<if test="keys != null">
<foreach item="item" collection="keys" separator="" open=""
close="" index="">
and concat('|' ,keyWords,'|') LIKE '%|${item}|%'
</foreach>
</if>
<if test="projectId != null ">
AND project_id = #{projectId}
</if>
</where>
ORDER BY sort DESC
</select>
</mapper>