Showing
1 changed file
with
13 additions
and
7 deletions
@@ -4,10 +4,7 @@ import com.yoho.error.ServiceError; | @@ -4,10 +4,7 @@ import com.yoho.error.ServiceError; | ||
4 | import com.yoho.error.exception.ServiceException; | 4 | import com.yoho.error.exception.ServiceException; |
5 | import com.yohobuy.ufo.model.order.bo.ButtonShowBo; | 5 | import com.yohobuy.ufo.model.order.bo.ButtonShowBo; |
6 | import com.yohobuy.ufo.model.order.bo.GoodsInfo; | 6 | import com.yohobuy.ufo.model.order.bo.GoodsInfo; |
7 | -import com.yohobuy.ufo.model.order.common.SellerOrderListType; | ||
8 | -import com.yohobuy.ufo.model.order.common.SellerOrderStatus; | ||
9 | -import com.yohobuy.ufo.model.order.common.SellerType; | ||
10 | -import com.yohobuy.ufo.model.order.common.SkupStatus; | 7 | +import com.yohobuy.ufo.model.order.common.*; |
11 | import com.yohobuy.ufo.model.order.bo.OrderInfo; | 8 | import com.yohobuy.ufo.model.order.bo.OrderInfo; |
12 | import com.yohobuy.ufo.model.order.constants.OrderConstant; | 9 | import com.yohobuy.ufo.model.order.constants.OrderConstant; |
13 | import com.yohobuy.ufo.model.order.resp.OrderListInfo; | 10 | import com.yohobuy.ufo.model.order.resp.OrderListInfo; |
@@ -30,6 +27,8 @@ import com.yohoufo.order.service.cache.OrderCacheService; | @@ -30,6 +27,8 @@ import com.yohoufo.order.service.cache.OrderCacheService; | ||
30 | import com.yohoufo.order.service.impl.processor.SellerOrderPrepareProcessor; | 27 | import com.yohoufo.order.service.impl.processor.SellerOrderPrepareProcessor; |
31 | import com.yohoufo.order.service.proxy.ProductProxyService; | 28 | import com.yohoufo.order.service.proxy.ProductProxyService; |
32 | import com.yohoufo.order.service.proxy.UserProxyService; | 29 | import com.yohoufo.order.service.proxy.UserProxyService; |
30 | +import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; | ||
31 | +import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta; | ||
33 | import lombok.extern.slf4j.Slf4j; | 32 | import lombok.extern.slf4j.Slf4j; |
34 | import org.apache.commons.collections.CollectionUtils; | 33 | import org.apache.commons.collections.CollectionUtils; |
35 | import org.slf4j.Logger; | 34 | import org.slf4j.Logger; |
@@ -153,14 +152,21 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde | @@ -153,14 +152,21 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde | ||
153 | void setAddressInfo(OrderListInfo orderListInfo) { | 152 | void setAddressInfo(OrderListInfo orderListInfo) { |
154 | 153 | ||
155 | } | 154 | } |
155 | + @Autowired | ||
156 | + private OrderCodeGenerator orderCodeGenerator; | ||
156 | 157 | ||
157 | @Override | 158 | @Override |
158 | protected void resetDynamicProporties(List<OrderListInfo> list, int type) { | 159 | protected void resetDynamicProporties(List<OrderListInfo> list, int type) { |
159 | if(CollectionUtils.isNotEmpty(list)){ | 160 | if(CollectionUtils.isNotEmpty(list)){ |
160 | list.forEach(oli -> { | 161 | list.forEach(oli -> { |
161 | - if (oli.getStatus() == SkupStatus.CAN_NOT_SELL.getCode()){ | ||
162 | - oli.setLeftTime(calLeftTime(OrderInfo.SELLER_PAY_TIMEOUT, oli.getSecendLevelCreateTime())); | ||
163 | - } | 162 | + long orderCode = oli.getOrderCode(); |
163 | + CodeMeta codeMeta = orderCodeGenerator.expId(orderCode); | ||
164 | + TabType tabType = TabType.SELL; | ||
165 | + Integer orderStatus = oli.getStatus(); | ||
166 | + if (codeMeta!=null && codeMeta.getType() == OrderCodeType.BUYER_TYPE.getType()){ | ||
167 | + tabType = TabType.BUY; | ||
168 | + } | ||
169 | + oli.setLeftTime(getPayLeftTime(tabType, orderStatus, oli.getSecendLevelCreateTime())); | ||
164 | 170 | ||
165 | if(SellerOrderListType.WAITING_PAY.getType() == type) { | 171 | if(SellerOrderListType.WAITING_PAY.getType() == type) { |
166 | BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(oli.getBuyerUid(), oli.getOrderCode()); | 172 | BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(oli.getBuyerUid(), oli.getOrderCode()); |
-
Please register or login to post a comment