...
|
...
|
@@ -526,6 +526,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
BigDecimal beforeLockAmount = sw.getLockAmount();
|
|
|
BigDecimal availAmount = null;
|
|
|
BigDecimal lockAmount = null;
|
|
|
BigDecimal tradeAmount = null;
|
|
|
|
|
|
// 减去保证金
|
|
|
if (type == SellerWalletDetail.Type.PUBLISH
|
...
|
...
|
@@ -533,6 +534,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
|| type == SellerWalletDetail.Type.SUBTRACT_PRICE) {
|
|
|
availAmount = money.multiply(new BigDecimal("-1"));
|
|
|
lockAmount = money;
|
|
|
tradeAmount = availAmount;
|
|
|
} else if (type == SellerWalletDetail.Type.SELLER_OFF
|
|
|
|| type == SellerWalletDetail.Type.SYSTEM_OFF
|
|
|
|| type == SellerWalletDetail.Type.APPRAISE_OK
|
...
|
...
|
@@ -541,17 +543,19 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
// 增加保证金
|
|
|
availAmount = money;
|
|
|
lockAmount = money.multiply(new BigDecimal("-1"));
|
|
|
tradeAmount = money;
|
|
|
} else if (type == SellerWalletDetail.Type.SELLER_CANCEL
|
|
|
|| type == SellerWalletDetail.Type.SELLER_OVER_TIME
|
|
|
|| type == SellerWalletDetail.Type.APPRAISE_FAIL) {
|
|
|
// 处罚保证金
|
|
|
lockAmount = money.multiply(new BigDecimal("-1"));
|
|
|
tradeAmount = lockAmount;
|
|
|
}
|
|
|
|
|
|
sw.setAmount(availAmount);
|
|
|
sw.setLockAmount(lockAmount);
|
|
|
sw.setUpdateTime(TimeUtils.getTimeStampSecond());
|
|
|
logger.info("{}修改钱包表余额,bean={}", sw);
|
|
|
logger.info("{}修改钱包表余额,bean={}", message, sw);
|
|
|
if (sellerWalletMapper.addMoney(sw) == 0) {
|
|
|
logger.error(message + "失败,(并发)更新表返回0,bean={}", sw);
|
|
|
CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "(并发)更新表返回0,uid=" + uid + ", bean为:"+ sw);
|
...
|
...
|
@@ -564,7 +568,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
swd.setType(type.getValue());
|
|
|
swd.setUid(uid);
|
|
|
swd.setWalletId(sw.getId());
|
|
|
swd.setAmount(money);
|
|
|
swd.setAmount(tradeAmount);
|
|
|
swd.setIsBatch(0);
|
|
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
swd.setUpdateTime(0);
|
...
|
...
|
|