From 7f3505ab2ea2b09744c08f9dbf6808a461582238 Mon Sep 17 00:00:00 2001 From: jiangh277 Date: Wed, 6 Aug 2025 18:38:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=85=E4=BA=8B=E9=A1=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=8C=E4=B8=8A=E4=BC=A0=E5=9B=BE=E5=83=8F?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=A9=E7=95=A5=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constants/CommonConstants.java | 1 + .../common/response/ResponseEnum.java | 3 +- .../com/timeline/dao/CommonRelationMapper.xml | 33 ------- timeline-file-service/pom.xml | 5 ++ .../file/controller/FileController.java | 17 ++-- .../timeline/file/service/FileService.java | 7 +- .../file/service/impl/FileServiceImpl.java | 85 ++++++++++++++++++- .../story/controller/StoryItemController.java | 5 +- .../story/feign/FileServiceClient.java | 2 +- .../story/service/StoryItemService.java | 4 +- .../service/impl/StoryItemServiceImpl.java | 62 +++++--------- .../com/timeline/story/vo/StoryItemAddVo.java | 8 +- .../timeline/story/dao/StoryItemMapper.xml | 4 +- 13 files changed, 139 insertions(+), 97 deletions(-) delete mode 100644 timeline-component-common/src/main/resources/com/timeline/dao/CommonRelationMapper.xml diff --git a/timeline-component-common/src/main/java/com/timeline/common/constants/CommonConstants.java b/timeline-component-common/src/main/java/com/timeline/common/constants/CommonConstants.java index 77f36e6..7396bab 100644 --- a/timeline-component-common/src/main/java/com/timeline/common/constants/CommonConstants.java +++ b/timeline-component-common/src/main/java/com/timeline/common/constants/CommonConstants.java @@ -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_"; } diff --git a/timeline-component-common/src/main/java/com/timeline/common/response/ResponseEnum.java b/timeline-component-common/src/main/java/com/timeline/common/response/ResponseEnum.java index 60e821b..0246a8a 100644 --- a/timeline-component-common/src/main/java/com/timeline/common/response/ResponseEnum.java +++ b/timeline-component-common/src/main/java/com/timeline/common/response/ResponseEnum.java @@ -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; diff --git a/timeline-component-common/src/main/resources/com/timeline/dao/CommonRelationMapper.xml b/timeline-component-common/src/main/resources/com/timeline/dao/CommonRelationMapper.xml deleted file mode 100644 index 2afb3b1..0000000 --- a/timeline-component-common/src/main/resources/com/timeline/dao/CommonRelationMapper.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - INSERT INTO common_relation (rela_id, sub_rela_id, rela_type, user_id) - VALUES (#{imageInstanceId}, #{storyItemId}, 1, #{userId}) - - - - - - - - UPDATE common_relation - SET is_delete = 1 - WHERE rela_id = #{imageInstanceId} AND sub_rela_id = #{storyItemId} - - - - INSERT INTO common_relation (rela_id, sub_rela_id, rela_type, user_id) - VALUES (#{relaId}, #{subRelaId}, #{relationType}, #{userId}) - - diff --git a/timeline-file-service/pom.xml b/timeline-file-service/pom.xml index 2b0c885..e8a0ba5 100644 --- a/timeline-file-service/pom.xml +++ b/timeline-file-service/pom.xml @@ -34,6 +34,11 @@ minio 8.5.2 + + net.coobird + thumbnailator + 0.4.17 +