fix(tenant): 收紧双站后台边界并补齐货架管理
This commit is contained in:
@@ -171,6 +171,9 @@ func (r *Repository) AdminCreateByOrder(ctx context.Context, adminID uint64, ord
|
||||
if err := tx.Clauses(clause.Locking{Strength: "UPDATE"}).First(&order, orderID).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if !currentTenantCanAdminDisputeOrder(ctx, order.BuyerTenantID, order.DistributionSiteID) {
|
||||
return gorm.ErrRecordNotFound
|
||||
}
|
||||
if order.Status == "completed" || order.Status == "cancelled" || order.Status == "closed" {
|
||||
return ErrInvalidDispute
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user