Oss上传文件(有bug)

This commit is contained in:
KilLze
2025-12-18 18:51:26 +08:00
parent 347c56dd40
commit 9e8d35d5b3
7 changed files with 25 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
<mapper namespace="com.bao.dating.mapper.PostMapper">
<!-- 动态添加 -->
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
<insert id="insert" useGeneratedKeys="true" keyProperty="postId">
INSERT INTO post
(user_id, content,
<if test="mediaOssKeys != null and mediaOssKeys != ''">
@@ -17,9 +17,14 @@
is_public, like_count, favorite_count, created_at, updated_at)
VALUES
(#{userId}, #{content},
<if test="mediaOssKeys != null and mediaOssKeys != ''">
#{mediaOssKeys, typeHandler=com.bao.dating.handler.ListToVarcharTypeHandler},
</if>
#{tags, typeHandler=com.bao.dating.handler.ListToVarcharTypeHandler},
#{location}, #{isPublic}, 0, 0, #{createdAt}, #{updatedAt})
<if test="location != null and location != ''">
#{location},
</if>
#{isPublic}, 0, 0, #{createdAt}, #{updatedAt})
</insert>
</mapper>