From 1ac01dd090b10898d9d123712873059c5546a8be Mon Sep 17 00:00:00 2001 From: litianxiang Date: Wed, 25 Feb 2026 16:36:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95token=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ai/da/service/impl/GlobalAwardServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/ai/da/service/impl/GlobalAwardServiceImpl.java b/src/main/java/com/ai/da/service/impl/GlobalAwardServiceImpl.java index feff5cc3..210da7de 100644 --- a/src/main/java/com/ai/da/service/impl/GlobalAwardServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/GlobalAwardServiceImpl.java @@ -61,7 +61,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService { private final RedisUtil redisUtil; - @Value("${file.upload.dir:uploads}") + @Value("${file.upload.temp.dir}") private String uploadDir; private static final DateTimeFormatter YYYY_MM_DD = DateTimeFormatter.ofPattern("yyyy/MM"); @@ -443,8 +443,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService { throw new BusinessException("Please complete email verification first."); } -// String tokenCache = redisUtil.getFromString(key); - String tokenCache = "123456"; + String tokenCache = redisUtil.getFromString(key); if (StringUtils.isBlank(tokenCache)) { log.error("security token 过期"); throw new BusinessException("Email verification has expired. Please verify again."); @@ -527,8 +526,10 @@ public class GlobalAwardServiceImpl implements GlobalAwardService { String pdfPath = contestant.getPdfPath(); if (StringUtils.isNotBlank(pdfPath)) { try { + String fileName = pdfPath.contains("/") ? + pdfPath.substring(pdfPath.lastIndexOf("/") + 1) : "design.pdf"; downloadFileFromMinio(pdfPath, contestantPath.toString(), "design.pdf"); - log.info("Downloaded PDF for contestant {}", contestantNumber); + log.info("Downloaded PDF for contestant {}", fileName); } catch (Exception e) { log.error("Failed to download PDF for contestant {}: {}", contestantNumber, e.getMessage()); }