Oss上传文件(有bug)
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user