xml中判断sql参数不为空时才执行对应更新
update 表名 t
set
<if test="字段 != null and 字段 != ' '">
字段= #{参数}, </if>
.......
where t.id=#{id}
本文来自博客园,作者:皮军旗,转载请注明原文链接:https://www.cnblogs.com/pijunqi/p/14096798.html
update 表名 t
set
<if test="字段 != null and 字段 != ' '">
字段= #{参数}, </if>
.......
where t.id=#{id}
本文来自博客园,作者:皮军旗,转载请注明原文链接:https://www.cnblogs.com/pijunqi/p/14096798.html