Showing
1 changed file
with
9 additions
and
4 deletions
@@ -576,6 +576,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | @@ -576,6 +576,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | ||
576 | 576 | ||
577 | BigDecimal beforeAvailAmount = sw.getAmount(); | 577 | BigDecimal beforeAvailAmount = sw.getAmount(); |
578 | BigDecimal beforeLockAmount = sw.getLockAmount(); | 578 | BigDecimal beforeLockAmount = sw.getLockAmount(); |
579 | + logger.info("{}修改钱包,uid={},金额计算后:beforeAvailAmount={}, beforeLockAmount={}", type.getName(), uid, beforeAvailAmount, beforeLockAmount); | ||
579 | BigDecimal availAmount = null; | 580 | BigDecimal availAmount = null; |
580 | BigDecimal lockAmount = null; | 581 | BigDecimal lockAmount = null; |
581 | BigDecimal tradeAmount = null; | 582 | BigDecimal tradeAmount = null; |
@@ -587,6 +588,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | @@ -587,6 +588,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | ||
587 | availAmount = money.multiply(new BigDecimal("-1")); | 588 | availAmount = money.multiply(new BigDecimal("-1")); |
588 | lockAmount = money; | 589 | lockAmount = money; |
589 | tradeAmount = availAmount; | 590 | tradeAmount = availAmount; |
591 | + logger.info("{}修改钱包,uid={},减去保证金场合:", type.getName(), uid); | ||
590 | } else if (type == SellerWalletDetail.Type.SELLER_OFF | 592 | } else if (type == SellerWalletDetail.Type.SELLER_OFF |
591 | || type == SellerWalletDetail.Type.SYSTEM_OFF | 593 | || type == SellerWalletDetail.Type.SYSTEM_OFF |
592 | || type == SellerWalletDetail.Type.APPRAISE_OK | 594 | || type == SellerWalletDetail.Type.APPRAISE_OK |
@@ -596,24 +598,26 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | @@ -596,24 +598,26 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | ||
596 | availAmount = money; | 598 | availAmount = money; |
597 | lockAmount = money.multiply(new BigDecimal("-1")); | 599 | lockAmount = money.multiply(new BigDecimal("-1")); |
598 | tradeAmount = money; | 600 | tradeAmount = money; |
601 | + logger.info("{}修改钱包,uid={},增加保证金场合:", type.getName(), uid); | ||
599 | } else if (type == SellerWalletDetail.Type.SELLER_CANCEL | 602 | } else if (type == SellerWalletDetail.Type.SELLER_CANCEL |
600 | || type == SellerWalletDetail.Type.SELLER_OVER_TIME | 603 | || type == SellerWalletDetail.Type.SELLER_OVER_TIME |
601 | || type == SellerWalletDetail.Type.APPRAISE_FAIL) { | 604 | || type == SellerWalletDetail.Type.APPRAISE_FAIL) { |
602 | // 处罚保证金 | 605 | // 处罚保证金 |
603 | lockAmount = money.multiply(new BigDecimal("-1")); | 606 | lockAmount = money.multiply(new BigDecimal("-1")); |
604 | tradeAmount = lockAmount; | 607 | tradeAmount = lockAmount; |
608 | + logger.info("{}修改钱包,uid={},处罚保证金场合:", type.getName(), uid); | ||
605 | } | 609 | } |
606 | - | 610 | + logger.info("{}修改钱包,uid={},金额计算后:availAmount={}, lockAmount={}, tradeAmount={}", type.getName(), uid, availAmount, lockAmount, tradeAmount); |
607 | sw.setAmount(availAmount); | 611 | sw.setAmount(availAmount); |
608 | sw.setLockAmount(lockAmount); | 612 | sw.setLockAmount(lockAmount); |
609 | sw.setUpdateTime(TimeUtils.getTimeStampSecond()); | 613 | sw.setUpdateTime(TimeUtils.getTimeStampSecond()); |
610 | logger.info("{}修改钱包表余额,bean={}", message, sw); | 614 | logger.info("{}修改钱包表余额,bean={}", message, sw); |
611 | if (sellerWalletMapper.addMoney(sw) == 0) { | 615 | if (sellerWalletMapper.addMoney(sw) == 0) { |
612 | - logger.error(message + "失败,(余额不足货钱包不可用)更新表返回0,bean={}", sw); | ||
613 | - CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "(余额不足货钱包不可用)更新表返回0,uid=" + uid + ", bean为:"+ sw); | 616 | + logger.error(message + "失败,(余额不足或钱包不可用)更新表返回0,bean={}", sw); |
617 | + // CommonAlarmEventPublisher.publish(message + "失败", "ufo.order.changePrice", "(余额不足货钱包不可用)更新表返回0,uid=" + uid + ", bean为:"+ sw); | ||
614 | return null; | 618 | return null; |
615 | } | 619 | } |
616 | - logger.info("{}修改钱包表余额成功,bean={}", sw); | 620 | + logger.info("修改钱包表余额成功,bean={}", sw); |
617 | 621 | ||
618 | SellerWalletDetail swd = new SellerWalletDetail(); | 622 | SellerWalletDetail swd = new SellerWalletDetail(); |
619 | swd.setOrderCode(orderCode); | 623 | swd.setOrderCode(orderCode); |
@@ -632,6 +636,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | @@ -632,6 +636,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | ||
632 | swd.setAttachValue(attach==null?"":JSON.toJSONString(attach)); | 636 | swd.setAttachValue(attach==null?"":JSON.toJSONString(attach)); |
633 | swd.setAvailAmount(availAmount == null ? beforeAvailAmount : beforeAvailAmount.add(availAmount)); | 637 | swd.setAvailAmount(availAmount == null ? beforeAvailAmount : beforeAvailAmount.add(availAmount)); |
634 | swd.setLockAmount(lockAmount == null ? beforeLockAmount : beforeLockAmount.add(lockAmount)); | 638 | swd.setLockAmount(lockAmount == null ? beforeLockAmount : beforeLockAmount.add(lockAmount)); |
639 | + logger.info("{}修改钱包,uid={},明细availAmount={}, beforeAvailAmount={}, beforeLockAmount={}, lockAmount={}", type.getName(), uid, availAmount, beforeAvailAmount, beforeLockAmount, lockAmount); | ||
635 | swd.setIsSet(0); | 640 | swd.setIsSet(0); |
636 | ///////////////////////// | 641 | ///////////////////////// |
637 | logger.info("增加钱包明细汇总记录,bean={}", swd); | 642 | logger.info("增加钱包明细汇总记录,bean={}", swd); |
-
Please register or login to post a comment