peternameyakj
2024-08-08 cbc26f3f148e9f328f4fa1536c30b16946360a81
src/main/java/project/wallet/internal/WalletGatherServiceImpl.java
@@ -231,8 +231,12 @@
            return resultObject;
        }else {
            //交易账户=>资金账户
            WalletExtend walletExtend = walletService.saveExtendByPara(partyId, currency);
            resultObject.setData(walletExtend.getAmount());
            if("usdt".equals(currency)){
                resultObject.setData(walletService.saveWalletByPartyId(partyId).getMoney());
            }else {
                WalletExtend walletExtend = walletService.saveExtendByPara(partyId, currency);
                resultObject.setData(walletExtend.getAmount());
            }
            return resultObject;
        }
    }
@@ -258,7 +262,11 @@
        ApplicationUtil.executeUpdate(walletGather);
        redisHandler.setAsyn(WalletRedisKeys.WALLET_GATHER_PARTY_ID + walletGather.getPartyId().toString(),walletGather);
        walletService.updateExtend(walletExtend.getPartyId().toString(), walletExtend.getWallettype(), -amount);
        if("usdt".equals(currency)){
            walletService.update(walletGather.getPartyId().toString(),-amount);
        }else {
            walletService.updateExtend(walletExtend.getPartyId().toString(), walletExtend.getWallettype(), -amount);
        }
        resultObject.setMsg("划转成功");
        return resultObject;
    }
@@ -301,7 +309,11 @@
        }
        ApplicationUtil.executeUpdate(walletGather);
        redisHandler.setAsyn(WalletRedisKeys.WALLET_GATHER_PARTY_ID + walletGather.getPartyId().toString(),walletGather);
        walletService.updateExtend(walletExtend.getPartyId().toString(), walletExtend.getWallettype(), amount);
        if("usdt".equals(currency)){
            walletService.update(walletGather.getPartyId().toString(),amount);
        }else {
            walletService.updateExtend(walletExtend.getPartyId().toString(), walletExtend.getWallettype(), amount);
        }
        resultObject.setMsg("划转成功");
        return resultObject;
    }