|
@@ -22,13 +22,11 @@ import com.yohoufo.order.constants.AlarmConfig; |
|
@@ -22,13 +22,11 @@ import com.yohoufo.order.constants.AlarmConfig; |
22
|
import com.yohoufo.order.event.BillLogEvent;
|
22
|
import com.yohoufo.order.event.BillLogEvent;
|
23
|
import com.yohoufo.order.event.ErpCancelSellerOrderEvent;
|
23
|
import com.yohoufo.order.event.ErpCancelSellerOrderEvent;
|
24
|
import com.yohoufo.order.event.OrderCancelEvent;
|
24
|
import com.yohoufo.order.event.OrderCancelEvent;
|
25
|
-import com.yohoufo.order.model.AddressInfo;
|
|
|
26
|
import com.yohoufo.order.model.PayRefundBo;
|
25
|
import com.yohoufo.order.model.PayRefundBo;
|
27
|
import com.yohoufo.order.model.request.PaymentRequest;
|
26
|
import com.yohoufo.order.model.request.PaymentRequest;
|
28
|
import com.yohoufo.order.model.request.TransferMoneyRequest;
|
27
|
import com.yohoufo.order.model.request.TransferMoneyRequest;
|
29
|
import com.yohoufo.order.mq.TopicConstants;
|
28
|
import com.yohoufo.order.mq.TopicConstants;
|
30
|
import com.yohoufo.order.mq.producer.TradeMqSender;
|
29
|
import com.yohoufo.order.mq.producer.TradeMqSender;
|
31
|
-import com.yohoufo.order.service.IPaymentService;
|
|
|
32
|
import com.yohoufo.order.service.cache.CacheCleaner;
|
30
|
import com.yohoufo.order.service.cache.CacheCleaner;
|
33
|
import com.yohoufo.order.service.cache.CacheKeyBuilder;
|
31
|
import com.yohoufo.order.service.cache.CacheKeyBuilder;
|
34
|
import com.yohoufo.order.service.impl.visitor.AutoCancelCase;
|
32
|
import com.yohoufo.order.service.impl.visitor.AutoCancelCase;
|
|
@@ -39,7 +37,6 @@ import com.yohoufo.order.service.proxy.ProductProxyService; |
|
@@ -39,7 +37,6 @@ import com.yohoufo.order.service.proxy.ProductProxyService; |
39
|
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
|
37
|
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
|
40
|
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
|
38
|
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
|
41
|
import com.yohoufo.order.utils.LoggerUtils;
|
39
|
import com.yohoufo.order.utils.LoggerUtils;
|
42
|
-import com.yohoufo.order.utils.SmsHelper;
|
|
|
43
|
import lombok.experimental.Builder;
|
40
|
import lombok.experimental.Builder;
|
44
|
import org.slf4j.Logger;
|
41
|
import org.slf4j.Logger;
|
45
|
import org.springframework.beans.factory.annotation.Autowired;
|
42
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -69,9 +66,6 @@ public class SellerOrderCancelService { |
|
@@ -69,9 +66,6 @@ public class SellerOrderCancelService { |
69
|
private TradeMqSender tradeMqSender;
|
66
|
private TradeMqSender tradeMqSender;
|
70
|
|
67
|
|
71
|
@Autowired
|
68
|
@Autowired
|
72
|
- private IPaymentService paymentService;
|
|
|
73
|
-
|
|
|
74
|
- @Autowired
|
|
|
75
|
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
69
|
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
76
|
|
70
|
|
77
|
@Autowired
|
71
|
@Autowired
|
|
@@ -83,7 +77,6 @@ public class SellerOrderCancelService { |
|
@@ -83,7 +77,6 @@ public class SellerOrderCancelService { |
83
|
@Autowired
|
77
|
@Autowired
|
84
|
private OrderCodeGenerator orderCodeGenerator;
|
78
|
private OrderCodeGenerator orderCodeGenerator;
|
85
|
|
79
|
|
86
|
-
|
|
|
87
|
@Autowired
|
80
|
@Autowired
|
88
|
private InBoxFacade inBoxFacade;
|
81
|
private InBoxFacade inBoxFacade;
|
89
|
|
82
|
|
|
@@ -91,7 +84,7 @@ public class SellerOrderCancelService { |
|
@@ -91,7 +84,7 @@ public class SellerOrderCancelService { |
91
|
private TransferService transferService;
|
84
|
private TransferService transferService;
|
92
|
|
85
|
|
93
|
@Autowired
|
86
|
@Autowired
|
94
|
- private SellerAddressService sellerAddressService;
|
87
|
+ private PayRefundService payRefundService;
|
95
|
|
88
|
|
96
|
/**
|
89
|
/**
|
97
|
* TODO 如何控制好并发,必须控制不能重复转账 退款
|
90
|
* TODO 如何控制好并发,必须控制不能重复转账 退款
|
|
@@ -247,10 +240,6 @@ public class SellerOrderCancelService { |
|
@@ -247,10 +240,6 @@ public class SellerOrderCancelService { |
247
|
logger.warn("in seller cancel before Buy Action syncSkup fail, uid {}, skup {}", uid, skup, ex);
|
240
|
logger.warn("in seller cancel before Buy Action syncSkup fail, uid {}, skup {}", uid, skup, ex);
|
248
|
}
|
241
|
}
|
249
|
|
242
|
|
250
|
- //TODO 1. cache goods 2. async execute msg
|
|
|
251
|
- SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
252
|
- inBoxFacade.sellerPlaySelf(uid,psog.getProductName());
|
|
|
253
|
-
|
|
|
254
|
cacheCleaner.cleanList(uid, TabType.SELL.getValue());
|
243
|
cacheCleaner.cleanList(uid, TabType.SELL.getValue());
|
255
|
cacheCleaner.cleanDetail(uid, orderCode, TabType.SELL);
|
244
|
cacheCleaner.cleanDetail(uid, orderCode, TabType.SELL);
|
256
|
}
|
245
|
}
|
|
@@ -288,6 +277,9 @@ public class SellerOrderCancelService { |
|
@@ -288,6 +277,9 @@ public class SellerOrderCancelService { |
288
|
.sellerUid(sellerUid).orderCode(orderCode)
|
277
|
.sellerUid(sellerUid).orderCode(orderCode)
|
289
|
.payType(sellerOrder.getPayment()).refundCase(RefundCase.SELLER_EARNEST_MONEY)
|
278
|
.payType(sellerOrder.getPayment()).refundCase(RefundCase.SELLER_EARNEST_MONEY)
|
290
|
.skup(skup);
|
279
|
.skup(skup);
|
|
|
280
|
+ //TODO 1. cache goods 2. async execute msg
|
|
|
281
|
+ SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
282
|
+ inBoxFacade.sellerPlaySelf(sellerUid, psog.getProductName());
|
291
|
try {
|
283
|
try {
|
292
|
payRefundService.refund(refundReq, bleb);
|
284
|
payRefundService.refund(refundReq, bleb);
|
293
|
logger.info("in cancelAfterPayButNotBuyAction, refund earnestMoney finish, seller {}, order code {}, skup {}, earnestMoney {}",
|
285
|
logger.info("in cancelAfterPayButNotBuyAction, refund earnestMoney finish, seller {}, order code {}, skup {}, earnestMoney {}",
|
|
@@ -306,8 +298,7 @@ public class SellerOrderCancelService { |
|
@@ -306,8 +298,7 @@ public class SellerOrderCancelService { |
306
|
return result;
|
298
|
return result;
|
307
|
}
|
299
|
}
|
308
|
|
300
|
|
309
|
- @Autowired
|
|
|
310
|
- private PayRefundService payRefundService;
|
301
|
+
|
311
|
|
302
|
|
312
|
private int cancelAfterPayExistBuyAction(SellerOrder sellerOrder, BuyerOrder buyerOrder){
|
303
|
private int cancelAfterPayExistBuyAction(SellerOrder sellerOrder, BuyerOrder buyerOrder){
|
313
|
/**
|
304
|
/**
|