找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 151|回复: 0

Mybatis 动态Set 标签

[复制链接]

373

主题

55

回帖

1944

积分

管理员

积分
1944
发表于 2019-4-9 12:16:31 | 显示全部楼层 |阅读模式
<update>
     update table
     <set>
          <if test="xxxx and xxxx">xxx=#{xxx} ,</if>
          <if test="xxxx and xxxx">xxx=#{xxx} ,</if>
          <if test="xxxx and xxxx">xxx=#{xxx} ,</if>

     </set>
     where id = #{id}
</update>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, 2024-9-20 10:51 , Processed in 0.022848 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表