34 lines
1.3 KiB
XML
34 lines
1.3 KiB
XML
<?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.zf.foodpurchase.fdsafe.mapper.FoodSpecMapper">
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
spec_id, spec_label, del_flag, create_time, update_time, dept_id
|
|
</sql>
|
|
<select id="queryFoodSpecVO" resultType="com.zf.foodpurchase.fdsafe.vo.FoodSpecVO"
|
|
parameterType="com.zf.foodpurchase.fdsafe.vo.FoodSpecVO">
|
|
select
|
|
<include refid="Base_Column_List"/>
|
|
from food_spec
|
|
<where>
|
|
<if test="specId != null and specId != ''">
|
|
and spec_id = #{specId}
|
|
</if>
|
|
<if test="specLabel != null and specLabel != ''">
|
|
and spec_label like concat('%',#{specLabel},'%')
|
|
</if>
|
|
<if test="delFlag != null">
|
|
and del_flag = #{delFlag}
|
|
</if>
|
|
<if test="deptIds != null and deptIds.size() > 0">
|
|
and dept_id in
|
|
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
|
|
#{deptId}
|
|
</foreach>
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|