Authored by chenchao

refund coupons use async method

... ... @@ -15,6 +15,7 @@ import lombok.Builder;
@AllArgsConstructor
public class BuyerRefundCouponEvent extends Event {
public enum BizCase{
PAY_TIME_OUT,
APPRAISE_FAIL,
APPRAISE_UNSURE,
SELLER_DELIVER_TIMEOUT,
... ...
... ... @@ -20,7 +20,6 @@ import com.yohoufo.order.constants.AlarmConfig;
import com.yohoufo.order.constants.CutomsClearanceFailType;
import com.yohoufo.order.event.*;
import com.yohoufo.order.model.PayRefundBo;
import com.yohoufo.order.model.bo.CouponBo;
import com.yohoufo.order.model.dto.BuyerPenaltyCalResult;
import com.yohoufo.order.model.request.PaymentRequest;
import com.yohoufo.order.model.request.TranseferCellNode;
... ... @@ -55,9 +54,7 @@ import java.util.List;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.locks.Lock;
import java.util.function.Consumer;
import java.util.function.Supplier;
import java.util.stream.Collectors;
/**
... ...
... ... @@ -466,7 +466,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
boolean isReturnSuccess = productProxyService.returnStorage(skup);
//如有用券则退券
buyerOrderCancelService.refundCouponIfNeed(buyerUid, orderCode);
buyerOrderCancelService.asyncRefundCoupon(buyerUid, orderCode, BuyerRefundCouponEvent.BizCase.PAY_TIME_OUT);
//
int sellerUid = dataNode.buyerOrderInDB.getSellerUid();
... ...