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

相关推荐
强子感冒了3 小时前
JSON和XML学习笔记
xml·学习·json
сокол3 天前
【网安-Web渗透测试-漏洞系列】XXE漏洞
xml·web安全·php
树码小子5 天前
Mybatis(13)MyBatis Generator(xml生成器)& Mybatis-Plus初识
xml·mybatis
MX_93599 天前
Spring xml 方式整合第三方框架总结加案例
xml·java·spring
工程师老罗13 天前
YoloV1数据集格式转换,VOC XML→YOLOv1张量
xml·人工智能·yolo
wpyok16813 天前
密钥检测错误代码xml构建
xml
林开落L13 天前
从入门到了解:Protobuf、JSON、XML 核心解析(C++ 示例)
xml·c++·json·protobuffer·结构化数据序列化机制
介一安全14 天前
【Web安全】XML注入全手法拆解
xml·web安全·安全性测试
2301_8187320617 天前
项目启动报错,错误指向xml 已解决
xml·java·数据库·后端·springboot
csdn2015_18 天前
generatorConfig.xml 配置 Controller、Service 完整教程
xml·mybatis