支持客服主动发起申诉
This commit is contained in:
@@ -32,6 +32,16 @@ func (s *Service) Create(ctx context.Context, userID uint64, orderID uint64, req
|
||||
return s.repo.Create(ctx, userID, orderID, req)
|
||||
}
|
||||
|
||||
func (s *Service) AdminCreateByOrder(ctx context.Context, adminID uint64, orderID uint64, req AdminCreateRequest, meta AuditMeta) (*DisputeDTO, error) {
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
}
|
||||
if orderID == 0 || req.Type == "" || req.Description == "" || req.TargetRole == "" {
|
||||
return nil, ErrInvalidDispute
|
||||
}
|
||||
return s.repo.AdminCreateByOrder(ctx, adminID, orderID, req, meta)
|
||||
}
|
||||
|
||||
func (s *Service) ListForUser(ctx context.Context, userID uint64, page, pageSize int) (*PaginatedResult, error) {
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
|
||||
Reference in New Issue
Block a user