checklist.md 2.4 KB

Checklist

安全性

  • UserSignScrmController.getIntegral 行 71 自赋值 Bug 已修复,改为从 getUserId() 获取
  • IntegralScrmController.getIntegralOrderById 已增加订单归属校验,非本人订单返回错误
  • StoreOrderScrmController.create 已增加 @RepeatSubmit 注解
  • StoreOrderScrmController.createMultiStore 已增加 @RepeatSubmit 注解
  • PayScrmController.hfPayNotify 已增加分布式锁,锁 key 基于订单号
  • PayScrmController.ybPayNotify 已增加分布式锁,锁 key 基于订单号

健壮性

  • UserSignScrmController.getUserSignuser.getIntegral() 已做 null 校验
  • IntegralScrmController.getUserSignuser.getIntegral() 的 NPE 风险已随重复方法删除消除
  • PayScrmController 所有 switch 语句已补充 default 分支并记录日志
  • CourseScrmController.getIntegral 参数已加 @Validated
  • CourseScrmController.getIntegralByH5Video 参数已加 @Validated

代码规范

  • IntegralScrmController 中重复的 getUserSignsign 方法已删除
  • 删除重复方法后,未使用的依赖注入已清理(3 个 Service + 2 个 import)
  • HuifuPayScrmController 被注释的 switch 死代码已删除
  • HuifuPayScrmController 未使用的依赖注入已清理(7 个 Service + 对应 import)
  • HuifuPayScrmController logger 已改为 @Slf4j
  • "store.sign" 配置 key 已抽取为常量 CONFIG_KEY_STORE_SIGN
  • PayScrmController 支付来源魔法值 1 已抽取为常量 PAY_SOURCE_ONLINE(4 处全部替换)
  • IntegralScrmController.getIntegralGoodsListgetIntegralGoodsById@Login 策略已确认(公开接口不加)

验证

  • UserSignScrmController 自赋值 Bug 已修复,NPE 已防护,常量已定义
  • IntegralScrmController IDOR 已修复,重复方法已删除,无用依赖已清理
  • StoreOrderScrmController 两个下单方法均已加 @RepeatSubmit
  • PayScrmController 两个单门店回调已加分布式锁,4 处 switch 均有 default,4 处魔法值已常量化
  • HuifuPayScrmController 死代码已清理,logger 已规范化,异常处理已增加
  • CourseScrmController 两个积分方法参数已加 @Validated
  • 改动后项目能正常编译(mvn compile)— 需在 Java 项目环境验证