• mybatis在where中比较复杂的判断


            <if test="param.applicationStateInNumber != null and param.applicationStateInNumber != ''">
                and  #{param.applicationStateInNumber,jdbcType=INTEGER} like (case when (fa.whether_invoice is null  and fa.whether_pay is null ) then "1"
                when  (fa. whether_invoice=1 and fa.whether_pay is null ) then  "2、3"
                when (fa.whether_invoice = 1 and fa.whether_pay  = 1) then "4" end)
            </if>

    这个是需要判断传入的参数不为空,且传入的参数在一个case when 中,起初把

    #{param.applicationStateInNumber,jdbcType=INTEGER}

    写成了

    param.applicationStateInNumber

    报错:badsqlGrammer,未知的参数param.applicationStateInNumber

    #{param.applicationStateInNumber,jdbcType=INTEGER}
  • 相关阅读:
    Kettle学习(2)
    kettle学习(1)
    Quartz在Spring中的使用
    JVM垃圾收集简介
    快速排序

    20190827最新论文
    GNN
    Multimodal Machine Learning
    Wasserstein距离 及两多元高斯分布间的W距离
  • 原文地址:https://www.cnblogs.com/huanghuanghui/p/9295808.html
Copyright © 2020-2023  润新知