1. mybatis where条件 is null

<if test="strA != null  and strA != '' and  strA != 'ISNULL'"> and te.str_a = #{strA}</if>
<if test="strA != null  and  strA == 'ISNULL'"> and te.str_a is null</if>

2.if判断变量名

<if test="aaaBbb == @com.xx.aa.constant.XXXConstant@CC_DD_EE "></if>

3. 更新变量赋值

update T_XXX set AA_BB = '${@com.xx.aa.constant.XXXConstant@CC_DD_EE}'
Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐