Authored by LUOXC

去掉修复数据代码

1 package com.yohoufo.order.controller; 1 package com.yohoufo.order.controller;
2 2
3 -import com.yohobuy.ufo.model.order.bo.MerchantOrderAttachInfo;  
4 -import com.yohobuy.ufo.model.order.common.OrderStatus;  
5 -import com.yohobuy.ufo.model.order.constants.OrderConstant;  
6 -import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO;  
7 import com.yohoufo.common.ApiResponse; 3 import com.yohoufo.common.ApiResponse;
8 -import com.yohoufo.common.annotation.IgnoreSession;  
9 -import com.yohoufo.common.annotation.IgnoreSignature;  
10 -import com.yohoufo.common.annotation.InnerApi;  
11 -import com.yohoufo.dal.order.BuyerOrderGoodsMapper;  
12 -import com.yohoufo.dal.order.BuyerOrderMapper;  
13 -import com.yohoufo.dal.order.SellerOrderMapper;  
14 -import com.yohoufo.dal.order.model.BuyerOrder;  
15 -import com.yohoufo.dal.order.model.BuyerOrderGoods;  
16 -import com.yohoufo.dal.order.model.SellerOrder;  
17 -import com.yohoufo.dal.order.model.SellerWalletDetail;  
18 -import com.yohoufo.order.common.RefundCase;  
19 -import com.yohoufo.order.constants.AlarmConfig;  
20 -import com.yohoufo.order.event.BillLogEvent;  
21 -import com.yohoufo.order.event.BuyerRefundCouponEvent;  
22 -import com.yohoufo.order.model.request.OrderRequest;  
23 -import com.yohoufo.order.model.request.PaymentRequest;  
24 -import com.yohoufo.order.model.request.TransferMoneyRequest;  
25 -import com.yohoufo.order.service.IBuyerOrderService;  
26 -import com.yohoufo.order.service.impl.*;  
27 import com.yohoufo.order.service.pay.alipay.AlipayOuyinService; 4 import com.yohoufo.order.service.pay.alipay.AlipayOuyinService;
28 import lombok.Data; 5 import lombok.Data;
29 import lombok.extern.slf4j.Slf4j; 6 import lombok.extern.slf4j.Slf4j;
@@ -43,29 +20,7 @@ import java.util.stream.Collectors; @@ -43,29 +20,7 @@ import java.util.stream.Collectors;
43 public class OrderHelpController { 20 public class OrderHelpController {
44 21
45 @Autowired 22 @Autowired
46 - private TransferService transferService;  
47 -  
48 - @Autowired  
49 - private PaymentServiceImpl paymentService;  
50 -  
51 - @Autowired  
52 - AlipayOuyinService alipayService;  
53 -  
54 - @Autowired  
55 - IBuyerOrderService buyerOrderService;  
56 -  
57 - @Autowired  
58 - BuyerOrderCancelService buyerOrderCancelService;  
59 -  
60 - @Autowired  
61 - PayRefundService payRefundService;  
62 - @Autowired  
63 - private SellerOrderMapper sellerOrderMapper;  
64 - @Autowired  
65 - private BuyerOrderMapper buyerOrderMapper;  
66 -  
67 - @Autowired  
68 - private BuyerOrderGoodsMapper buyerOrderGoodsMapper; 23 + private AlipayOuyinService alipayService;
69 24
70 @Data 25 @Data
71 public static class RefundEarnestMoneyRequest { 26 public static class RefundEarnestMoneyRequest {
@@ -74,18 +29,6 @@ public class OrderHelpController { @@ -74,18 +29,6 @@ public class OrderHelpController {
74 private BigDecimal refundAmount; 29 private BigDecimal refundAmount;
75 } 30 }
76 31
77 - @IgnoreSession  
78 - @IgnoreSignature  
79 - @InnerApi  
80 - @RequestMapping(value = "/cancelForSellerSendOutTimeoutCompensation")  
81 - public ApiResponse refundEarnestMoney(@RequestBody OrderRequest request) {  
82 - buyerOrderCancelService.cancelForSellerSendOutTimeoutCompensation(request.getUid(), request.getOrderCode());  
83 - return new ApiResponse.ApiResponseBuilder()  
84 - .code(200)  
85 - .message("ok")  
86 - .build();  
87 - }  
88 -  
89 @RequestMapping(value = "/transferQueryAsOriginalResult") 32 @RequestMapping(value = "/transferQueryAsOriginalResult")
90 public ApiResponse transferQuery(@RequestBody List<String> orderCodes) { 33 public ApiResponse transferQuery(@RequestBody List<String> orderCodes) {
91 val result = orderCodes.stream().map(alipayService::transferQueryAsOriginalResult).collect(Collectors.toList()); 34 val result = orderCodes.stream().map(alipayService::transferQueryAsOriginalResult).collect(Collectors.toList());
@@ -106,28 +49,4 @@ public class OrderHelpController { @@ -106,28 +49,4 @@ public class OrderHelpController {
106 .build(); 49 .build();
107 } 50 }
108 51
109 - @IgnoreSession  
110 - @IgnoreSignature  
111 - @InnerApi  
112 - @RequestMapping(value = "/buyerCancel")  
113 - public ApiResponse buyerCancel(@RequestBody List<OrderRequest> orders) {  
114 - orders.stream().forEach(order -> {  
115 - try {  
116 - buyerOrderService.cancel(order);  
117 - } catch (Exception e) {  
118 - log.info("buyer Cancel fail {}", order, e);  
119 - }  
120 - sleep(200);  
121 - });  
122 - return new ApiResponse.ApiResponseBuilder().code(200).message("处理成功").build();  
123 - }  
124 -  
125 - private void sleep(long millis) {  
126 - try {  
127 - Thread.sleep(millis);  
128 - } catch (InterruptedException e) {  
129 -  
130 - }  
131 - }  
132 -  
133 } 52 }
@@ -274,35 +274,6 @@ public class BuyerOrderCancelService { @@ -274,35 +274,6 @@ public class BuyerOrderCancelService {
274 .cancel(); 274 .cancel();
275 } 275 }
276 276
277 -  
278 - /**  
279 - * 2020-03-13超时取消BUG修复数据使用  
280 - *  
281 - * @param uid  
282 - * @param orderCode  
283 - */  
284 - public void cancelForSellerSendOutTimeoutCompensation(int uid, long orderCode) {  
285 - new BuyerOrderCancelHandler(uid, orderCode)  
286 - .withBuyerOrderSupplier(buyerOrderMapper, buyerOrderGoodsMapper)  
287 - .withSellerOrderSupplier(sellerOrderGoodsMapper, sellerOrderMetaMapper)  
288 - // 超时未发货取消 -> 超时未发货取消  
289 - .withStateTransition(OrderStatus.SEND_OUT_TIMEOUT, OrderStatus.SEND_OUT_TIMEOUT, null)  
290 - // 保证金分账给平台和买家  
291 - .withTransferEarnestMoney2Buyer(transferService, SellerWalletDetail.Type.SELLER_OVER_TIME)  
292 - // 退买家货款  
293 - .withRefundGoodsMoney(payRefundService::refund).refundCase(RefundCase.BUYER_GOODS_MONEY).and()  
294 - // 通知卖家商品发货超时  
295 - .withNoticeSeller((soa, buyerOrder) -> sellerNoticeFacade.sellerDeliverWithTimes(soa, buyerOrder, OrderConstant.SellerDeliverNotice.TIME_OF_CANCELED, 0, null)).and()  
296 - // 通知买家卖家商品发货超时  
297 - .withNoticeBuyer(buyerNoticeFacade::noticeBuyerOfSellerSendOutTimeout).and()  
298 - // 退优惠券  
299 - .withRefundCoupon(BuyerRefundCouponEvent.BizCase.SELLER_DELIVER_TIMEOUT)  
300 - .withCacheCleaner(cacheCleaner::delete)  
301 - .withFailAlarm(AlarmConfig.DELIVER_TIME_OUT)  
302 - .withOrderChangeListenerContainer(orderChangeListenerContainer)  
303 - .cancel();  
304 - }  
305 -  
306 public void cancelForSellerShamSendOut(int uid, long orderCode, OrderStatus targetStatus) { 277 public void cancelForSellerShamSendOut(int uid, long orderCode, OrderStatus targetStatus) {
307 278
308 if (serviceOrderProcessor.isGoodsServiceOrder(orderCode)) { 279 if (serviceOrderProcessor.isGoodsServiceOrder(orderCode)) {