...
|
...
|
@@ -8,9 +8,7 @@ import com.yoho.error.exception.ServiceException; |
|
|
import com.yoho.tools.common.beans.ApiResponse;
|
|
|
import com.yohobuy.ufo.model.order.bo.MerchantOrderAttachInfo;
|
|
|
import com.yohobuy.ufo.model.order.bo.OrderInfo;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderAttributes;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderCodeType;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
|
|
import com.yohobuy.ufo.model.order.constants.OrderConstant;
|
|
|
import com.yohobuy.ufo.model.order.req.ManualDealRequest;
|
|
|
import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO;
|
...
|
...
|
@@ -19,7 +17,6 @@ import com.yohoufo.common.caller.UfoServiceCaller; |
|
|
import com.yohoufo.common.utils.TimeUtils;
|
|
|
import com.yohoufo.dal.order.*;
|
|
|
import com.yohoufo.dal.order.model.*;
|
|
|
import com.yohoufo.order.common.BillTradeStatus;
|
|
|
import com.yohoufo.order.common.Payment;
|
|
|
import com.yohoufo.order.common.TransferCase;
|
|
|
import com.yohoufo.order.constants.RefundContant;
|
...
|
...
|
@@ -38,8 +35,6 @@ import com.yohoufo.order.service.MerchantOrderPaymentService; |
|
|
import com.yohoufo.order.service.SellerOrderPaymentService;
|
|
|
import com.yohoufo.order.service.handler.BuyerCancelCompensateComputeHandler;
|
|
|
import com.yohoufo.order.service.handler.BuyerOrderPayDiffTimeHandler;
|
|
|
import com.yohoufo.order.service.handler.penalty.PenaltyResult;
|
|
|
import com.yohoufo.order.service.handler.penalty.SellerEarnestMoney2BuyerPenaltyCalculator;
|
|
|
import com.yohoufo.order.service.pay.AbstractPayService;
|
|
|
import com.yohoufo.order.service.pay.alipay.AlipayOuyinService;
|
|
|
import com.yohoufo.order.service.pay.wallet.WalletPayService;
|
...
|
...
|
@@ -476,7 +471,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
|
|
|
}
|
|
|
|
|
|
private void punishEarnest(BiFunction penaltyEarnestFunction, SellerWalletDetail.Type swdType, SellerOrder sellerOrder){
|
|
|
private void penaltyEarnestIfWalletSellerOrder(BiFunction penaltyEarnestFunction, SellerWalletDetail.Type swdType, SellerOrder sellerOrder){
|
|
|
Integer sellerUid = sellerOrder.getUid();
|
|
|
Long sellerOrderCode = sellerOrder.getOrderCode();
|
|
|
Integer skup = sellerOrder.getSkup();
|
...
|
...
|
@@ -485,9 +480,13 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
penaltyEarnestFunction.apply(sellerOrder,swdType);
|
|
|
}else {
|
|
|
// 处罚所有金额
|
|
|
MerchantOrderAttachInfo moai = MerchantOrderAttachInfo.builder().uid(sellerUid)
|
|
|
.orderCode(sellerOrderCode).skup(skup).earnestMoney(sellerOrder.getEarnestMoney())
|
|
|
.type(swdType.getValue()).build();
|
|
|
MerchantOrderAttachInfo moai = MerchantOrderAttachInfo.builder()
|
|
|
.uid(sellerUid)
|
|
|
.orderCode(sellerOrderCode)
|
|
|
.skup(skup)
|
|
|
.earnestMoney(sellerOrder.getEarnestMoney())
|
|
|
.type(swdType.getValue())
|
|
|
.build();
|
|
|
merchantOrderPaymentService.punishEarnest( moai, swdType);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -544,7 +543,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
}
|
|
|
Integer sellerUid = sellerOrder.getUid();
|
|
|
long sellerOrderCode = sellerOrder.getOrderCode();
|
|
|
punishEarnest(request.getPenaltyEarnestFunction(), request.getSwdType(), sellerOrder);
|
|
|
penaltyEarnestIfWalletSellerOrder(request.getPenaltyEarnestFunction(), request.getSwdType(), sellerOrder);
|
|
|
val targetUserType = transferCase == EARNEST_MONEY_TO_BUYER ? TargetUserType.buyer : TargetUserType.seller;
|
|
|
val targetUid = targetUserType == TargetUserType.buyer ? buyerOrder.getUid() : sellerUid;
|
|
|
|
...
|
...
|
|