<?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.pqs9900.mapper.terminal.FlowMealMapper">

    <select id="getFlowMealList" resultType="com.pqs9900.pojo.terminal.FlowMealDTO">
		select a.FM_INDEX fmIndex,
		a.FM_NAME fmName,
		a.FM_NUMBER fmNumber,
		a.TYPE type,
		a.SECOND_TYPE secondType,
		a.UPDATETIME updateTime,
		b.NAME updateUser from PQS_FLOWMEAL a
		left join PQS_USER b on a.UPDATEUSER= b.USER_INDEX
		where 1=1
		<if test="fmIndex!=null and fmIndex!=''">
			and a.FM_INDEX !=#{fmIndex}
		</if>
		<if test="fmName!=null and fmName!=''">
		and a.FM_NAME = #{fmName}
		</if>
		<if test="type!=null">
			and a.TYPE = #{type}
		</if>
		<if test="secondType!=null">
			and a.SECOND_TYPE = #{secondType}
		</if>
	</select>

</mapper>
