portfolioUrl 漏加fix

This commit is contained in:
litianxiang
2026-04-15 14:52:18 +08:00
parent b0343be544
commit c00d906083
2 changed files with 11 additions and 2 deletions

View File

@@ -68,6 +68,9 @@ public class Contestant {
@TableField("pdf_size") @TableField("pdf_size")
private Long pdfSize; private Long pdfSize;
@TableField("portfolio_url")
private String portfolioUrl;
@TableField("created_at") @TableField("created_at")
private LocalDateTime createdAt; private LocalDateTime createdAt;

View File

@@ -186,6 +186,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService {
.videoSize(request.getVideoSize()) .videoSize(request.getVideoSize())
.pdfSize(request.getPdfSize()) .pdfSize(request.getPdfSize())
.contestantNumber(nextNumber) .contestantNumber(nextNumber)
.portfolioUrl(request.getPortfolioUrl())
.createdAt(now) .createdAt(now)
.updatedAt(now) .updatedAt(now)
.build(); .build();
@@ -226,6 +227,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService {
existing.setVideoDuration(request.getVideoDuration()); existing.setVideoDuration(request.getVideoDuration());
existing.setVideoSize(request.getVideoSize()); existing.setVideoSize(request.getVideoSize());
existing.setPdfSize(request.getPdfSize()); existing.setPdfSize(request.getPdfSize());
existing.setPortfolioUrl(request.getPortfolioUrl());
existing.setUpdatedAt(now); existing.setUpdatedAt(now);
contestantMapper.updateById(existing); contestantMapper.updateById(existing);
resp.put("success", true); resp.put("success", true);
@@ -243,7 +245,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService {
String[] headers = new String[] { String[] headers = new String[] {
"contestantNumber", "email", "firstName", "lastName", "gender", "occupation", "contestantNumber", "email", "firstName", "lastName", "gender", "occupation",
"age", "countryRegionCity", "phoneNumber", "designTitle", "designDescription", "age", "countryRegionCity", "phoneNumber", "designTitle", "designDescription",
"pdfPath", "videoPath", "videoDuration", "videoSizeMB", "pdfSizeMB", "createdAt", "updatedAt" "pdfPath", "videoPath", "videoDuration", "videoSizeMB", "pdfSizeMB", "portfolioUrl", "createdAt", "updatedAt"
}; };
for (int i = 0; i < headers.length; i++) { for (int i = 0; i < headers.length; i++) {
Cell c = header.createCell(i); Cell c = header.createCell(i);
@@ -279,6 +281,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService {
double pMb = cst.getPdfSize() / 1024.0 / 1024.0; double pMb = cst.getPdfSize() / 1024.0 / 1024.0;
r.createCell(ci++).setCellValue(String.format("%.2f", pMb)); r.createCell(ci++).setCellValue(String.format("%.2f", pMb));
} }
r.createCell(ci++).setCellValue(cst.getPortfolioUrl() == null ? "" : cst.getPortfolioUrl());
r.createCell(ci++).setCellValue(cst.getCreatedAt() == null ? "" : cst.getCreatedAt().toString()); r.createCell(ci++).setCellValue(cst.getCreatedAt() == null ? "" : cst.getCreatedAt().toString());
r.createCell(ci++).setCellValue(cst.getUpdatedAt() == null ? "" : cst.getUpdatedAt().toString()); r.createCell(ci++).setCellValue(cst.getUpdatedAt() == null ? "" : cst.getUpdatedAt().toString());
} }
@@ -308,7 +311,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService {
String[] headers = new String[] { String[] headers = new String[] {
"contestantNumber", "email", "firstName", "lastName", "gender", "occupation", "contestantNumber", "email", "firstName", "lastName", "gender", "occupation",
"age", "countryRegionCity", "phoneNumber", "designTitle", "designDescription", "age", "countryRegionCity", "phoneNumber", "designTitle", "designDescription",
"pdfPath", "videoPath", "videoDuration", "videoSizeMB", "pdfSizeMB", "createdAt", "updatedAt" "pdfPath", "videoPath", "videoDuration", "videoSizeMB", "pdfSizeMB", "portfolioUrl", "createdAt", "updatedAt"
}; };
for (int i = 0; i < headers.length; i++) { for (int i = 0; i < headers.length; i++) {
Cell c = header.createCell(i); Cell c = header.createCell(i);
@@ -344,6 +347,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService {
double pMb = cst.getPdfSize() / 1024.0 / 1024.0; double pMb = cst.getPdfSize() / 1024.0 / 1024.0;
r.createCell(ci++).setCellValue(String.format("%.2f", pMb)); r.createCell(ci++).setCellValue(String.format("%.2f", pMb));
} }
r.createCell(ci++).setCellValue(cst.getPortfolioUrl() == null ? "" : cst.getPortfolioUrl());
r.createCell(ci++).setCellValue(cst.getCreatedAt() == null ? "" : cst.getCreatedAt().toString()); r.createCell(ci++).setCellValue(cst.getCreatedAt() == null ? "" : cst.getCreatedAt().toString());
r.createCell(ci++).setCellValue(cst.getUpdatedAt() == null ? "" : cst.getUpdatedAt().toString()); r.createCell(ci++).setCellValue(cst.getUpdatedAt() == null ? "" : cst.getUpdatedAt().toString());
} }
@@ -382,6 +386,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService {
dto.setVideoDuration(existing.getVideoDuration()); dto.setVideoDuration(existing.getVideoDuration());
dto.setPdfSize(existing.getPdfSize()); dto.setPdfSize(existing.getPdfSize());
dto.setVideoSize(existing.getVideoSize()); dto.setVideoSize(existing.getVideoSize());
dto.setPortfolioUrl(existing.getPortfolioUrl());
return dto; return dto;
} }
@@ -543,6 +548,7 @@ public class GlobalAwardServiceImpl implements GlobalAwardService {
sb.append("Video Path: ").append(nullSafe(videoPath)).append("\n"); sb.append("Video Path: ").append(nullSafe(videoPath)).append("\n");
sb.append("Video Duration (seconds): ").append(contestant.getVideoDuration() != null ? contestant.getVideoDuration() : "N/A").append("\n"); sb.append("Video Duration (seconds): ").append(contestant.getVideoDuration() != null ? contestant.getVideoDuration() : "N/A").append("\n");
sb.append("Video Size (bytes): ").append(contestant.getVideoSize() != null ? contestant.getVideoSize() : "N/A").append("\n"); sb.append("Video Size (bytes): ").append(contestant.getVideoSize() != null ? contestant.getVideoSize() : "N/A").append("\n");
sb.append("Portfolio URL: ").append(nullSafe(contestant.getPortfolioUrl())).append("\n");
sb.append("Created At: ").append(contestant.getCreatedAt() != null ? contestant.getCreatedAt() : "N/A").append("\n"); sb.append("Created At: ").append(contestant.getCreatedAt() != null ? contestant.getCreatedAt() : "N/A").append("\n");
sb.append("Updated At: ").append(contestant.getUpdatedAt() != null ? contestant.getUpdatedAt() : "N/A").append("\n"); sb.append("Updated At: ").append(contestant.getUpdatedAt() != null ? contestant.getUpdatedAt() : "N/A").append("\n");