mybatis if标签判断的问题
<?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.lypaydb.mapper.Order_DayMapper">
<resultMap type="com.lypaydb.pojo.Order_Day" id="odMap">
<id property="id" column="id" />
<result property="date" column="date" />
<result property="total" column="total" />
<result property="aisle" column="aisle" />
<result property="operators" column="operators" />
<result property="channelid" column="channelid" />
<result property="appid" column="appid" />
<result property="paycnt" column="paycnt" />
</resultMap>
<!-- /*sql -->
<select id="findod" parameterType="java.util.Map" resultMap="odMap">
select * from order_day where 1 = 1
<if test="${start} != null and ${start != ''}">
and date >= #{start}
</if>
<if test="${end} != null and ${end} != ''">
and #{end} > date
</if>
<if test="appid != null and appid != ''">
and appid=${appid}
</if>
<if test="operators != null and operators != ''">
and operators=${operators}
</if>
limit ${Page.startPos},${Page.pageSize};
</select>
<select id="getAllCount" parameterType="java.util.Map" resultType="java.lang.Integer">
select count(*) from order_day where 1=1
<if test="${start} != null and ${start != ''}">
and date >= #{start}
</if>
<if test="${end} != null and ${end} != ''">
and #{end} > date
</if>
<if test="appid != null and appid != ''">
and appid=${appid}
</if>
<if test="operators != null and operators != ''">
and operators=${operators}
</if>
</select>
<!-- sql*/ -->
</mapper>