...
|
...
|
@@ -15,13 +15,15 @@ import com.yohoufo.common.alarm.SmsAlarmEvent; |
|
|
import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.model.*;
|
|
|
import com.yohoufo.order.common.RefundCase;
|
|
|
import com.yohoufo.order.constants.ActivityTypeEnum;
|
|
|
import com.yohoufo.order.constants.MetaKey;
|
|
|
import com.yohoufo.order.event.BillLogEvent;
|
|
|
import com.yohoufo.order.model.PayRefundBo;
|
|
|
import com.yohoufo.order.model.bo.ActivityBo;
|
|
|
import com.yohoufo.order.model.bo.BidOrderMetaBo;
|
|
|
import com.yohoufo.order.model.request.PaymentRequest;
|
|
|
import com.yohoufo.order.service.IPaymentService;
|
|
|
import com.yohoufo.order.service.impl.PayRefundService;
|
|
|
import com.yohoufo.order.service.listener.BuyerOrderChangeEvent;
|
|
|
import com.yohoufo.order.service.proxy.BargainProxyService;
|
|
|
import com.yohoufo.order.service.proxy.BaseServiceCaller;
|
...
|
...
|
@@ -32,11 +34,13 @@ import com.yohoufo.order.service.stats.impl.SellerOrderStatsEntry; |
|
|
import com.yohoufo.order.service.support.BuyerOrderMetaMapperSupport;
|
|
|
import com.yohoufo.order.utils.LoggerUtils;
|
|
|
import com.yohoufo.order.utils.RetryerUtils;
|
|
|
import lombok.val;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
...
|
...
|
@@ -78,7 +82,7 @@ public class BuyerOrderChangeBusinessPostProcessor { |
|
|
private SellerService sellerService;
|
|
|
|
|
|
@Autowired
|
|
|
private IPaymentService paymentService;
|
|
|
private PayRefundService payRefundService;
|
|
|
|
|
|
@Autowired
|
|
|
private StatsConfigManager<SellerOrderStatsEntry, SellerOrderStatsConfiguration> statsConfigurationManager;
|
...
|
...
|
@@ -319,17 +323,26 @@ public class BuyerOrderChangeBusinessPostProcessor { |
|
|
private void refundBidDeposit(BuyerOrder buyerOrder) {
|
|
|
int uid = buyerOrder.getUid();
|
|
|
long orderCode = buyerOrder.getOrderCode();
|
|
|
double refundAmount = getDepositAmount(buyerOrder);
|
|
|
PaymentRequest paymentRequest = PaymentRequest.builder()
|
|
|
.uid(uid)
|
|
|
.refundCase(SELLER_EARNEST_MONEY)
|
|
|
.orderCode(orderCode)
|
|
|
.payLevel(OrderConstant.PAY_LEVEL_DEPOSIT)
|
|
|
.refundAmount(getDepositAmount(buyerOrder))
|
|
|
.refundAmount(refundAmount)
|
|
|
.refundattch(MerchantOrderAttachInfo.builder().type(SellerWalletDetail.Type.BID_DEPOSIT.getValue()).build())
|
|
|
.build();
|
|
|
|
|
|
val billLogEventBuilder = BillLogEvent.builder()
|
|
|
.buyerUid(uid)
|
|
|
.orderCode(orderCode)
|
|
|
.payType(buyerOrder.getPayment())
|
|
|
.refundCase(RefundCase.BID_DEPOSIT_MONEY)
|
|
|
.amount(BigDecimal.valueOf(refundAmount))
|
|
|
.payLevel(OrderConstant.PAY_LEVEL_DEPOSIT);
|
|
|
|
|
|
logger.info("[{}] refund deposit,paymentRequest:{}", orderCode, paymentRequest);
|
|
|
PayRefundBo payRefundBo = paymentService.refund(paymentRequest);
|
|
|
PayRefundBo payRefundBo = payRefundService.refund(paymentRequest, billLogEventBuilder);
|
|
|
logger.info("[{}] refund deposit end,result:{}", buyerOrder.getOrderCode(), payRefundBo);
|
|
|
}
|
|
|
|
...
|
...
|
|