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

相关推荐
泡海椒21 小时前
JQuick-SQL JQuickTable 模型:XML 动态 SQL 的表封装边界
xml·数据库·sql
supabc1231 天前
欧盟电子发票(XRechnung/Peppol/ZUGFeRD)踩坑记:用 Python 不装 Java 跑官方校验规则
xml·python·开源·电子发票·1024程序员节
zzu123zsw2 天前
当 GPU 加速渲染遇上无头组件:拆解 Yororen UI 在 GPUI 生态下的状态解耦与 XML 模板实践
xml·ui·rust·gui·gpui
麦序子3 天前
用 pdfplumber + 正则 解析工程量清单 PDF:提取项目编码、综合单价并导出 Excel
xml·pdf·python3.11
ha_lydms5 天前
Xml Functions(XML 函数)
xml·大数据·hadoop·spark·数据处理·dataworks·maxcompute
Eyfcom7 天前
〖实战〗跨境报关单证自动化:XML 报文生成、PDF 套打与单一窗口同步上传的工程实现
xml·pdf·自动化·报关单证·清关自动化
泡海椒9 天前
从 XML 到 Excel:JQuick-Excel 代理与解析器如何协作
xml·excel
流烟默10 天前
Spring Boot 异常响应被序列化为 XML 的排查与修复
xml·spring boot·后端
mmsx10 天前
Android 地图上绘制 KML:解析、样式与渲染
android·xml
不会C语言的男孩10 天前
libxml2 源码编译与 XML 读取验证(x86 / ARM)
xml·c语言·嵌入式