feat: add admin risk actions and arbitration settlement

This commit is contained in:
yml
2026-05-22 18:11:01 +08:00
parent dfe686ce0e
commit 55477d0ac6
26 changed files with 888 additions and 23 deletions
+20
View File
@@ -109,6 +109,26 @@ func (s *Service) HandoffRecordsAdmin(orderID uint64) ([]HandoffRecordDTO, error
return s.repo.HandoffRecordsAdmin(orderID)
}
func (s *Service) AdminClose(adminID uint64, orderID uint64, req AdminActionRequest, meta AuditMeta) error {
if s.repo == nil {
return ErrDependencyUnavailable
}
if orderID == 0 || req.Reason == "" {
return ErrOrderCannotComplete
}
return s.repo.AdminClose(adminID, orderID, req, meta)
}
func (s *Service) AdminMarkAbnormal(adminID uint64, orderID uint64, req AdminActionRequest, meta AuditMeta) error {
if s.repo == nil {
return ErrDependencyUnavailable
}
if orderID == 0 || req.Reason == "" {
return ErrOrderCannotComplete
}
return s.repo.AdminMarkAbnormal(adminID, orderID, req, meta)
}
func (s *Service) FindForUser(userID uint64, orderID uint64) (*OrderDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable