MyBatis 动态修改多表数据

update product p
join productcategory c
on
     p.categoryId=c.id
join productstock s
on
     p.ProId=s.ProId
<set>
<if test="proName!= null ">
       p.ProName=#{proName}
</if>
<if test="keywords!= null ">
    ,p.Keywords=#{keywords}
</if>
</set>
where
p.ProId=#{proId}

重点:多个数据有逗号--------------------,

猜你喜欢

转载自blog.csdn.net/cmj962464/article/details/82458012
今日推荐