mybatis.xml中判断Date、int类型字段是否为空值报错
错误的:
<if test="payType!=null and payType!=''"> n.pay_type=#{payType} </if> <if test="startOrderTime!=null and startOrderTime!=''"> and n.start_order_time = #{startOrderTime} </if>
正确的:
<if test="payType!=null"> n.pay_type=#{payType} </if> <if test="startOrderTime!=null "> and n.start_order_time = #{startOrderTime} </if>