Commit 3c10dcf392c9d1a2175695edeff906580994bb0d
1 parent
542beaf4
【功能修复】MALL:管理后台,无法查询到订单的情况
Showing
1 changed file
with
4 additions
and
3 deletions
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,9 +91,10 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { | ||
| 91 | public PageResult<TradeOrderDO> getOrderPage(TradeOrderPageReqVO reqVO) { | 91 | public PageResult<TradeOrderDO> getOrderPage(TradeOrderPageReqVO reqVO) { |
| 92 | // 根据用户查询条件构建用户编号列表 | 92 | // 根据用户查询条件构建用户编号列表 |
| 93 | Set<Long> userIds = buildQueryConditionUserIds(reqVO); | 93 | Set<Long> userIds = buildQueryConditionUserIds(reqVO); |
| 94 | - if (CollUtil.isEmpty(userIds)) { // 没查询到用户,说明肯定也没他的订单 | 94 | + if (userIds == null) { // 没查询到用户,说明肯定也没他的订单 |
| 95 | return PageResult.empty(); | 95 | return PageResult.empty(); |
| 96 | } | 96 | } |
| 97 | + | ||
| 97 | // 分页查询 | 98 | // 分页查询 |
| 98 | return tradeOrderMapper.selectPage(reqVO, userIds); | 99 | return tradeOrderMapper.selectPage(reqVO, userIds); |
| 99 | } | 100 | } |
| @@ -122,11 +123,11 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { | @@ -122,11 +123,11 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { | ||
| 122 | public TradeOrderSummaryRespVO getOrderSummary(TradeOrderPageReqVO reqVO) { | 123 | public TradeOrderSummaryRespVO getOrderSummary(TradeOrderPageReqVO reqVO) { |
| 123 | // 根据用户查询条件构建用户编号列表 | 124 | // 根据用户查询条件构建用户编号列表 |
| 124 | Set<Long> userIds = buildQueryConditionUserIds(reqVO); | 125 | Set<Long> userIds = buildQueryConditionUserIds(reqVO); |
| 125 | - if (CollUtil.isEmpty(userIds)) { // 没查询到用户,说明肯定也没他的订单 | 126 | + if (userIds == null) { // 没查询到用户,说明肯定也没他的订单 |
| 126 | return new TradeOrderSummaryRespVO(); | 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 | TradeOrderSummaryRespVO vo = new TradeOrderSummaryRespVO().setAfterSaleCount(0L).setAfterSalePrice(0L); | 132 | TradeOrderSummaryRespVO vo = new TradeOrderSummaryRespVO().setAfterSaleCount(0L).setAfterSalePrice(0L); |
| 132 | for (Map<String, Object> map : list) { | 133 | for (Map<String, Object> map : list) { |