优化sql语句

This commit is contained in:
KilLze
2025-12-29 19:01:40 +08:00
parent 70a1d0012e
commit bfd6674dd9

View File

@@ -82,10 +82,10 @@
<update id="updateById"> <update id="updateById">
UPDATE post UPDATE post
<set> <set>
<if test="content != null"> <if test="content != null and content != '' ">
content = #{content}, content = #{content},
</if> </if>
<if test="tags != null"> <if test="tags != null and tags != '' ">
tags = #{tags, typeHandler=com.bao.dating.handler.ListToVarcharTypeHandler}, tags = #{tags, typeHandler=com.bao.dating.handler.ListToVarcharTypeHandler},
</if> </if>
<if test="mediaOssKeys != null"> <if test="mediaOssKeys != null">