...
|
...
|
@@ -22,13 +22,11 @@ import com.yohoufo.order.constants.AlarmConfig; |
|
|
import com.yohoufo.order.event.BillLogEvent;
|
|
|
import com.yohoufo.order.event.ErpCancelSellerOrderEvent;
|
|
|
import com.yohoufo.order.event.OrderCancelEvent;
|
|
|
import com.yohoufo.order.model.AddressInfo;
|
|
|
import com.yohoufo.order.model.PayRefundBo;
|
|
|
import com.yohoufo.order.model.request.PaymentRequest;
|
|
|
import com.yohoufo.order.model.request.TransferMoneyRequest;
|
|
|
import com.yohoufo.order.mq.TopicConstants;
|
|
|
import com.yohoufo.order.mq.producer.TradeMqSender;
|
|
|
import com.yohoufo.order.service.IPaymentService;
|
|
|
import com.yohoufo.order.service.cache.CacheCleaner;
|
|
|
import com.yohoufo.order.service.cache.CacheKeyBuilder;
|
|
|
import com.yohoufo.order.service.impl.visitor.AutoCancelCase;
|
...
|
...
|
@@ -39,7 +37,6 @@ import com.yohoufo.order.service.proxy.ProductProxyService; |
|
|
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
|
|
|
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
|
|
|
import com.yohoufo.order.utils.LoggerUtils;
|
|
|
import com.yohoufo.order.utils.SmsHelper;
|
|
|
import lombok.experimental.Builder;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -69,9 +66,6 @@ public class SellerOrderCancelService { |
|
|
private TradeMqSender tradeMqSender;
|
|
|
|
|
|
@Autowired
|
|
|
private IPaymentService paymentService;
|
|
|
|
|
|
@Autowired
|
|
|
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -83,7 +77,6 @@ public class SellerOrderCancelService { |
|
|
@Autowired
|
|
|
private OrderCodeGenerator orderCodeGenerator;
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
private InBoxFacade inBoxFacade;
|
|
|
|
...
|
...
|
@@ -91,7 +84,7 @@ public class SellerOrderCancelService { |
|
|
private TransferService transferService;
|
|
|
|
|
|
@Autowired
|
|
|
private SellerAddressService sellerAddressService;
|
|
|
private PayRefundService payRefundService;
|
|
|
|
|
|
/**
|
|
|
* TODO 如何控制好并发,必须控制不能重复转账 退款
|
...
|
...
|
@@ -247,10 +240,6 @@ public class SellerOrderCancelService { |
|
|
logger.warn("in seller cancel before Buy Action syncSkup fail, uid {}, skup {}", uid, skup, ex);
|
|
|
}
|
|
|
|
|
|
//TODO 1. cache goods 2. async execute msg
|
|
|
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
inBoxFacade.sellerPlaySelf(uid,psog.getProductName());
|
|
|
|
|
|
cacheCleaner.cleanList(uid, TabType.SELL.getValue());
|
|
|
cacheCleaner.cleanDetail(uid, orderCode, TabType.SELL);
|
|
|
}
|
...
|
...
|
@@ -288,6 +277,9 @@ public class SellerOrderCancelService { |
|
|
.sellerUid(sellerUid).orderCode(orderCode)
|
|
|
.payType(sellerOrder.getPayment()).refundCase(RefundCase.SELLER_EARNEST_MONEY)
|
|
|
.skup(skup);
|
|
|
//TODO 1. cache goods 2. async execute msg
|
|
|
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
inBoxFacade.sellerPlaySelf(sellerUid, psog.getProductName());
|
|
|
try {
|
|
|
payRefundService.refund(refundReq, bleb);
|
|
|
logger.info("in cancelAfterPayButNotBuyAction, refund earnestMoney finish, seller {}, order code {}, skup {}, earnestMoney {}",
|
...
|
...
|
@@ -306,8 +298,7 @@ public class SellerOrderCancelService { |
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
|
private PayRefundService payRefundService;
|
|
|
|
|
|
|
|
|
private int cancelAfterPayExistBuyAction(SellerOrder sellerOrder, BuyerOrder buyerOrder){
|
|
|
/**
|
...
|
...
|
|