测试token恢复
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user