Commit e7e1c2c8 by HKyoma

feat(report): 新增驻店零售评分报表导出功能

- 新增 DownloadReportRemote 远程接口及实现,实现报表导出调用
- 新增 DownloadReportService 服务骨架,为后续业务逻辑留接口
- 新增 DownloadReportController 控制器,暴露导出报表接口
- 新增 ReportExcelDownloadRequest 请求类,接收导出日期参数
- 新增 ReportExcelDownloadDTO 及相关 DTO,定义报表数据结构
- 在 EasyExcelUtil 中增加多层级导出方法,支持报表复杂合并及样式处理
- 新增季度及月份工具类,支持日期范围及季度相关逻辑
- 修改项目及依赖版本号至 5.6.4-SNAPSHOT,保持版本一致性
- 日志输出优化导出耗时,便于性能追踪和分析
1 parent 6612fc92
......@@ -7,7 +7,7 @@
</parent>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-riskmanage-api</artifactId>
<version>5.6.1-SNAPSHOT</version>
<version>5.6.4-SNAPSHOT</version>
<name>rpc-dj-riskmanage-api</name>
<properties>
<deploy.scanPackage>cn.com.glsx.dj.riskmanage.remote</deploy.scanPackage>
......@@ -28,7 +28,7 @@
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-riskmanage-api</artifactId>
<version>5.6.1-SNAPSHOT</version>
<version>5.6.4-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
......
package cn.com.glsx.dj.riskmanage.dto.beisen;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.oreframework.commons.office.easyexcel.annotation.ExcelMergeRow;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class ReportExcelDateInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@ExcelMergeRow(columIndex = 0)
@ExcelProperty(value = "姓名")
private String name;
/**
* 入职时间
*/
@ExcelMergeRow(columIndex = 1)
@ExcelProperty(value = "入职时间")
private String entryTime;
/**
* 职务
*/
@ExcelMergeRow(columIndex = 2)
@ExcelProperty(value = "职务")
private String postName;
/**
* 性别
*/
@ExcelMergeRow(columIndex = 3)
@ExcelProperty(value = "性别")
private String sex;
/**
* 手机号
*/
@ExcelMergeRow(columIndex = 4)
@ExcelProperty(value = "手机号")
private String mobilePhone;
/**
* 转正日期
*/
@ExcelMergeRow(columIndex = 5)
@ExcelProperty(value = "转正日期")
private String correctionTime;
/**
* 试用期(月)
*/
@ExcelMergeRow(columIndex = 6)
@ExcelProperty(value = "试用期(月)")
private String probationPeriod;
/**
* 归属业务
*/
@ExcelMergeRow(columIndex = 7)
@ExcelProperty(value = "归属业务")
private String businessType;
/**
* 品牌
*/
@ExcelMergeRow(columIndex = 8)
@ExcelProperty(value = "品牌")
private String brandName;
/**
* 考试成绩(分数)
*/
@ExcelMergeRow(columIndex = 9)
@ExcelProperty(value = "考试成绩(分数)")
private String examScore;
/**
* 渗透率
*/
@ExcelMergeRow(columIndex = 10)
@ExcelProperty(value = "渗透率")
private String penetrationRate;
/**
* 最终得分
*/
@ExcelMergeRow(columIndex = 11)
@ExcelProperty(value = "最终得分")
private String finalScore;
/**
* 定级结果
*/
@ExcelMergeRow(columIndex = 12)
@ExcelProperty(value = "定级结果")
private String levelResult;
}
package cn.com.glsx.dj.riskmanage.dto.beisen;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class ReportExcelDownloadDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 标题日期
*/
private String titleDateStr;
/**
* 数据范围日期
*/
private String dataRangeDateStr;
/**
* 数据信息list
*/
private List<ReportExcelDateInfoDTO> dataList;
}
package cn.com.glsx.dj.riskmanage.dto.beisen;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class ReportExcelDownloadReqDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 日期
*/
private String date;
}
package cn.com.glsx.dj.riskmanage.remote.beisen;
import cn.com.glsx.dj.riskmanage.dto.beisen.ReportExcelDownloadDTO;
import cn.com.glsx.dj.riskmanage.dto.beisen.ReportExcelDownloadReqDTO;
import cn.com.glsx.framework.core.annotation.ApiService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ApiService(value = "驻店零售评分", owner = "zhangfk", protocol = ApiService.ProtocolEnum.dubbo, version = "1.0.0")
public interface DownloadReportRemote {
/**
* 下载报表
*/
RpcResponse<ReportExcelDownloadDTO> reportExcelDownload(ReportExcelDownloadReqDTO reqDto);
}
......@@ -7,7 +7,7 @@
</parent>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-riskmanage</artifactId>
<version>5.5.3-SNAPSHOT</version>
<version>5.6.4-SNAPSHOT</version>
<name>rpc-dj-riskmanage</name>
<packaging>war</packaging>
......@@ -21,7 +21,7 @@
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-riskmanage-api</artifactId>
<version>5.6.1-SNAPSHOT</version>
<version>5.6.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.merchants</groupId>
......
package cn.com.glsx.dj.riskmanage.remote.beisen;
import cn.com.glsx.dj.riskmanage.dto.beisen.ReportExcelDownloadDTO;
import cn.com.glsx.dj.riskmanage.dto.beisen.ReportExcelDownloadReqDTO;
import cn.com.glsx.dj.riskmanage.service.beisen.DownloadReportService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import javax.annotation.Resource;
/**
* @Title:
* @Description:
* @Author xiehx
* @Date 2025/11/27
**/
@Slf4j
@DubboService(version = "1.0.0", validation = "true")
public class DownloadReportRemoteImpl implements DownloadReportRemote {
@Resource
private DownloadReportService downloadReportService;
@Override
public RpcResponse<ReportExcelDownloadDTO> reportExcelDownload(ReportExcelDownloadReqDTO reqDto) {
try {
return RpcResponse.success(downloadReportService.reportExcelDownload(reqDto));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.riskmanage.service.beisen;
import cn.com.glsx.dj.riskmanage.dto.beisen.ReportExcelDownloadDTO;
import cn.com.glsx.dj.riskmanage.dto.beisen.ReportExcelDownloadReqDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class DownloadReportService {
public ReportExcelDownloadDTO reportExcelDownload(ReportExcelDownloadReqDTO reqDto) {
return null;
}
}
package cn.com.glsx.dj.riskmanage.util.quarter;
import lombok.Getter;
/**
* 月份信息封装类
*/
@Getter
public class MonthInfo {
private final int year;
private final int month;
private final String startDate;
private final String endDate;
public MonthInfo(int year, int month, String startDate, String endDate) {
this.year = year;
this.month = month;
this.startDate = startDate;
this.endDate = endDate;
}
/**
* 获取月份名称
*
* @return 如 "1 月"
*/
public String getMonthName() {
return month + "月";
}
@Override
public String toString() {
return String.format("%d 年 %d 月 [%s ~ %s]",
year, month, startDate, endDate);
}
}
\ No newline at end of file
package cn.com.glsx.dj.riskmanage.util.quarter;
import lombok.Getter;
/**
* 季度枚举定义
*/
@Getter
public enum QuarterEnum {
Q1(1, 3, "第一季度"),
Q2(4, 6, "第二季度"),
Q3(7, 9, "第三季度"),
Q4(10, 12, "第四季度");
private final int startMonth;
private final int endMonth;
private final String displayName;
QuarterEnum(int startMonth, int endMonth, String displayName) {
this.startMonth = startMonth;
this.endMonth = endMonth;
this.displayName = displayName;
}
/**
* 根据月份获取对应的季度
*/
public static QuarterEnum fromMonth(int month) {
if (month < 1 || month > 12) {
throw new IllegalArgumentException("Invalid month: " + month);
}
if (month >= 1 && month <= 3) return Q1;
if (month >= 4 && month <= 6) return Q2;
if (month >= 7 && month <= 9) return Q3;
return Q4;
}
/**
* 获取上一个季度
*/
public QuarterEnum getPrevious() {
QuarterEnum[] values = QuarterEnum.values();
int previousOrdinal = (this.ordinal() - 1 + values.length) % values.length;
return values[previousOrdinal];
}
/**
* 获取下一个季度
*/
public QuarterEnum getNext() {
QuarterEnum[] values = QuarterEnum.values();
int nextOrdinal = (this.ordinal() + 1) % values.length;
return values[nextOrdinal];
}
}
\ No newline at end of file
package cn.com.glsx.dj.riskmanage.util.quarter;
import lombok.Getter;
import java.util.List;
/**
* 季度信息封装类
*/
@Getter
public class QuarterInfo {
private final int year;
private final QuarterEnum quarter;
private final String startDate;
private final String endDate;
private final List<MonthInfo> monthList;
public QuarterInfo(int year, QuarterEnum quarter, String startDate, String endDate, List<MonthInfo> monthList) {
this.year = year;
this.quarter = quarter;
this.startDate = startDate;
this.endDate = endDate;
this.monthList = monthList;
}
/**
* 获取月份范围字符串
*
* @return 如 "1-3 月"
*/
public String getMonthRange() {
return String.format("%d-%d 月", quarter.getStartMonth(), quarter.getEndMonth());
}
/**
* 获取季度包含的月份数
*
* @return 月份数量(固定为 3)
*/
public int getMonthCount() {
return monthList != null ? monthList.size() : 0;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(String.format("%d 年 %s (%s)", year, quarter.getDisplayName(), getMonthRange()));
sb.append(String.format(" [%s ~ %s]", startDate, endDate));
if (monthList != null && !monthList.isEmpty()) {
sb.append("\n 包含月份:");
for (MonthInfo month : monthList) {
sb.append(String.format("\n - %d 月 [%s ~ %s]",
month.getMonth(),
month.getStartDate(),
month.getEndDate()));
}
}
return sb.toString();
}
}
\ No newline at end of file
package cn.com.glsx.dj.riskmanage.util.quarter;
import cn.hutool.core.date.DateUtil;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
/**
* 季度处理工具类 (基于 Date 类型)
* 支持获取季度的开始和结束时间,以及季度内每个月的起止时间
*
* @author Senior Java Developer
* @version 1.0
*/
public class QuarterUtils {
// 默认时区
private static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone("Asia/Shanghai");
// 私有构造器,防止实例化
private QuarterUtils() {
throw new UnsupportedOperationException("Utility class cannot be instantiated");
}
/**
* 获取当前时间的上一个季度信息
*
* @return 季度信息对象
*/
public static QuarterInfo getPreviousQuarter() {
return getPreviousQuarter(new Date());
}
/**
* 获取当前时间的上一个季度信息(指定时区)
*
* @param timeZone 时区
* @return 季度信息对象
*/
public static QuarterInfo getPreviousQuarter(TimeZone timeZone) {
return getPreviousQuarter(new Date(), timeZone);
}
/**
* 获取指定日期的上一个季度信息
*
* @param date 指定日期,不能为 null
* @return 季度信息对象
* @throws IllegalArgumentException 如果 date 为 null
*/
public static QuarterInfo getPreviousQuarter(Date date) {
return getPreviousQuarter(date, DEFAULT_TIME_ZONE);
}
/**
* 获取指定日期的上一个季度信息(指定时区)
*
* @param date 指定日期,不能为 null
* @param timeZone 时区,不能为 null
* @return 季度信息对象
* @throws IllegalArgumentException 如果 date 或 timeZone 为 null
*/
public static QuarterInfo getPreviousQuarter(Date date, TimeZone timeZone) {
if (date == null) {
throw new IllegalArgumentException("Date cannot be null");
}
if (timeZone == null) {
throw new IllegalArgumentException("TimeZone cannot be null");
}
Calendar calendar = Calendar.getInstance(timeZone);
calendar.setTime(date);
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH) + 1;
QuarterEnum currentQuarter = QuarterEnum.fromMonth(month);
QuarterEnum previousQuarterEnum = currentQuarter.getPrevious();
int previousYear = (currentQuarter == QuarterEnum.Q1) ? (year - 1) : year;
// 计算季度开始时间
Date startDate = getQuarterStartDate(previousYear, previousQuarterEnum, timeZone);
// 计算季度结束时间
Date endDate = getQuarterEndDate(previousYear, previousQuarterEnum, timeZone);
// 计算季度内各月信息
List<MonthInfo> monthList = getQuarterMonthList(previousYear, previousQuarterEnum, timeZone);
return new QuarterInfo(previousYear, previousQuarterEnum,
DateUtil.format(startDate, "yyyy-MM"),
DateUtil.format(endDate, "yyyy-MM"),
monthList);
}
/**
* 获取指定年份和季度的开始日期
*/
public static Date getQuarterStartDate(int year, QuarterEnum quarter) {
return getQuarterStartDate(year, quarter, DEFAULT_TIME_ZONE);
}
/**
* 获取指定年份和季度的开始日期(指定时区)
*/
public static Date getQuarterStartDate(int year, QuarterEnum quarter, TimeZone timeZone) {
Calendar calendar = Calendar.getInstance(timeZone);
calendar.set(year, quarter.getStartMonth() - 1, 1, 0, 0, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
/**
* 获取指定年份和季度的结束日期
*/
public static Date getQuarterEndDate(int year, QuarterEnum quarter) {
return getQuarterEndDate(year, quarter, DEFAULT_TIME_ZONE);
}
/**
* 获取指定年份和季度的结束日期(指定时区)
*/
public static Date getQuarterEndDate(int year, QuarterEnum quarter, TimeZone timeZone) {
Calendar calendar = Calendar.getInstance(timeZone);
calendar.set(year, quarter.getEndMonth() - 1, 1, 0, 0, 0); // Q4 时设置为 11,即 12 月
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); // 当月最后一天
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
return calendar.getTime();
}
/**
* 获取季度内所有月份的信息列表
*
* @param year 年份
* @param quarter 季度枚举
* @return 月份信息列表(按月份顺序)
*/
public static List<MonthInfo> getQuarterMonthList(int year, QuarterEnum quarter) {
return getQuarterMonthList(year, quarter, DEFAULT_TIME_ZONE);
}
/**
* 获取季度内所有月份的信息列表(指定时区)
*
* @param year 年份
* @param quarter 季度枚举
* @param timeZone 时区
* @return 月份信息列表(按月份顺序)
*/
public static List<MonthInfo> getQuarterMonthList(int year, QuarterEnum quarter, TimeZone timeZone) {
List<MonthInfo> monthList = new ArrayList<>();
for (int month = quarter.getStartMonth(); month <= quarter.getEndMonth(); month++) {
MonthInfo monthInfo = getMonthInfo(year, month, timeZone);
monthList.add(monthInfo);
}
return Collections.unmodifiableList(monthList);
}
/**
* 获取指定年月的详细信息
*
* @param year 年份
* @param month 月份 (1-12)
* @return 月份信息对象
*/
public static MonthInfo getMonthInfo(int year, int month) {
return getMonthInfo(year, month, DEFAULT_TIME_ZONE);
}
/**
* 获取指定年月的详细信息(指定时区)
*
* @param year 年份
* @param month 月份 (1-12)
* @param timeZone 时区
* @return 月份信息对象
*/
public static MonthInfo getMonthInfo(int year, int month, TimeZone timeZone) {
if (month < 1 || month > 12) {
throw new IllegalArgumentException("Invalid month: " + month);
}
Calendar calendar = Calendar.getInstance(timeZone);
// 月份开始时间:当月 1 号 00:00:00.000
calendar.set(year, month - 1, 1, 0, 0, 0);
calendar.set(Calendar.MILLISECOND, 0);
Date startDate = calendar.getTime();
// 月份结束时间:下月 1 号 00:00:00.000 减 1 毫秒
calendar.set(year, month, 1, 0, 0, 0);
calendar.add(Calendar.MILLISECOND, -1);
Date endDate = calendar.getTime();
return new MonthInfo(year, month, DateUtil.format(startDate, "yyyy-MM-dd"), DateUtil.format(endDate, "yyyy-MM-dd"));
}
/**
* 日期格式化工具(内部类)
*/
private static class DateUtils {
private static final java.text.SimpleDateFormat SDF =
new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public static String format(Date date) {
if (date == null) {
return "null";
}
synchronized (SDF) {
return SDF.format(date);
}
}
}
// ==========================================
// 测试 Main 方法
// ==========================================
public static void main(String[] args) {
System.out.println("========== 季度工具类完整测试 ==========\n");
// 场景 1: 当前时间
Date now = new Date();
QuarterInfo info1 = getPreviousQuarter(now);
System.out.println("【当前时间】" + DateUtils.format(now));
System.out.println(info1);
System.out.println();
// 场景 2: 第一季度 (2024-04-15) -> 上季度 2024 年 Q1
Date date2 = createDate(2024, 4, 15);
QuarterInfo info2 = getPreviousQuarter(date2);
System.out.println("【测试日期】" + DateUtils.format(date2));
System.out.println(info2);
System.out.println();
// 场景 3: 第二季度 (2023-05-20) -> 上季度 2023 年 Q1
Date date3 = createDate(2023, 5, 20);
QuarterInfo info3 = getPreviousQuarter(date3);
System.out.println("【测试日期】" + DateUtils.format(date3));
System.out.println(info3);
System.out.println();
// 场景 4: 单独获取月份信息
System.out.println("【单独获取月份信息】");
MonthInfo monthInfo = getMonthInfo(2023, 3);
System.out.println(monthInfo);
System.out.println();
// 场景 5: 获取季度月份列表
System.out.println("【获取 2023 年 Q1 月份列表】");
List<MonthInfo> monthList = getQuarterMonthList(2023, QuarterEnum.Q1);
for (MonthInfo m : monthList) {
System.out.println(" " + m);
}
System.out.println();
// 场景 6: 跨年度边界 (2024-01-01) -> 上季度 2023 年 Q4
Date date6 = createDate(2024, 1, 1);
QuarterInfo info6 = getPreviousQuarter(date6);
System.out.println("【测试日期】" + DateUtils.format(date6));
System.out.println(info6);
}
/**
* 辅助方法:创建 Date 对象
*/
private static Date createDate(int year, int month, int day) {
Calendar calendar = Calendar.getInstance(DEFAULT_TIME_ZONE);
calendar.set(year, month - 1, day, 0, 0, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
}
\ No newline at end of file
  • @wangxw1
    commented
    Master

    一、关键问题与优化建议(Top 3)

    1. RPC 接口层缺乏全局异常兜底(功能实现的正确性与健壮性)

    • 问题描述:在 DownloadReportRemoteImpl 中,reportExcelDownload 方法仅捕获了自定义异常 RpcServiceException。
    • 影响分析:RPC 服务提供方(Provider)如果在执行逻辑时抛出未预期的运行时异常(如 NullPointerException、IllegalArgumentException 等),异常会直接穿透到 Dubbo 框架层。这可能导致消费者(Consumer)收到反序列化错误或框架级异常,无法得到标准的 RpcResponse.error 响应,严重时甚至可能影响 Provider 线程池的稳定性。
    • 优化建议:增加对 Exception 的通用捕获兜底,确保所有异常都能被包装为标准的 RPC 响应对象返回。 java @Override public RpcResponse<ReportExcelDownloadDTO> reportExcelDownload(ReportExcelDownloadReqDTO reqDto) { try { return RpcResponse.success(downloadReportService.reportExcelDownload(reqDto)); } catch (RpcServiceException e) { log.error("报表下载业务异常: {}", e.getMessage(), e); return RpcResponse.error(e); } catch (Exception e) { log.error("报表下载发生未知异常: {}", e.getMessage(), e); // 假设 RpcResponse 有对应的错误码构造方式 return RpcResponse.error("500", "系统内部异常"); } }

    2. 生产环境代码中遗留测试方法(最佳实践与可维护性)

    • 问题描述:在 QuarterUtils 工具类的末尾,包含了一个长达 40 行的 public static void main(String[] args) 方法用于本地测试。
    • 影响分析:将测试逻辑硬编码在 src/main/java 的生产代码中不仅会增加无用的编译产物体积,还违反了工程规范。测试代码无法参与 CI/CD 的自动化测试流程,且随着后续代码迭代,main 方法中的测试逻辑极易过期失效。
    • 优化建议:将 main 方法中的测试逻辑迁移至 src/test/java 目录下,使用 JUnit 编写标准的单元测试,并结合 Assert 进行结果断言。

    3. 日期格式化存在性能隐患且存在“重复造轮子”(性能与最佳实践)

    • 问题描述:QuarterUtils 内部定义了私有类 DateUtils,使用 synchronized (SDF) 来保证 SimpleDateFormat 的线程安全;同时,类中包含大量原生的 Calendar 日期计算逻辑,但文件顶部已经引入了 cn.hutool.core.date.DateUtil。
    • 影响分析:synchronized (SDF) 在高并发场景下会导致线程阻塞,产生性能瓶颈。此外,Hutool 的 DateUtil 已经提供了完善的季度计算(如 beginOfQuarter、endOfQuarter)和线程安全的格式化方法,手动维护底层的 Calendar 计算不仅代码冗长,且容易出错。
    • 优化建议:
      1. 移除内部类 DateUtils,直接使用 DateUtil.formatDateTime(date) 或 Java 8 的 DateTimeFormatter。
      2. 建议重构 QuarterUtils,直接复用 Hutool 提供的日期计算 API,大幅精简代码。

    二、评分明细

    • 功能实现的正确性与健壮性(35/40分): 核心业务逻辑(季度枚举、时间计算等)基本正确。扣分项在于 RPC 接口的异常处理存在明显漏网之鱼,缺乏健壮的兜底机制。
    • 安全性与潜在风险(30/30分): 当前提交的代码主要为 DTO 定义、接口骨架和纯逻辑工具类,未见 SQL 注入、越权等安全风险。
    • 最佳实践与可维护性(14/20分): DTO 使用了 Lombok 注解,结构清晰。扣分项:1. 生产代码中混入 main 测试方法;2. ReportExcelDateInfoDTO 中的所有字段(包含时间、分数等)均声明为 String,虽然适配了 Excel 导出,但丧失了强类型约束;3. 未充分利用已引入的 Hutool 工具包。
    • 性能与资源利用(3/5分): 整体资源利用合理。扣分项在于使用 synchronized 锁住全局 SimpleDateFormat,在高并发下会有锁竞争的性能损耗。
    • 提交信息质量(3/5分): Commit message 格式规范且详细,但描述中提及的 DownloadReportController、EasyExcelUtil 等文件并不在本次 Diff 变更中,存在提交说明与实际代码不符的情况,可能对 Code Review 造成误导。

    三、总分

    总分:85分

Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!