Commit d75d71d7d0e1308399d6e8d94acf30e2d834d622
1 parent
949fa225
1218 如果没查到用户也有可能是空结果集,不一定是null
Showing
1 changed file
with
2 additions
and
2 deletions
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderQueryServiceImpl.java
| @@ -91,7 +91,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { | @@ -91,7 +91,7 @@ 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 (userIds == null) { // 没查询到用户,说明肯定也没他的订单 | 94 | + if (CollUtil.isEmpty(userIds)) { // 没查询到用户,说明肯定也没他的订单 |
| 95 | return PageResult.empty(); | 95 | return PageResult.empty(); |
| 96 | } | 96 | } |
| 97 | // 分页查询 | 97 | // 分页查询 |
| @@ -122,7 +122,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { | @@ -122,7 +122,7 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { | ||
| 122 | public TradeOrderSummaryRespVO getOrderSummary(TradeOrderPageReqVO reqVO) { | 122 | public TradeOrderSummaryRespVO getOrderSummary(TradeOrderPageReqVO reqVO) { |
| 123 | // 根据用户查询条件构建用户编号列表 | 123 | // 根据用户查询条件构建用户编号列表 |
| 124 | Set<Long> userIds = buildQueryConditionUserIds(reqVO); | 124 | Set<Long> userIds = buildQueryConditionUserIds(reqVO); |
| 125 | - if (userIds == null) { // 没查询到用户,说明肯定也没他的订单 | 125 | + if (CollUtil.isEmpty(userIds)) { // 没查询到用户,说明肯定也没他的订单 |
| 126 | return new TradeOrderSummaryRespVO(); | 126 | return new TradeOrderSummaryRespVO(); |
| 127 | } | 127 | } |
| 128 | // 查询每个售后状态对应的数量、金额 | 128 | // 查询每个售后状态对应的数量、金额 |