新增客服一键交接功能

This commit is contained in:
yml2213
2026-08-15 17:27:35 +08:00
parent d9f552577a
commit 4c1fe7439d
12 changed files with 437 additions and 1 deletions
+11
View File
@@ -15,6 +15,7 @@ var (
ErrChannelPaymentRequired = errors.New("channel payment required")
ErrOrderCannotCancel = errors.New("order cannot cancel")
ErrOrderCannotHandoff = errors.New("order cannot handoff")
ErrOrderCannotForceHandoff = errors.New("order cannot force handoff")
ErrOrderCannotResetHandoff = errors.New("order cannot reset handoff")
ErrOrderCannotReceive = errors.New("order cannot receive")
ErrOrderCannotReturn = errors.New("order cannot return")
@@ -233,6 +234,16 @@ func (s *Service) AdminPlatformHandoff(ctx context.Context, adminID uint64, orde
return s.repo.AdminPlatformHandoff(ctx, adminID, orderID, req, meta)
}
func (s *Service) AdminForceHandoff(ctx context.Context, adminID uint64, orderID uint64, req ForceHandoffRequest, meta AuditMeta) error {
if s.repo == nil {
return ErrDependencyUnavailable
}
if orderID == 0 || req.Reason == "" {
return ErrOrderCannotForceHandoff
}
return s.repo.AdminForceHandoff(ctx, adminID, orderID, req, meta)
}
func (s *Service) AdminPlatformCheckoutConfirm(ctx context.Context, adminID uint64, orderID uint64, req AdminActionRequest, meta AuditMeta) error {
if s.repo == nil {
return ErrDependencyUnavailable