Authored by LUOXC

fix bug 退保证金

... ... @@ -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(),
... ...
... ... @@ -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());
... ...