Authored by LUOXC

Merge branch 'dev6.8.6' into test6.8.6

... ... @@ -99,6 +99,7 @@ public class ActionStatusHold {
CanRefundStatus = Arrays.asList(SellerOrderStatus.YOHO_CANCEL_SELL.getCode(),
SellerOrderStatus.FINISH.getCode(),
SellerOrderStatus.PLAY_SELF.getCode(),
SellerOrderStatus.PLAY_BUYER.getCode(),
SellerOrderStatus.BUYER_CANCEL_BEFORE_SELLER_DELIVER.getCode(),
SellerOrderStatus.BUYER_CANCEL_BEFORE_DEPOT_RECEIVE.getCode(),
SellerOrderStatus.MINI_FAULT_REJECT.getCode(),
... ...
... ... @@ -339,12 +339,20 @@ public class BuyerOrderCancelService {
}
void transferPenalty(BuyerPenaltyCalResult bpcr){
if (bpcr.getPenaltyAmount().compareTo(BigDecimal.ZERO) <= 0) {
logger.info("in BuyerCancelAfterProcessTask call non need penalty, buyerUid {}, orderCode {}, skup {}",
buyerUid, orderCode, skup);
return;
}
TranseferCellNode transeferCellNode = new TranseferCellNode();
transeferCellNode.setUid(buyerUid);
transeferCellNode.setAmount(bpcr.getPenaltyAmount());
TransferMoneyRequest tmReq = TransferMoneyRequest.builder().buyerOrderCode(orderCode)
.type(transferCase.getCode()).transferCase(transferCase)
.transeferCellNode(transeferCellNode).build();
TransferMoneyRequest tmReq = TransferMoneyRequest.builder()
.buyerOrderCode(orderCode)
.type(transferCase.getCode())
.transferCase(transferCase)
.transeferCellNode(transeferCellNode)
.build();
logger.info("in BuyerCancelAfterProcessTask call begin paymentService.transferMon, buyerUid {}, orderCode {}, skup {} refundReqOfSeller {}",
buyerUid, orderCode, skup, tmReq );
transferService.transfer(tmReq);
... ...
... ... @@ -516,10 +516,12 @@ public class SellerOrderCancelService {
if (Objects.nonNull(penaltyResult)) {
// 退剩余保证金给卖家
BigDecimal backEarnestMoney = penaltyResult.getLeftAmount();
try {
refundEarnestMoney(sellerOrder, targetSOStatus,backEarnestMoney);
} catch (Exception e) {
logger.warn("返回剩余保证金失败, sellerUid is {}, skup is {}, err is {}", sellerUid, skup, e.getMessage());
if(backEarnestMoney.compareTo(BigDecimal.ZERO) > 0){
try {
refundEarnestMoney(sellerOrder, targetSOStatus,backEarnestMoney);
} catch (Exception e) {
logger.warn("返回剩余保证金失败, sellerUid is {}, skup is {}, err is {}", sellerUid, skup, e.getMessage());
}
}
// 赔偿给买家的保证金金额
BigDecimal penaltyAmount = penaltyResult.getPenaltyAmount().subtract(penaltyResult.getYhServiceAmount());
... ...