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

相关推荐
odoo中国8 小时前
如何在 Odoo 中从 XML 文件调用函数
xml·odoo·odoo开发·调用函数
阿凉07021 天前
新版本JLink安装目录中缺失JLinkDevices.xml添加方法
xml·嵌入式硬件
Knight_AL1 天前
从 QueryWrapper 到 XML:一次「报表 SQL」的重构实践
xml·sql·重构
智航GIS2 天前
9.5 XML 处理指南
xml·前端·python
像风一样的男人@3 天前
python --yolo混合文件xml和img整理
xml·python·yolo
飞舞花下8 天前
MAVEN私有仓库配置-Nexus私有仓库
xml·java·maven
好大的月亮8 天前
mybatis在xml中使用OGNL取值简述
xml·mybatis
草莓熊Lotso8 天前
Qt 入门核心指南:从框架认知到环境搭建 + Qt Creator 实战
xml·开发语言·网络·c++·人工智能·qt·页面
小夏卷编程8 天前
Mybaits 使用过程中mapper.xml foreach List<String[]>的时候报错
xml
kylezhao201911 天前
C#上位机开发数据持久化:xml数据导入导出
xml·开发语言·c#