xml 取值错误 #{} boolean 一直为 false

取值时

#{param.msgStatus} 一直是false,java代码里面显示true。

sql 复制代码
 <select id="findPageOaReading" resultType="com.focusin.data.office.func.dto.ProcessMessageInfoDTO">
        select i.*, t.template_name procdefName
        from process_message_info i
                          inner join process_oa_template t on i.process_oa_template_id = t.id
        where i.del_flag = 0 and i.status = 1

            and i.receive_user = #{param.receiveUser}
            and i.data_type in (1, 2, 3, 4)
            and i.msg_status = #{param.msgStatus}
            <if test="param.processTitle!=null and param.processTitle!=''">
                and i.process_title like concat(#{param.processTitle}, '%')
            </if>
            <if test="param.tenant!=null and param.tenant!=''">
                and i.tenant = #{param.tenant}
            </if>

            <if test="param.sendUser!=null and param.sendUser!=''">
                and i.send_user = #{param.sendUser}
            </if>

            <if test="param.templateName!=null and param.templateName!=''">
                and t.template_name like CONCAT(#{param.templateName},'%')
            </if>

        <if test="param.receiveBeginTime!=null and param.receiveEndTime!=null">
            and i.create_time between #{param.receiveBeginTime} and #{param.receiveEndTime}
        </if>
        <if test="param.msgStatus == true and param.operateBeginTime!=null and param.operateEndTime!=null">
            and i.update_time between #{param.operateBeginTime} and #{param.operateEndTime}
        </if>


    </select>

问题原因:判断boolean类型时不能用 param.msgStatus = 1 ,不然会使得 #{param.msgStatus} 取值一直为false

相关推荐
诸神缄默不语6 小时前
Maven用户设置文件(settings.xml)配置指南
xml·java·maven
lang201509287 小时前
MyBatis Mapper XML 核心详解
xml·mybatis
YxVoyager2 天前
Qt C++ :XML文件处理工具 <QXml>模块
xml·c++·qt
天若有情6737 天前
Spring配置文件XML验证错误全面解决指南:从cvc-elt.1.a到找不到‘beans‘元素声明
xml·java·spring
私人珍藏库8 天前
[Windows] 发票识别工具。支持xml、pdf、ofd文件
xml·pdf
Derrick__19 天前
Python常用内建模块——XML
xml·python
梵得儿SHI9 天前
Java 操作 XML 及动态生成报告:从解析到实战
xml·java·jaxb·dom4j·xml解析·操作xml·报告生成
张太行_11 天前
XML语言解析
xml
未来之窗软件服务11 天前
万象EXCEL开发(五)模拟excel行计算 ——东方仙盟练气期
xml·仙盟创梦ide·东方仙盟·万象excel
sun00770011 天前
网络配置config.xml的android.mk解析
android·xml