Authored by chenchao

change status start time when buyer paid bid-order

@@ -2,28 +2,27 @@ package com.yohoufo.order.service; @@ -2,28 +2,27 @@ package com.yohoufo.order.service;
2 2
3 import com.alibaba.fastjson.JSON; 3 import com.alibaba.fastjson.JSON;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
5 -import com.github.rholder.retry.*; 5 +import com.github.rholder.retry.Retryer;
  6 +import com.github.rholder.retry.RetryerBuilder;
  7 +import com.github.rholder.retry.StopStrategies;
  8 +import com.github.rholder.retry.WaitStrategies;
6 import com.yoho.error.ServiceError; 9 import com.yoho.error.ServiceError;
7 import com.yoho.error.exception.ServiceException; 10 import com.yoho.error.exception.ServiceException;
8 -import com.yoho.message.sdk.utils.DateUtils;  
9 import com.yohobuy.ufo.model.order.bo.OrderInfo; 11 import com.yohobuy.ufo.model.order.bo.OrderInfo;
10 -import com.yohobuy.ufo.model.order.common.*; 12 +import com.yohobuy.ufo.model.order.common.OrderAttributes;
  13 +import com.yohobuy.ufo.model.order.common.OrderCodeType;
  14 +import com.yohobuy.ufo.model.order.common.OrderStatus;
11 import com.yohobuy.ufo.model.order.constants.DepotType; 15 import com.yohobuy.ufo.model.order.constants.DepotType;
12 import com.yohobuy.ufo.model.order.constants.OrderConstant; 16 import com.yohobuy.ufo.model.order.constants.OrderConstant;
13 import com.yohobuy.ufo.model.order.constants.SkupType; 17 import com.yohobuy.ufo.model.order.constants.SkupType;
14 import com.yohobuy.ufo.model.order.req.SellerDeliverToDepotReq; 18 import com.yohobuy.ufo.model.order.req.SellerDeliverToDepotReq;
15 import com.yohoufo.common.alarm.EventBusPublisher; 19 import com.yohoufo.common.alarm.EventBusPublisher;
16 -import com.yohoufo.common.exception.UfoServiceException;  
17 import com.yohoufo.common.utils.DateUtil; 20 import com.yohoufo.common.utils.DateUtil;
18 -import com.yohoufo.common.utils.StringUtil;  
19 import com.yohoufo.dal.order.BuyerOrderGoodsMapper; 21 import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
20 import com.yohoufo.dal.order.BuyerOrderMapper; 22 import com.yohoufo.dal.order.BuyerOrderMapper;
21 import com.yohoufo.dal.order.BuyerOrderMetaMapper; 23 import com.yohoufo.dal.order.BuyerOrderMetaMapper;
22 import com.yohoufo.dal.order.SellerOrderGoodsMapper; 24 import com.yohoufo.dal.order.SellerOrderGoodsMapper;
23 import com.yohoufo.dal.order.model.*; 25 import com.yohoufo.dal.order.model.*;
24 -import com.yohoufo.dal.user.model.ZhiMaCert;  
25 -import com.yohoufo.order.constants.ClearanceFailType;  
26 -import com.yohoufo.order.constants.ClientSpecialSemanticCode;  
27 import com.yohoufo.order.constants.MetaKey; 26 import com.yohoufo.order.constants.MetaKey;
28 import com.yohoufo.order.event.DeliverNoticeEvent; 27 import com.yohoufo.order.event.DeliverNoticeEvent;
29 import com.yohoufo.order.event.ErpBuyerOrderEvent; 28 import com.yohoufo.order.event.ErpBuyerOrderEvent;
@@ -37,9 +36,6 @@ import com.yohoufo.order.service.cache.CacheCleaner; @@ -37,9 +36,6 @@ import com.yohoufo.order.service.cache.CacheCleaner;
37 import com.yohoufo.order.service.impl.*; 36 import com.yohoufo.order.service.impl.*;
38 import com.yohoufo.order.service.listener.BuyerOrderChangeEvent; 37 import com.yohoufo.order.service.listener.BuyerOrderChangeEvent;
39 import com.yohoufo.order.service.listener.OrderChangeListenerContainer; 38 import com.yohoufo.order.service.listener.OrderChangeListenerContainer;
40 -import com.yohoufo.order.service.pay.alipay.AlipayCrossBorderService;  
41 -import com.yohoufo.order.service.pay.alipay.bean.AlipayCustomsResponse;  
42 -import com.yohoufo.order.service.pay.alipay.bean.CustomsErrorMsg;  
43 import com.yohoufo.order.service.proxy.*; 39 import com.yohoufo.order.service.proxy.*;
44 import com.yohoufo.order.service.support.CustomsSupportService; 40 import com.yohoufo.order.service.support.CustomsSupportService;
45 import com.yohoufo.order.utils.BuyerOrderUtils; 41 import com.yohoufo.order.utils.BuyerOrderUtils;
@@ -58,7 +54,6 @@ import java.util.concurrent.Executors; @@ -58,7 +54,6 @@ import java.util.concurrent.Executors;
58 import java.util.concurrent.TimeUnit; 54 import java.util.concurrent.TimeUnit;
59 55
60 import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.judge_pass; 56 import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.judge_pass;
61 -import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_express_cause_pass;  
62 import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_receive; 57 import static com.yohobuy.ufo.model.order.common.EnumExpressDataOperateTransferCode.platform_receive;
63 import static com.yohobuy.ufo.model.order.common.EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER; 58 import static com.yohobuy.ufo.model.order.common.EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
64 59
@@ -119,21 +114,11 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -119,21 +114,11 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
119 FastDeliveryProxyService fastDeliveryProxyService; 114 FastDeliveryProxyService fastDeliveryProxyService;
120 115
121 @Autowired 116 @Autowired
122 - private AlipayCrossBorderService crossBorderService;  
123 -  
124 -  
125 - @Autowired  
126 BuyerOrderCancelService buyerOrderCancelService; 117 BuyerOrderCancelService buyerOrderCancelService;
127 118
128 -  
129 - @Autowired  
130 - private UserProxyService userProxyService;  
131 -  
132 @Autowired 119 @Autowired
133 CustomsSupportService customsSupportService; 120 CustomsSupportService customsSupportService;
134 121
135 -  
136 -  
137 private ExecutorService executors = Executors.newFixedThreadPool(1); 122 private ExecutorService executors = Executors.newFixedThreadPool(1);
138 123
139 Retryer<Object> retryer = RetryerBuilder.<Object>newBuilder() 124 Retryer<Object> retryer = RetryerBuilder.<Object>newBuilder()
@@ -194,8 +179,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -194,8 +179,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
194 179
195 // 用于控制并发更新的 180 // 用于控制并发更新的
196 buyerOrder.setOriginalStatus(orderInfo.getStatus()); 181 buyerOrder.setOriginalStatus(orderInfo.getStatus());
197 -  
198 - buyerOrder.setUpdateTime(DateUtil.getCurrentTimeSecond()); 182 + int cdt = DateUtil.getCurrentTimeSecond();
  183 + buyerOrder.setUpdateTime(cdt);
  184 + buyerOrder.setStatusStartTime(cdt);
199 int result = buyerOrderMapper.updateByOrderCode(buyerOrder); 185 int result = buyerOrderMapper.updateByOrderCode(buyerOrder);
200 // 186 //
201 if(result>0){ 187 if(result>0){