...
|
...
|
@@ -13,8 +13,10 @@ import com.yohoufo.common.cache.ControllerCacheAop; |
|
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
|
|
import com.yohoufo.common.exception.UfoServiceException;
|
|
|
import com.yohoufo.common.helper.ImageUrlAssist;
|
|
|
import com.yohoufo.dal.order.BuyerOrderMapper;
|
|
|
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.StorageDepositMapper;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.dal.order.model.StorageDeposit;
|
|
|
import com.yohoufo.dal.order.model.StorageDepositCount;
|
...
|
...
|
@@ -52,6 +54,9 @@ public class DepositServiceImpl implements DepositService { |
|
|
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderMapper buyerOrderMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private UfoServiceCaller ufoServiceCaller;
|
|
|
|
|
|
private static final int DEPOSIT_MAX_TIME = 45 * 24 * 60 * 60;
|
...
|
...
|
@@ -107,6 +112,8 @@ public class DepositServiceImpl implements DepositService { |
|
|
}
|
|
|
// 召回或者到期退回的
|
|
|
List<StorageDeposit> depositList = storageDepositMapper.queryUserDopositBack(uid, (page - 1) * limit, limit);
|
|
|
List<BuyerOrder> buyerGoodsList = buyerOrderMapper.selectByOrderCodes(depositList.stream().map(StorageDeposit::getOrderCode).collect(Collectors.toList()), null);
|
|
|
Map<Long, BuyerOrder> buyerGoodsMap = buyerGoodsList.stream().map(Function.identity()).collect(Collectors.toMap(BuyerOrder::getOrderCode, Function.identity()));
|
|
|
List<Integer> skupList = depositList.stream().map(StorageDeposit::getSkup).collect(Collectors.toList());
|
|
|
List<SellerOrderGoods> goodsList = sellerOrderGoodsMapper.selectBySkups(skupList);
|
|
|
Map<Integer, SellerOrderGoods> goodsMap = goodsList.stream().map(Function.identity()).collect(Collectors.toMap(SellerOrderGoods::getId, Function.identity()));
|
...
|
...
|
@@ -120,7 +127,10 @@ public class DepositServiceImpl implements DepositService { |
|
|
bo.setColorName(goods.getColorName());
|
|
|
bo.setSizeName(goods.getSizeName());
|
|
|
bo.setPic(ImageUrlAssist.getAllProductPicUrl(goods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
|
|
|
bo.setPrice(goods.getGoodsPrice().toString());
|
|
|
BuyerOrder buyerOrder = buyerGoodsMap.get(buyerGoodsMap.get(depo.getOrderCode()));
|
|
|
if (buyerOrder != null) {
|
|
|
bo.setPrice(buyerOrder.getAmount().toString());
|
|
|
}
|
|
|
bo.setDepositStatusName(getBackStatusName(depo.getStatus()));
|
|
|
bo.setDepositCode(depo.getDepositCode());
|
|
|
}
|
...
|
...
|
|