fix(order): 支持客服跨站处理订单与退款
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
// ListPendingRefund 查询所有待客服审核退款的订单。
|
||||
func (r *Repository) ListPendingRefund(ctx context.Context) ([]OrderDTO, error) {
|
||||
var rows []orderRow
|
||||
err := applyBuyerTenantOrderScope(r.adminQuery(ctx), ctx).
|
||||
err := applyTenantOrderScope(r.adminQuery(ctx), ctx).
|
||||
Where("o.refund_status = ?", refundStatusPendingReview).
|
||||
Order("o.updated_at ASC, o.id ASC").
|
||||
Limit(200).
|
||||
@@ -34,7 +34,7 @@ func (r *Repository) PendingRefundCount(ctx context.Context) (int64, error) {
|
||||
query := r.db.WithContext(ctx).
|
||||
Table("rental_orders AS o").
|
||||
Where("refund_status = ?", refundStatusPendingReview)
|
||||
query = applyBuyerTenantOrderScope(query, ctx)
|
||||
query = applyTenantOrderScope(query, ctx)
|
||||
err := query.Count(&count).Error
|
||||
return count, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user