|
@@ -14,6 +14,7 @@ import com.yohoufo.dal.order.model.BuyerOrderGoods; |
|
@@ -14,6 +14,7 @@ import com.yohoufo.dal.order.model.BuyerOrderGoods; |
14
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
14
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
15
|
import com.yohoufo.order.model.request.OrderListRequest;
|
15
|
import com.yohoufo.order.model.request.OrderListRequest;
|
16
|
import com.yohoufo.order.service.IOrderListService;
|
16
|
import com.yohoufo.order.service.IOrderListService;
|
|
|
17
|
+import org.apache.commons.collections.CollectionUtils;
|
17
|
import org.slf4j.Logger;
|
18
|
import org.slf4j.Logger;
|
18
|
import org.slf4j.LoggerFactory;
|
19
|
import org.slf4j.LoggerFactory;
|
19
|
import org.springframework.beans.factory.annotation.Autowired;
|
20
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -68,7 +69,10 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements |
|
@@ -68,7 +69,10 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements |
68
|
List<BuyerOrder> buyerOrderList = getOrderList(request.getUid(), statusQuery, offset, limit);
|
69
|
List<BuyerOrder> buyerOrderList = getOrderList(request.getUid(), statusQuery, offset, limit);
|
69
|
|
70
|
|
70
|
List<Long> orderCodeList = buyerOrderList.stream().map(BuyerOrder::getOrderCode).collect(Collectors.toList());
|
71
|
List<Long> orderCodeList = buyerOrderList.stream().map(BuyerOrder::getOrderCode).collect(Collectors.toList());
|
71
|
-
|
72
|
+ //TODO 可以提前计算 total offset limit三者之间的关系,减少一次网络I
|
|
|
73
|
+ if (CollectionUtils.isEmpty(orderCodeList)){
|
|
|
74
|
+ return respBuilder.build();
|
|
|
75
|
+ }
|
72
|
// buyer_order_goods ===> skup+商品成交价 1:1
|
76
|
// buyer_order_goods ===> skup+商品成交价 1:1
|
73
|
List<BuyerOrderGoods> buyerOrderGoodsList = getOrderGoodsList(request.getUid(), orderCodeList);
|
77
|
List<BuyerOrderGoods> buyerOrderGoodsList = getOrderGoodsList(request.getUid(), orderCodeList);
|
74
|
Map<Long, BuyerOrderGoods> buyerOrderGoodsMap = buyerOrderGoodsList.stream()
|
78
|
Map<Long, BuyerOrderGoods> buyerOrderGoodsMap = buyerOrderGoodsList.stream()
|