Commit 3c10dcf392c9d1a2175695edeff906580994bb0d

Authored by YunaiV
1 parent 542beaf4

【功能修复】MALL:管理后台,无法查询到订单的情况

yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryServiceImpl.java
... ... @@ -91,9 +91,10 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
91 91 public PageResult<TradeOrderDO> getOrderPage(TradeOrderPageReqVO reqVO) {
92 92 // 根据用户查询条件构建用户编号列表
93 93 Set<Long> userIds = buildQueryConditionUserIds(reqVO);
94   - if (CollUtil.isEmpty(userIds)) { // 没查询到用户,说明肯定也没他的订单
  94 + if (userIds == null) { // 没查询到用户,说明肯定也没他的订单
95 95 return PageResult.empty();
96 96 }
  97 +
97 98 // 分页查询
98 99 return tradeOrderMapper.selectPage(reqVO, userIds);
99 100 }
... ... @@ -122,11 +123,11 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
122 123 public TradeOrderSummaryRespVO getOrderSummary(TradeOrderPageReqVO reqVO) {
123 124 // 根据用户查询条件构建用户编号列表
124 125 Set<Long> userIds = buildQueryConditionUserIds(reqVO);
125   - if (CollUtil.isEmpty(userIds)) { // 没查询到用户,说明肯定也没他的订单
  126 + if (userIds == null) { // 没查询到用户,说明肯定也没他的订单
126 127 return new TradeOrderSummaryRespVO();
127 128 }
128 129 // 查询每个售后状态对应的数量、金额
129   - List<Map<String, Object>> list = tradeOrderMapper.selectOrderSummaryGroupByRefundStatus(reqVO, null);
  130 + List<Map<String, Object>> list = tradeOrderMapper.selectOrderSummaryGroupByRefundStatus(reqVO, userIds);
130 131  
131 132 TradeOrderSummaryRespVO vo = new TradeOrderSummaryRespVO().setAfterSaleCount(0L).setAfterSalePrice(0L);
132 133 for (Map<String, Object> map : list) {
... ...