...
|
...
|
@@ -151,6 +151,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
swd.setAmount(orderInfo.getAmount());
|
|
|
swd.setIsBatch(0);
|
|
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
swd.setUpdateTime(0);
|
|
|
logger.info("充值后,处理增加钱包明细,bean={}", swd);
|
|
|
sellerWalletDetailMapper.insert(swd);
|
|
|
logger.info("充值后,处理增加钱包明细成功,orderCode={}", orderInfo.getOrderCode());
|
...
|
...
|
@@ -359,6 +360,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
swd.setAmount(amount);
|
|
|
swd.setIsBatch(isBatch);
|
|
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
swd.setUpdateTime(0);
|
|
|
logger.info("退还保证金,钱包明细记录,bean={}", swd);
|
|
|
sellerWalletDetailMapper.insert(swd);
|
|
|
logger.info("退还保证金,钱包明细记录成功,bean={}", swd);
|
...
|
...
|
@@ -400,6 +402,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
swd.setAmount(amount);
|
|
|
swd.setIsBatch(0);
|
|
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
swd.setUpdateTime(0);
|
|
|
logger.info("商家退出,退还保证金,钱包归零处理,增加扣减明细,bean={}", swd);
|
|
|
sellerWalletDetailMapper.insert(swd);
|
|
|
|
...
|
...
|
@@ -417,6 +420,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
swd.setAmount(amount);
|
|
|
swd.setIsBatch(isBatch);
|
|
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
swd.setUpdateTime(0);
|
|
|
logger.info("支付保证金,钱包明细记录,bean={}", swd);
|
|
|
sellerWalletDetailMapper.insert(swd);
|
|
|
logger.info("支付保证金,钱包明细记录成功,bean={}", swd);
|
...
|
...
|
@@ -434,6 +438,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
swd.setAmount(amount);
|
|
|
swd.setIsBatch(isBatch);
|
|
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
swd.setUpdateTime(0);
|
|
|
logger.info("修改价格支付保证金,钱包明细记录,bean={}", swd);
|
|
|
sellerWalletDetailMapper.insert(swd);
|
|
|
logger.info("修改价格支付保证金,钱包明细记录成功,bean={}", swd);
|
...
|
...
|
@@ -455,13 +460,16 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "钱包不可用uid=" + uid+", 金额为:"+money);
|
|
|
return null;
|
|
|
}
|
|
|
if (sw.getAmount().compareTo(money) < 0) {
|
|
|
if ((type == 2 || type == 4) && sw.getAmount().compareTo(money) < 0) {
|
|
|
logger.error(message + "{}失败,钱包余额不足,uid={}", money, uid);
|
|
|
CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "钱包余额不足uid=" + uid+", 金额为:"+money+", 账户余额为:"+sw.getAmount());
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
if (type == 2 || type == 4) {
|
|
|
sw.setAmount(money.multiply(new BigDecimal("-1")));
|
|
|
} else {
|
|
|
sw.setAmount(money);
|
|
|
}
|
|
|
sw.setUpdateTime(TimeUtils.getTimeStampSecond());
|
|
|
logger.info("{}修改钱包表余额,bean={}", sw);
|
|
|
if (sellerWalletMapper.addMoney(sw) == 0) {
|
...
|
...
|
@@ -479,9 +487,10 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
|
swd.setAmount(money);
|
|
|
swd.setIsBatch(0);
|
|
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
swd.setUpdateTime(0);
|
|
|
logger.info("增加钱包明细汇总记录,bean={}", swd);
|
|
|
sellerWalletDetailMapper.insert(swd);
|
|
|
logger.info("增加钱包明细汇总成功,bean={}", swd);
|
|
|
logger.info("增加钱包明细汇总记录成功,bean={}", swd);
|
|
|
return sw;
|
|
|
}
|
|
|
|
...
|
...
|
|