新版仿ok交易所-后端
1
zj
2025-07-04 a2dc849bc20bffaa4ad45d68e401d3892ace24b3
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();