fix left time of seller deliver
Showing
4 changed files
with
18 additions
and
14 deletions
@@ -114,7 +114,10 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements | @@ -114,7 +114,10 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements | ||
114 | OrderListInfo orderListInfo = new OrderListInfo(); | 114 | OrderListInfo orderListInfo = new OrderListInfo(); |
115 | Integer buyerUid; | 115 | Integer buyerUid; |
116 | Long orderCode; | 116 | Long orderCode; |
117 | + | ||
117 | orderListInfo.setUid(buyerUid=buyerOrder.getUid()); | 118 | orderListInfo.setUid(buyerUid=buyerOrder.getUid()); |
119 | + orderListInfo.setBuyerUid(buyerUid); | ||
120 | + orderListInfo.setSellerUid(buyerOrder.getSellerUid()); | ||
118 | orderListInfo.setOrderCode(orderCode=buyerOrder.getOrderCode()); | 121 | orderListInfo.setOrderCode(orderCode=buyerOrder.getOrderCode()); |
119 | orderListInfo.setRealPrice(buyerOrder.getAmount() == null ? "" : buyerOrder.getAmount().toPlainString()); | 122 | orderListInfo.setRealPrice(buyerOrder.getAmount() == null ? "" : buyerOrder.getAmount().toPlainString()); |
120 | // 订单中状态显示 | 123 | // 订单中状态显示 |
@@ -165,5 +168,5 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements | @@ -165,5 +168,5 @@ public abstract class AbsOrderListService extends AbsOrderViewService implements | ||
165 | return orderListInfo; | 168 | return orderListInfo; |
166 | } | 169 | } |
167 | 170 | ||
168 | - protected abstract void resetDynamicProporties(List<OrderListInfo> list); | 171 | + protected abstract void resetDynamicProporties(List<OrderListInfo> list,int type); |
169 | } | 172 | } |
@@ -90,7 +90,7 @@ public class BuyerOrderListServiceImpl extends AbsOrderListService implements IO | @@ -90,7 +90,7 @@ public class BuyerOrderListServiceImpl extends AbsOrderListService implements IO | ||
90 | } | 90 | } |
91 | 91 | ||
92 | @Override | 92 | @Override |
93 | - protected void resetDynamicProporties(List<OrderListInfo> list) { | 93 | + protected void resetDynamicProporties(List<OrderListInfo> list, int type) { |
94 | if(CollectionUtils.isNotEmpty(list)){ | 94 | if(CollectionUtils.isNotEmpty(list)){ |
95 | list.forEach(oli -> { | 95 | list.forEach(oli -> { |
96 | Integer leftTime = getLeftTime(TabType.BUY, oli.getUid(), oli.getOrderCode(), oli.getStatus(), | 96 | Integer leftTime = getLeftTime(TabType.BUY, oli.getUid(), oli.getOrderCode(), oli.getStatus(), |
@@ -290,7 +290,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -290,7 +290,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
290 | .total(orderListVo.getTotal()) | 290 | .total(orderListVo.getTotal()) |
291 | .pagetotal(orderListVo.getPagetotal()); | 291 | .pagetotal(orderListVo.getPagetotal()); |
292 | List<OrderListInfo> oliList = orderListVo.getOrderList(); | 292 | List<OrderListInfo> oliList = orderListVo.getOrderList(); |
293 | - buyerOrderListService.resetDynamicProporties(oliList); | 293 | + buyerOrderListService.resetDynamicProporties(oliList, request.getType()); |
294 | return respBuilder.data(oliList).build(); | 294 | return respBuilder.data(oliList).build(); |
295 | } | 295 | } |
296 | PageResp orderListInfoRsp = buyerOrderListService.getOrderList(request); | 296 | PageResp orderListInfoRsp = buyerOrderListService.getOrderList(request); |
@@ -75,7 +75,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde | @@ -75,7 +75,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde | ||
75 | .total(orderListVo.getTotal()) | 75 | .total(orderListVo.getTotal()) |
76 | .pagetotal(orderListVo.getPagetotal()); | 76 | .pagetotal(orderListVo.getPagetotal()); |
77 | List<OrderListInfo> oliList = orderListVo.getOrderList(); | 77 | List<OrderListInfo> oliList = orderListVo.getOrderList(); |
78 | - resetDynamicProporties(oliList); | 78 | + resetDynamicProporties(oliList, request.getType()); |
79 | return respBuilder.data(oliList).build(); | 79 | return respBuilder.data(oliList).build(); |
80 | } | 80 | } |
81 | PageResp orderListInfoRsp; | 81 | PageResp orderListInfoRsp; |
@@ -132,23 +132,24 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde | @@ -132,23 +132,24 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde | ||
132 | } | 132 | } |
133 | 133 | ||
134 | @Override | 134 | @Override |
135 | - protected void resetDynamicProporties(List<OrderListInfo> list) { | 135 | + protected void resetDynamicProporties(List<OrderListInfo> list, int type) { |
136 | if(CollectionUtils.isNotEmpty(list)){ | 136 | if(CollectionUtils.isNotEmpty(list)){ |
137 | list.forEach(oli -> { | 137 | list.forEach(oli -> { |
138 | if (oli.getStatus() == SkupStatus.CAN_NOT_SELL.getCode()){ | 138 | if (oli.getStatus() == SkupStatus.CAN_NOT_SELL.getCode()){ |
139 | oli.setLeftTime(calLeftTime(oli.getSecendLevelCreateTime())); | 139 | oli.setLeftTime(calLeftTime(oli.getSecendLevelCreateTime())); |
140 | } | 140 | } |
141 | - List<BuyerOrderGoods> bogList = buyerOrderGoodsMapper.selectBySkups(Arrays.asList(oli.getGoodsInfo().getSkup())); | ||
142 | - if (CollectionUtils.isNotEmpty(bogList)){ | ||
143 | - //存在时说明已经有买家下单 当前状态来自于买家订单 | ||
144 | - BuyerOrderGoods bog = bogList.get(0); | ||
145 | - int status = oli.getStatus(); | ||
146 | - Integer leftTime = getDeliverLeftTime(bog.getUid(), bog.getOrderCode(), status); | ||
147 | - if (leftTime != null) { | ||
148 | - oli.setLeftTime(leftTime); | 141 | + |
142 | + if(SellerOrderListType.WAITING_PAY.getType() == type) { | ||
143 | + BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(oli.getBuyerUid(), oli.getOrderCode()); | ||
144 | + if (Objects.nonNull(bog)) { | ||
145 | + //存在时说明已经有买家下单 当前状态来自于买家订单 | ||
146 | + int status = oli.getStatus(); | ||
147 | + Integer leftTime = getDeliverLeftTime(bog.getUid(), bog.getOrderCode(), status); | ||
148 | + if (leftTime != null) { | ||
149 | + oli.setLeftTime(leftTime); | ||
150 | + } | ||
149 | } | 151 | } |
150 | } | 152 | } |
151 | - | ||
152 | }); | 153 | }); |
153 | } | 154 | } |
154 | } | 155 | } |
-
Please register or login to post a comment