This commit is contained in:
Mrx
2026-04-02 14:01:19 +08:00
parent e9fe7ac303
commit 65fdc9bf21

View File

@@ -944,6 +944,9 @@ func (s *CertificationApplicationServiceImpl) AdminApproveSubmitRecord(ctx conte
if err != nil { if err != nil {
return fmt.Errorf("获取提交记录失败: %w", err) return fmt.Errorf("获取提交记录失败: %w", err)
} }
if record.Status != "verified" {
return fmt.Errorf("该条提交记录未通过前置校验或已失败,无法审核通过")
}
cert, err := s.aggregateService.LoadCertificationByUserID(ctx, record.UserID) cert, err := s.aggregateService.LoadCertificationByUserID(ctx, record.UserID)
if err != nil { if err != nil {
return fmt.Errorf("加载认证信息失败: %w", err) return fmt.Errorf("加载认证信息失败: %w", err)
@@ -1022,6 +1025,9 @@ func (s *CertificationApplicationServiceImpl) AdminRejectSubmitRecord(ctx contex
if err != nil { if err != nil {
return fmt.Errorf("获取提交记录失败: %w", err) return fmt.Errorf("获取提交记录失败: %w", err)
} }
if record.Status != "verified" {
return fmt.Errorf("该条提交记录未通过前置校验或已失败,无法从后台拒绝(请查看历史失败原因)")
}
cert, err := s.aggregateService.LoadCertificationByUserID(ctx, record.UserID) cert, err := s.aggregateService.LoadCertificationByUserID(ctx, record.UserID)
if err != nil { if err != nil {
return fmt.Errorf("加载认证信息失败: %w", err) return fmt.Errorf("加载认证信息失败: %w", err)