如果数据类型是integer或者int,也就是数据类型的,在用<if>标签做动态语句的时候 不用判断是否为"''"

<if test="sex != null">
        `sex` = #{sex},
        </if>
        <if test="mobile != null and mobile != ''">
        `mobile` = #{mobile},
        </if>

  而字符类型则需要判断,例子如上,sex是integer类型的,mobile是字符类型的

 

相关文章:

  • 2022-12-23
  • 2021-10-30
  • 2021-10-15
  • 2022-03-06
  • 2022-12-23
  • 2021-09-22
  • 2021-10-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-07-10
  • 2020-07-28
  • 2021-10-25
  • 2022-12-23
相关资源
相似解决方案