KpiAssessDao.xml
1.03 KB
<?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="cn.fw.morax.dao.kpi.KpiAssessDao">
<sql id="all_columns">
id,post_id,post_name,shop_ids,shop_names,rank,group_id,yn,create_by,create_time,update_by,update_time
</sql>
<select id="getConfigs" resultType="cn.fw.morax.domain.db.kpi.KpiAssess">
SELECT
<include refid="all_columns"/>
FROM
kpi_assess
WHERE
yn = 1
and group_id = #{groupId}
and type = #{type}
<if test="filterId != null ">
AND id != #{filterId}
</if>
<if test="postId != null ">
AND post_id = #{postId}
</if>
<if test="shopIds != null and shopIds.size > 0 ">
AND
<foreach collection="shopIds" item="shopId" separator=" OR " open="(" close=")">
FIND_IN_SET(#{shopId}, shop_ids)
</foreach>
</if>
</select>
</mapper>