Authored by LUOXC

fix bug

... ... @@ -815,20 +815,24 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
sellerType = sellerService.getEntrySellerType(uid);
boolean isSuper = (sellerType != null && sellerType == EntrySellerType.SUPER_ENTRY);
logger.info("{}修改钱包,orderCode={},uid={},处罚保证金场合:获取身份超级卖家:{}", type.getName(), orderCode, uid, sellerType);
BigDecimal penaltyEarnestMoney = type == SellerWalletDetail.Type.MINI_FAULT_REJECT ? smallBadProductPunishment
: Objects.nonNull(attach.getPenaltyEarnestMoney()) ? attach.getPenaltyEarnestMoney() : null;
if (isSuper) {
if (Objects.nonNull(penaltyEarnestMoney)) {
availAmount = penaltyEarnestMoney.multiply(new BigDecimal("-1"));
}else {
if (type == SellerWalletDetail.Type.MINI_FAULT_REJECT) {
availAmount = smallBadProductPunishment.multiply(new BigDecimal("-1"));
} else if (Objects.nonNull(attach.getPenaltyEarnestMoney())) {
availAmount = attach.getPenaltyEarnestMoney().multiply(new BigDecimal("-1"));
} else {
availAmount = money.multiply(new BigDecimal("-1"));
}
tradeAmount = availAmount;
} else {
if (Objects.nonNull(penaltyEarnestMoney)) {
lockAmount = money.add(penaltyEarnestMoney).multiply(new BigDecimal("-1"));
if (type == SellerWalletDetail.Type.MINI_FAULT_REJECT) {
lockAmount = money.add(smallBadProductPunishment).multiply(new BigDecimal("-1"));
availAmount = money;
tradeAmount = penaltyEarnestMoney.multiply(new BigDecimal("-1"));
tradeAmount = smallBadProductPunishment.multiply(new BigDecimal("-1"));
} else if (Objects.nonNull(attach.getPenaltyEarnestMoney())) {
lockAmount = attach.getEarnestMoney();
availAmount = attach.getEarnestMoney().subtract(attach.getPenaltyEarnestMoney());
tradeAmount = attach.getPenaltyEarnestMoney().multiply(new BigDecimal("-1"));
} else {
lockAmount = money.multiply(new BigDecimal("-1"));
tradeAmount = lockAmount;
... ...