新增退款待审核角标提醒
This commit is contained in:
@@ -2,6 +2,8 @@ package order
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"hfb_sys/backend/internal/model"
|
||||
)
|
||||
|
||||
// ListPendingRefund 查询所有待客服审核退款的订单。
|
||||
@@ -26,3 +28,13 @@ func (r *Repository) ListPendingRefund(ctx context.Context) ([]OrderDTO, error)
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
// PendingRefundCount 返回待客服审核退款数量,用于后台导航角标。
|
||||
func (r *Repository) PendingRefundCount(ctx context.Context) (int64, error) {
|
||||
var count int64
|
||||
err := r.db.WithContext(ctx).
|
||||
Model(&model.RentalOrder{}).
|
||||
Where("refund_status = ?", refundStatusPendingReview).
|
||||
Count(&count).Error
|
||||
return count, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user