Files
junhong_cmp_fiber/internal/service/order/service.go
huang c5429e7287
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m5s
fix: 修复平台/超管用户订单列表查询为空的问题
Service 层无条件将空 buyer_type 和 0 buyer_id 写入查询过滤条件,
导致平台/超管用户查询时附加 WHERE buyer_type = '' AND buyer_id = 0,
与任何订单均不匹配,返回空列表。

修复方式:仅当 buyerType 非空且 buyerID 非零时才添加过滤条件,
平台/超管用户不限定买家范围,可查看全部订单。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 10:48:11 +08:00

73 KiB