|
@@ -151,6 +151,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -151,6 +151,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
151
|
swd.setAmount(orderInfo.getAmount());
|
151
|
swd.setAmount(orderInfo.getAmount());
|
152
|
swd.setIsBatch(0);
|
152
|
swd.setIsBatch(0);
|
153
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
153
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
154
|
+ swd.setUpdateTime(0);
|
154
|
logger.info("充值后,处理增加钱包明细,bean={}", swd);
|
155
|
logger.info("充值后,处理增加钱包明细,bean={}", swd);
|
155
|
sellerWalletDetailMapper.insert(swd);
|
156
|
sellerWalletDetailMapper.insert(swd);
|
156
|
logger.info("充值后,处理增加钱包明细成功,orderCode={}", orderInfo.getOrderCode());
|
157
|
logger.info("充值后,处理增加钱包明细成功,orderCode={}", orderInfo.getOrderCode());
|
|
@@ -359,6 +360,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -359,6 +360,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
359
|
swd.setAmount(amount);
|
360
|
swd.setAmount(amount);
|
360
|
swd.setIsBatch(isBatch);
|
361
|
swd.setIsBatch(isBatch);
|
361
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
362
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
363
|
+ swd.setUpdateTime(0);
|
362
|
logger.info("退还保证金,钱包明细记录,bean={}", swd);
|
364
|
logger.info("退还保证金,钱包明细记录,bean={}", swd);
|
363
|
sellerWalletDetailMapper.insert(swd);
|
365
|
sellerWalletDetailMapper.insert(swd);
|
364
|
logger.info("退还保证金,钱包明细记录成功,bean={}", swd);
|
366
|
logger.info("退还保证金,钱包明细记录成功,bean={}", swd);
|
|
@@ -400,6 +402,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -400,6 +402,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
400
|
swd.setAmount(amount);
|
402
|
swd.setAmount(amount);
|
401
|
swd.setIsBatch(0);
|
403
|
swd.setIsBatch(0);
|
402
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
404
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
405
|
+ swd.setUpdateTime(0);
|
403
|
logger.info("商家退出,退还保证金,钱包归零处理,增加扣减明细,bean={}", swd);
|
406
|
logger.info("商家退出,退还保证金,钱包归零处理,增加扣减明细,bean={}", swd);
|
404
|
sellerWalletDetailMapper.insert(swd);
|
407
|
sellerWalletDetailMapper.insert(swd);
|
405
|
|
408
|
|
|
@@ -417,6 +420,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -417,6 +420,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
417
|
swd.setAmount(amount);
|
420
|
swd.setAmount(amount);
|
418
|
swd.setIsBatch(isBatch);
|
421
|
swd.setIsBatch(isBatch);
|
419
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
422
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
423
|
+ swd.setUpdateTime(0);
|
420
|
logger.info("支付保证金,钱包明细记录,bean={}", swd);
|
424
|
logger.info("支付保证金,钱包明细记录,bean={}", swd);
|
421
|
sellerWalletDetailMapper.insert(swd);
|
425
|
sellerWalletDetailMapper.insert(swd);
|
422
|
logger.info("支付保证金,钱包明细记录成功,bean={}", swd);
|
426
|
logger.info("支付保证金,钱包明细记录成功,bean={}", swd);
|
|
@@ -434,6 +438,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -434,6 +438,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
434
|
swd.setAmount(amount);
|
438
|
swd.setAmount(amount);
|
435
|
swd.setIsBatch(isBatch);
|
439
|
swd.setIsBatch(isBatch);
|
436
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
440
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
441
|
+ swd.setUpdateTime(0);
|
437
|
logger.info("修改价格支付保证金,钱包明细记录,bean={}", swd);
|
442
|
logger.info("修改价格支付保证金,钱包明细记录,bean={}", swd);
|
438
|
sellerWalletDetailMapper.insert(swd);
|
443
|
sellerWalletDetailMapper.insert(swd);
|
439
|
logger.info("修改价格支付保证金,钱包明细记录成功,bean={}", swd);
|
444
|
logger.info("修改价格支付保证金,钱包明细记录成功,bean={}", swd);
|
|
@@ -455,13 +460,16 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -455,13 +460,16 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
455
|
CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "钱包不可用uid=" + uid+", 金额为:"+money);
|
460
|
CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "钱包不可用uid=" + uid+", 金额为:"+money);
|
456
|
return null;
|
461
|
return null;
|
457
|
}
|
462
|
}
|
458
|
- if (sw.getAmount().compareTo(money) < 0) {
|
463
|
+ if ((type == 2 || type == 4) && sw.getAmount().compareTo(money) < 0) {
|
459
|
logger.error(message + "{}失败,钱包余额不足,uid={}", money, uid);
|
464
|
logger.error(message + "{}失败,钱包余额不足,uid={}", money, uid);
|
460
|
CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "钱包余额不足uid=" + uid+", 金额为:"+money+", 账户余额为:"+sw.getAmount());
|
465
|
CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "钱包余额不足uid=" + uid+", 金额为:"+money+", 账户余额为:"+sw.getAmount());
|
461
|
return null;
|
466
|
return null;
|
462
|
}
|
467
|
}
|
463
|
-
|
468
|
+ if (type == 2 || type == 4) {
|
464
|
sw.setAmount(money.multiply(new BigDecimal("-1")));
|
469
|
sw.setAmount(money.multiply(new BigDecimal("-1")));
|
|
|
470
|
+ } else {
|
|
|
471
|
+ sw.setAmount(money);
|
|
|
472
|
+ }
|
465
|
sw.setUpdateTime(TimeUtils.getTimeStampSecond());
|
473
|
sw.setUpdateTime(TimeUtils.getTimeStampSecond());
|
466
|
logger.info("{}修改钱包表余额,bean={}", sw);
|
474
|
logger.info("{}修改钱包表余额,bean={}", sw);
|
467
|
if (sellerWalletMapper.addMoney(sw) == 0) {
|
475
|
if (sellerWalletMapper.addMoney(sw) == 0) {
|
|
@@ -479,9 +487,10 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -479,9 +487,10 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { |
479
|
swd.setAmount(money);
|
487
|
swd.setAmount(money);
|
480
|
swd.setIsBatch(0);
|
488
|
swd.setIsBatch(0);
|
481
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
489
|
swd.setCreateTime(TimeUtils.getTimeStampSecond());
|
|
|
490
|
+ swd.setUpdateTime(0);
|
482
|
logger.info("增加钱包明细汇总记录,bean={}", swd);
|
491
|
logger.info("增加钱包明细汇总记录,bean={}", swd);
|
483
|
sellerWalletDetailMapper.insert(swd);
|
492
|
sellerWalletDetailMapper.insert(swd);
|
484
|
- logger.info("增加钱包明细汇总成功,bean={}", swd);
|
493
|
+ logger.info("增加钱包明细汇总记录成功,bean={}", swd);
|
485
|
return sw;
|
494
|
return sw;
|
486
|
}
|
495
|
}
|
487
|
|
496
|
|