From b18f20dbe09483245ee30f28b6868bbeddaead54 Mon Sep 17 00:00:00 2001 From: liangzai <2440983361@qq.com> Date: Thu, 23 Oct 2025 21:24:46 +0800 Subject: [PATCH] fix --- .../api/internal/logic/query/querydetailbyorderidlogic.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/main/api/internal/logic/query/querydetailbyorderidlogic.go b/app/main/api/internal/logic/query/querydetailbyorderidlogic.go index 281aa2b..9598e7d 100644 --- a/app/main/api/internal/logic/query/querydetailbyorderidlogic.go +++ b/app/main/api/internal/logic/query/querydetailbyorderidlogic.go @@ -57,8 +57,11 @@ func (l *QueryDetailByOrderIdLogic) QueryDetailByOrderId(req *types.QueryDetailB return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "报告查询, 查找用户错误: %+v", err) } // 安全验证:确保订单属于当前用户 - if user.Inside != 1 && order.UserId != userId { - return nil, errors.Wrapf(xerr.NewErrCode(xerr.LOGIC_QUERY_NOT_FOUND), "无权查看此订单报告") + // 如果用户是内部用户(Inside==1),无需校验订单归属 + if user.Inside != 1 { + if order.UserId != userId { + return nil, errors.Wrapf(xerr.NewErrCode(xerr.LOGIC_QUERY_NOT_FOUND), "无权查看此订单报告") + } } // 创建渐进式延迟策略实例 progressiveDelayOrder, err := delay.New(200*time.Millisecond, 3*time.Second, 10*time.Second, 1.5)