...
|
...
|
@@ -75,7 +75,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde |
|
|
.total(orderListVo.getTotal())
|
|
|
.pagetotal(orderListVo.getPagetotal());
|
|
|
List<OrderListInfo> oliList = orderListVo.getOrderList();
|
|
|
resetDynamicProporties(oliList);
|
|
|
resetDynamicProporties(oliList, request.getType());
|
|
|
return respBuilder.data(oliList).build();
|
|
|
}
|
|
|
PageResp orderListInfoRsp;
|
...
|
...
|
@@ -132,23 +132,24 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde |
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void resetDynamicProporties(List<OrderListInfo> list) {
|
|
|
protected void resetDynamicProporties(List<OrderListInfo> list, int type) {
|
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
|
list.forEach(oli -> {
|
|
|
if (oli.getStatus() == SkupStatus.CAN_NOT_SELL.getCode()){
|
|
|
oli.setLeftTime(calLeftTime(oli.getSecendLevelCreateTime()));
|
|
|
}
|
|
|
List<BuyerOrderGoods> bogList = buyerOrderGoodsMapper.selectBySkups(Arrays.asList(oli.getGoodsInfo().getSkup()));
|
|
|
if (CollectionUtils.isNotEmpty(bogList)){
|
|
|
//存在时说明已经有买家下单 当前状态来自于买家订单
|
|
|
BuyerOrderGoods bog = bogList.get(0);
|
|
|
int status = oli.getStatus();
|
|
|
Integer leftTime = getDeliverLeftTime(bog.getUid(), bog.getOrderCode(), status);
|
|
|
if (leftTime != null) {
|
|
|
oli.setLeftTime(leftTime);
|
|
|
|
|
|
if(SellerOrderListType.WAITING_PAY.getType() == type) {
|
|
|
BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(oli.getBuyerUid(), oli.getOrderCode());
|
|
|
if (Objects.nonNull(bog)) {
|
|
|
//存在时说明已经有买家下单 当前状态来自于买家订单
|
|
|
int status = oli.getStatus();
|
|
|
Integer leftTime = getDeliverLeftTime(bog.getUid(), bog.getOrderCode(), status);
|
|
|
if (leftTime != null) {
|
|
|
oli.setLeftTime(leftTime);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
});
|
|
|
}
|
|
|
}
|
...
|
...
|
|