zj
2025-07-14 5ab1a38d6fb2532b26311a4e2f9fd5120227a303
src/main/java/project/web/admin/impl/user/AdminUserServiceImpl.java
@@ -223,19 +223,19 @@
   public Page exchangePagedQuery(int pageNo, int pageSize, String name_para, String rolename,  String checkedPartyId, Boolean online, String loginIp_para) {
      
      StringBuffer queryString = new StringBuffer(
            "SELECT party.UUID id, party.NAME name, party.USERNAME username, "
            "SELECT party.UUID id, party.NAME name,su.PHONE, party.USERNAME username, "
            + " party.LOGINAUTHORITY login_authority, party.WITHDRAW_LIMIT_AMOUNT withdraw_limit_amount, party.WITHDRAW_LIMIT_NOW_AMOUNT withdraw_limit_now_amount, "
            + " party.LAST_LOGIN_TIME last_loginTime, party.ENABLED enabled, party.ROLENAME rolename, party.CREATE_TIME create_time, "
            + " party.REMARKS remarks, wallet.USDT_MONEY money, party.USERCODE usercode, "
            + " party.REMARKS remarks, wallet.MONEY money, party.USERCODE usercode, "
            + " party_parent.USERNAME username_parent, party.LOGIN_IP login_ip, party.GIFT_USER gift_user, party.USER_LEVEL user_level, "
            + " party.REGSITER_USERCODE register_usercode"
            + " ");
      
      queryString.append(
            " FROM PAT_PARTY party LEFT JOIN PAT_USER_RECOM user ON user.PARTY_ID = party.UUID "
            + " LEFT JOIN T_WALLET_GATHER wallet ON wallet.PARTY_ID = party.UUID "
            + " LEFT JOIN T_WALLET wallet ON wallet.PARTY_ID = party.UUID "
            + " LEFT JOIN PAT_PARTY party_parent ON user.RECO_ID = party_parent.UUID "
            + " LEFT JOIN SCT_USER su ON party.UUID = su.PARTY_UUID"
            + " WHERE 1 = 1 ");
      Map<String, Object> parameters = new HashMap<String, Object>();
@@ -494,13 +494,14 @@
      if (money_revise == 0 || coin_type == "") {
         return;
      }
      WalletGatherService walletGatherService = new WalletGatherServiceImpl(jdbcTemplate,redisHandler,walletService);
      WalletGather walletGather = walletGatherService.getWalletGatherByPartyId(partyId,null);
      if ("usdt".equals(coin_type)) {
         // 交易所修改usdt
         Party party = this.partyService.cachePartyBy(partyId, false);
         double amount_before = walletGather.getUsdtMoney();
         if (Arith.add(money_revise, walletGather.getUsdtMoney()) < 0.0D) {
         Wallet wallet = this.walletService.saveWalletByPartyId(partyId);
         double amount_before = wallet.getMoney();
         if (Arith.add(money_revise, wallet.getMoney()) < 0.0D) {
            throw new BusinessException("操作失败!修正后账户余额小于0。");
         }
         
@@ -510,14 +511,16 @@
         if (!safeword_md5.equals(sysSafeword)) {
            throw new BusinessException("资金密码错误");
         }
         //修改资金账户
         walletGatherService.update(walletGather.getPartyId().toString(),coin_type,money_revise,"add");
         // 更新金额
         this.walletService.update(wallet.getPartyId().toString(), money_revise);
         // 账变日志
         MoneyLog moneyLog = new MoneyLog();
         moneyLog.setCategory(Constants.MONEYLOG_CATEGORY_COIN);
         moneyLog.setAmount_before(amount_before);
         moneyLog.setAmount(money_revise);
         moneyLog.setAmount_after(Arith.add(walletGather.getUsdtMoney(), money_revise));
         moneyLog.setAmount_after(Arith.add(wallet.getMoney(), money_revise));
         moneyLog.setPartyId(partyId);
         moneyLog.setWallettype(Constants.WALLET);
         moneyLog.setContent_type(Constants.MONEYLOG_CONTENT_RECHARGE);
@@ -574,14 +577,9 @@
         // 交易所修改btc、eth;DAPP修改质押账户(USDT)【USDT_DAPP】;DAPP演示用户修改DAPP余额【USDT_USER】;
         Party party = this.partyService.cachePartyBy(partyId, false);
         double amount_before = 0;
         if("btc".equals(coin_type)){
            amount_before = walletGather.getBtcMoney();
         }else if ("eth".equals(coin_type)){
            amount_before = walletGather.getEthMoney();
         }
         if (Arith.add(money_revise, amount_before) < 0.0D) {
         WalletExtend walletExtend = this.walletService.saveExtendByPara(partyId, coin_type);
         double amount_before = walletExtend.getAmount();
         if (Arith.add(money_revise, walletExtend.getAmount()) < 0.0D) {
            throw new BusinessException("操作失败!修正后账户余额小于0。");
         }
         
@@ -592,19 +590,15 @@
         if (!safeword_md5.equals(sysSafeword)) {
            throw new BusinessException("资金密码错误");
         }
         walletGatherService.update(walletGather.getPartyId().toString(),coin_type,money_revise,"add");
         double amount = 0;
         if("btc".equals(coin_type)){
            amount = walletGather.getBtcMoney();
         }else if ("eth".equals(coin_type)){
            amount = walletGather.getEthMoney();
         }
         this.walletService.updateExtend(walletExtend.getPartyId().toString(), coin_type, money_revise);
         // 账变日志
         MoneyLog moneyLog = new MoneyLog();
         moneyLog.setCategory(Constants.MONEYLOG_CATEGORY_COIN);
         moneyLog.setAmount_before(amount_before);
         moneyLog.setAmount(money_revise);
         moneyLog.setAmount_after(Arith.add(amount, money_revise));
         moneyLog.setAmount_after(Arith.add(walletExtend.getAmount(), money_revise));
         moneyLog.setPartyId(partyId);
         moneyLog.setWallettype(coin_type.toUpperCase());
         moneyLog.setContent_type(Constants.MONEYLOG_CONTENT_RECHARGE);
@@ -679,6 +673,7 @@
      }
   }
   /**
    * DAPP/交易所 修改余额 减少
    */