1.if传值判断
1.1不为空 或null
<if test="cgxs != null and cgxs != ''"> and cgxs = #{cgxs}</if>
1.2 传数字判断
<if test="cgxs == '1' "> and cgxs = #{cgxs}</if>
1.3传字符串判断
1.3.1 第一种
<if test="cgxs == '是'.toString() "> and cgxs = #{cgxs}</if>
1.3.2 第二种
<if test='cgxs != null and cgxs == "是" '>
1.4 日期判断(注意,日期只能判断 != null ,不能判断 !='' 会报错哦 )
<if test='startDate != null'> start_date = #{startDate, jdbcType=TIMESTAMP}, </if>