From a2dc849bc20bffaa4ad45d68e401d3892ace24b3 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Fri, 04 Jul 2025 22:21:20 +0800
Subject: [PATCH] 1
---
trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java
index 7540945..78fb9f3 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/RechargeBlockchainOrderServiceImpl.java
@@ -1,5 +1,6 @@
package com.yami.trading.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -49,6 +50,8 @@
@Autowired
SysparaService sysparaService;
+ @Autowired
+ CapitaltWalletService capitaltWalletService;
@Autowired
WalletLogService walletLogService;
@@ -79,9 +82,10 @@
return baseMapper.listRecord(page, rolename, orderNo, userName, startTime, endTime,status);
}
+ //auto 1:自动 2:手动
@Override
@Transactional
- public void manualReceipt(String id, BigDecimal amount,String operator_username) {
+ public void manualReceipt(Integer auto ,String id, BigDecimal amount,String operator_username) {
// Date now = new Date();
RechargeBlockchainOrder recharge = getById(id);
if (recharge == null) {
@@ -124,12 +128,17 @@
if ("usdt".equals(recharge.getSymbol())) {
double amount1 = recharge.getVolume();
- Wallet wallet = new Wallet();
- wallet = walletService.saveWalletByPartyId(recharge.getPartyId());
+// Wallet wallet = new Wallet();
+// wallet = walletService.saveWalletByPartyId(recharge.getPartyId());
+//
+// double amount_before = wallet.getMoney().doubleValue();
+//
+// walletService.update(wallet.getUserId(), amount1);
- double amount_before = wallet.getMoney().doubleValue();
-
- walletService.update(wallet.getUserId(), amount1);
+ CapitaltWallet capitaltWallet = capitaltWalletService.getOne(new LambdaQueryWrapper<>(CapitaltWallet.class)
+ .eq(CapitaltWallet::getUserId, recharge.getPartyId()).last(" limit 1 "));
+ double amount_before = capitaltWallet.getMoney().doubleValue();
+ capitaltWalletService.update(capitaltWallet,amount1);
// 保存资金日志
MoneyLog moneyLog = new MoneyLog();
--
Gitblit v1.9.3