<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}