From 22c681a8d4712711bd7c534f3d314e0fb2c17b10 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期日, 26 三月 2023 22:19:21 +0800 Subject: [PATCH] fix 修复 删除错误提交 --- ruoyi-common/ruoyi-common-translation/src/main/java/com/ruoyi/common/translation/core/impl/OssUrlTranslationImpl.java | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/ruoyi/common/translation/core/impl/OssUrlTranslationImpl.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/ruoyi/common/translation/core/impl/OssUrlTranslationImpl.java index 00a3f38..e0d2781 100644 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/ruoyi/common/translation/core/impl/OssUrlTranslationImpl.java +++ b/ruoyi-common/ruoyi-common-translation/src/main/java/com/ruoyi/common/translation/core/impl/OssUrlTranslationImpl.java @@ -12,16 +12,17 @@ * * @author Lion Li */ -@Component @AllArgsConstructor @TranslationType(type = TransConstant.OSS_ID_TO_URL) -public class OssUrlTranslationImpl implements TranslationInterface { +public class OssUrlTranslationImpl implements TranslationInterface<String> { private final OssService ossService; public String translation(Object key, String other) { if (key instanceof String ids) { return ossService.selectUrlByIds(ids); + } else if (key instanceof Long id) { + return ossService.selectUrlByIds(id.toString()); } return null; } -- Gitblit v1.9.3