越权问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m14s

This commit is contained in:
2026-07-28 18:44:39 +08:00
parent dc080436bf
commit b3a215b19e
4 changed files with 22 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ func (q *PaymentStatusQuery) Get(ctx context.Context, rechargeID uint) (*dto.Age
return nil, errors.New(errors.CodeInvalidParam, "代理充值支付状态查询参数无效")
}
var recharge model.AgentRechargeRecord
rechargeQuery := middleware.ApplyShopFilter(ctx, q.db.WithContext(ctx).Model(&model.AgentRechargeRecord{}))
rechargeQuery := middleware.ApplyStrictShopFilter(ctx, q.db.WithContext(ctx).Model(&model.AgentRechargeRecord{}))
if err := rechargeQuery.Where("id = ?", rechargeID).First(&recharge).Error; err != nil {
if err == gorm.ErrRecordNotFound {
return nil, errors.New(errors.CodeForbidden, "无权限操作该资源或资源不存在")