...
|
...
|
@@ -181,6 +181,8 @@ public class SkupListService { |
|
|
return respBuilder.build();
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 卖家(可以是入驻或非入驻的卖家)非入驻出售中的商品列表
|
|
|
* @param request
|
...
|
...
|
@@ -238,7 +240,7 @@ public class SkupListService { |
|
|
Integer uid = request.getUid();
|
|
|
boolean isEntry = userProxyService.isEntryShop(uid);
|
|
|
if (!isEntry){
|
|
|
logger.warn("getEntryGoodsSizeList not entry seller, req {}", request);
|
|
|
logger.warn("getQuickDeliverGoodsSizeList not entry seller, req {}", request);
|
|
|
return respBuilder.build();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -264,16 +266,15 @@ public class SkupListService { |
|
|
logger.warn("seller get order list SellerOrderGoods is empty,req {}", request);
|
|
|
return respBuilder.build();
|
|
|
}
|
|
|
final SellerType sellerType = SellerType.ENTRY;
|
|
|
Payment payment = Payment.WALLET;
|
|
|
List<OrderListInfo> orderListInfos = buildPrdSkuList(productId, sogList, sellerType, payment);
|
|
|
|
|
|
List<OrderListInfo> orderListInfos = buildEntryPrdSkuList(productId, sogList);
|
|
|
respBuilder.data(orderListInfos);
|
|
|
ProductInfo productInfo = buildProductInfo(uid, status, sogList, pageTotal);
|
|
|
respBuilder.productInfo(productInfo);
|
|
|
return respBuilder.build();
|
|
|
}
|
|
|
|
|
|
ProductInfo buildProductInfo(Integer uid, Integer status, List<SellerOrderGoods> sogList, int pageTotal){
|
|
|
public ProductInfo buildProductInfo(Integer uid, Integer status, List<SellerOrderGoods> sogList, int pageTotal){
|
|
|
ProductInfo productInfo = new ProductInfo();
|
|
|
SellerOrderGoods sog = sogList.get(0);
|
|
|
productInfo.setProductId(sog.getProductId());
|
...
|
...
|
@@ -417,13 +418,32 @@ public class SkupListService { |
|
|
return map;
|
|
|
}
|
|
|
|
|
|
public List<OrderListInfo> buildPrdSkuList(Integer productId, List<SellerOrderGoods> sogList){
|
|
|
|
|
|
private List<OrderListInfo> buildPrdSkuList(Integer productId,
|
|
|
List<SellerOrderGoods> sogList,
|
|
|
SellerType sellerType,
|
|
|
Payment payment){
|
|
|
|
|
|
Set<Integer> storageIds = sogList.parallelStream().map(SellerOrderGoods::getStorageId)
|
|
|
.collect(Collectors.toSet());
|
|
|
ProductProxyService.PrdPriceCollection ppc = productProxyService.getPrdPriceList(productId, storageIds);
|
|
|
List<GoodsInfo> goodsInfoList = ppc.getGoodsInfoList();
|
|
|
Map<Integer, GoodsInfo> storageIdGoodInfoMap = goodsInfoList.parallelStream()
|
|
|
.collect(Collectors.toMap(GoodsInfo::getStorageId, Function.identity()));
|
|
|
Map<Integer, StorageInfoResp> storageDataMap = ppc.getStorageDataMap();
|
|
|
|
|
|
Map<String, String> overPriceTipsMap = buildOverPriceTipsMap(storageIds, sogList, storageDataMap);
|
|
|
|
|
|
List<OrderListInfo> data ;
|
|
|
data = sogList.parallelStream()
|
|
|
.map(sog -> buildEntryOrderListInfo4Sku(sog, overPriceTipsMap, null, storageIdGoodInfoMap, null))
|
|
|
.filter(oli -> Objects.nonNull(oli))
|
|
|
.collect(Collectors.toList());
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
|
|
|
public List<OrderListInfo> buildEntryPrdSkuList(Integer productId,
|
|
|
List<SellerOrderGoods> sogList){
|
|
|
final SellerType sellerType = SellerType.ENTRY;
|
|
|
final Payment payment = Payment.WALLET;
|
|
|
Set<Integer> storageIds = sogList.parallelStream().map(SellerOrderGoods::getStorageId)
|
|
|
.collect(Collectors.toSet());
|
|
|
ProductProxyService.PrdPriceCollection ppc = productProxyService.getPrdPriceList(productId, storageIds);
|
...
|
...
|
@@ -436,7 +456,7 @@ public class SkupListService { |
|
|
|
|
|
List<OrderListInfo> data ;
|
|
|
data = sogList.parallelStream()
|
|
|
.map(sog -> buildOrderListInfo4Sku(sog, overPriceTipsMap, sellerType, storageIdGoodInfoMap, payment))
|
|
|
.map(sog -> buildEntryOrderListInfo4Sku(sog, overPriceTipsMap, sellerType, storageIdGoodInfoMap, payment))
|
|
|
.filter(oli -> Objects.nonNull(oli))
|
|
|
.collect(Collectors.toList());
|
|
|
return data;
|
...
|
...
|
@@ -523,17 +543,17 @@ public class SkupListService { |
|
|
return orderListInfo;
|
|
|
}
|
|
|
|
|
|
OrderListInfo buildOrderListInfo4Sku(SellerOrderGoods sellerOrderGoods,
|
|
|
Map<String, String> overPriceTipsMap,
|
|
|
SellerType sellerType,
|
|
|
Map<Integer, GoodsInfo> storageIdGoodInfoMap,
|
|
|
Payment payment) {
|
|
|
public OrderListInfo buildEntryOrderListInfo4Sku(SellerOrderGoods sellerOrderGoods,
|
|
|
Map<String, String> overPriceTipsMap,
|
|
|
SellerType sellerType,
|
|
|
Map<Integer, GoodsInfo> storageIdGoodInfoMap,
|
|
|
Payment payment) {
|
|
|
Integer uid;
|
|
|
OrderListInfo orderListInfo = new OrderListInfo();
|
|
|
orderListInfo.setUid(uid = sellerOrderGoods.getUid());
|
|
|
SkupStatus skupStatus = SkupStatus.getSkupStatus(sellerOrderGoods.getStatus());
|
|
|
if (skupStatus == null){
|
|
|
logger.warn("get seller Order List skupStatus not exist, uid is {}, orderCode is {}, status is {}",
|
|
|
logger.warn("buildEntryOrderListInfo4Sku seller Order List skupStatus not exist, uid is {}, orderCode is {}, status is {}",
|
|
|
uid, orderListInfo.getOrderCode(), sellerOrderGoods.getStatus());
|
|
|
return null;
|
|
|
}
|
...
|
...
|
@@ -548,6 +568,8 @@ public class SkupListService { |
|
|
.sellerType(sellerType).skupStatus(skupStatus)
|
|
|
.skupType(skupType).storageNum(storageNum)
|
|
|
.viewType(ViewType.LIST).build();
|
|
|
|
|
|
|
|
|
// 按钮显示
|
|
|
List<ButtonShowBo> buttons = sellerOrderViewService.getButtons(bsfc, 0);
|
|
|
orderListInfo.setButtons(buttons == null ? Lists.newArrayList() : new ArrayList<>(buttons));
|
...
|
...
|
@@ -711,4 +733,6 @@ public class SkupListService { |
|
|
|
|
|
return respBuilder.build();
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|