故事项新建调整,上传图像增加缩略图
This commit is contained in:
@@ -13,4 +13,5 @@ public class CommonConstants {
|
||||
|
||||
public static final int DELETED = 1;
|
||||
public static final int NOT_DELETED = 0;
|
||||
public static final String LOW_RESOLUTION_PREFIX = "low_res_";
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@ public enum ResponseEnum {
|
||||
GATEWAY_TIMEOUT(504, "网关超时"),
|
||||
|
||||
// 操作错误
|
||||
SEARCH_ERROR(4001, "查询数据库错误");
|
||||
SEARCH_ERROR(4001, "查询数据库错误"),
|
||||
NOT_FOUND_ERROR(4002, "未找到该资源");
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.timeline.story.dao.CommonRelationMapper">
|
||||
|
||||
<insert id="insertImageStoryItemRelation">
|
||||
INSERT INTO common_relation (rela_id, sub_rela_id, rela_type, user_id)
|
||||
VALUES (#{imageInstanceId}, #{storyItemId}, 1, #{userId})
|
||||
</insert>
|
||||
|
||||
<select id="getImagesByStoryItemId" resultType="string">
|
||||
SELECT rela_id
|
||||
FROM common_relation
|
||||
WHERE sub_rela_id = #{storyItemId} AND rela_type = 1 AND is_delete = 0
|
||||
</select>
|
||||
|
||||
<select id="getStoryItemsByImageInstanceId" resultType="string">
|
||||
SELECT sub_rela_id
|
||||
FROM common_relation
|
||||
WHERE rela_id = #{imageInstanceId} AND rela_type = 1 AND is_delete = 0
|
||||
</select>
|
||||
|
||||
<update id="deleteImageStoryItemRelation">
|
||||
UPDATE common_relation
|
||||
SET is_delete = 1
|
||||
WHERE rela_id = #{imageInstanceId} AND sub_rela_id = #{storyItemId}
|
||||
</update>
|
||||
|
||||
<insert id="insertRelation">
|
||||
INSERT INTO common_relation (rela_id, sub_rela_id, rela_type, user_id)
|
||||
VALUES (#{relaId}, #{subRelaId}, #{relationType}, #{userId})
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user