From 05b5a3d3cc9c1780aab08a6bd7f0366046cdadf7 Mon Sep 17 00:00:00 2001 From: luqingjie <544309509@qq.com> Date: Sat, 26 Sep 2026 11:31:17 -0400 Subject: [PATCH] 123 --- .../main/java/com/ruoyi/RuoYiApplication.java | 1 - .../java/com/ruoyi/task/AggregationTask.java | 131 --------- .../com/ruoyi/task/SplitAccountsTask.java | 94 ------ .../com/ruoyi/task/WalletAddressTask.java | 75 ----- .../ruoyi/web/core/config/TomcatConfig.java | 78 ----- .../controller/UsdtFundFlowController.java | 170 ----------- ...UserSettlementConfigurationController.java | 170 ----------- .../system/controller/UserAuthController.java | 168 ----------- .../controller/Web3WalletController.java | 153 ---------- .../com/ruoyi/system/domain/UsdtFundFlow.java | 168 ----------- .../ruoyi/system/domain/UsdtFundFlowPlus.java | 177 ----------- .../com/ruoyi/system/domain/UsdtOrders.java | 12 +- .../ruoyi/system/domain/UsdtOrdersPlus.java | 14 +- .../UsdtUserSettlementConfiguration.java | 154 ---------- .../UsdtUserSettlementConfigurationPlus.java | 164 ----------- .../com/ruoyi/system/domain/UserAuth.java | 180 ------------ .../com/ruoyi/system/domain/UserAuthPlus.java | 176 ----------- .../ruoyi/system/domain/WalletAddress.java | 253 ++++++++++------ .../system/domain/WalletAddressPlus.java | 247 ++++++++++------ .../com/ruoyi/system/domain/Web3Wallet.java | 139 --------- .../ruoyi/system/domain/Web3WalletPlus.java | 138 --------- .../system/mapper/UsdtFundFlowMapper.java | 65 ---- ...UsdtUserSettlementConfigurationMapper.java | 65 ---- .../ruoyi/system/mapper/UserAuthMapper.java | 65 ---- .../ruoyi/system/mapper/Web3WalletMapper.java | 65 ---- .../system/service/IUsdtFundFlowService.java | 91 ------ ...sdtUserSettlementConfigurationService.java | 93 ------ .../system/service/IUserAuthService.java | 89 ------ .../system/service/IWalletAddressService.java | 1 - .../system/service/IWeb3WalletService.java | 88 ------ .../impl/UsdtAggregationTaskServiceImpl.java | 123 +------- .../service/impl/UsdtFundFlowServiceImpl.java | 270 ----------------- ...serSettlementConfigurationServiceImpl.java | 277 ------------------ .../service/impl/UserAuthServiceImpl.java | 271 ----------------- .../impl/WalletAddressServiceImpl.java | 8 - .../service/impl/Web3WalletServiceImpl.java | 261 ----------------- .../system/UsdtAggregationTaskItemMapper.xml | 34 ++- .../mapper/system/UsdtFundFlowMapper.xml | 96 ------ .../mapper/system/UsdtOrdersMapper.xml | 7 +- .../UsdtUserSettlementConfigurationMapper.xml | 90 ------ .../mapper/system/UserAuthMapper.xml | 101 ------- .../mapper/system/WalletAddressMapper.xml | 51 +++- .../mapper/system/Web3WalletMapper.xml | 89 ------ 43 files changed, 434 insertions(+), 4728 deletions(-) delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/task/AggregationTask.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/task/SplitAccountsTask.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/task/WalletAddressTask.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/core/config/TomcatConfig.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/UsdtFundFlowController.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/UsdtUserSettlementConfigurationController.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/UserAuthController.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/Web3WalletController.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtFundFlow.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtFundFlowPlus.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtUserSettlementConfiguration.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtUserSettlementConfigurationPlus.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAuth.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAuthPlus.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Web3Wallet.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Web3WalletPlus.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/UsdtFundFlowMapper.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/UsdtUserSettlementConfigurationMapper.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserAuthMapper.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/Web3WalletMapper.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IUsdtFundFlowService.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IUsdtUserSettlementConfigurationService.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IUserAuthService.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IWeb3WalletService.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtFundFlowServiceImpl.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtUserSettlementConfigurationServiceImpl.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserAuthServiceImpl.java delete mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Web3WalletServiceImpl.java delete mode 100644 ruoyi-system/src/main/resources/mapper/system/UsdtFundFlowMapper.xml delete mode 100644 ruoyi-system/src/main/resources/mapper/system/UsdtUserSettlementConfigurationMapper.xml delete mode 100644 ruoyi-system/src/main/resources/mapper/system/UserAuthMapper.xml delete mode 100644 ruoyi-system/src/main/resources/mapper/system/Web3WalletMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index f418532..466b2f6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -20,7 +20,6 @@ import org.springframework.context.annotation.Bean; }) public class RuoYiApplication { public static void main(String[] args) {// System.setProperty("spring.devtools.restart.enabled", "false"); - System.setProperty("hazelcast.config", "D:\\myprojects\\yuyue\\RuoYi-Vue\\luqj-cache\\src\\main\\resources\\hazelcast-default1.xml"); SpringApplication.run(RuoYiApplication.class, args); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/task/AggregationTask.java b/ruoyi-admin/src/main/java/com/ruoyi/task/AggregationTask.java deleted file mode 100644 index acdb152..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/task/AggregationTask.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.ruoyi.task; - -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.*; -import com.ruoyi.system.service.*; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; -import org.tron.trident.core.ApiWrapper; - -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; -import java.util.UUID; - -@Slf4j -@Component("AggregationTask") -public class AggregationTask { - @Autowired - private IUsdtAggregationTaskService usdtAggregationTaskService; - @Autowired - private IUsdtAggregationTaskItemService usdtAggregationTaskItemService; - @Autowired - private ITronService tronService; - @Autowired - private IUsdtFundFlowService usdtFundFlowService; - @Autowired - private IWalletAddressService walletAddressService; - @Autowired - private IWeb3WalletService web3WalletService; - - @Scheduled(cron = "0 */10 * * * ?") -// @Scheduled(cron = "0/10 * * * * ?") - public void execute() { -// com.license.LicenseBootstrap.init(); - List taskPluses = this.usdtAggregationTaskService.getListByStatusAndLtExeTime(0, new Date()); - for (UsdtAggregationTaskPlus taskPlus : taskPluses) { - Web3WalletPlus web3Wallet = this.web3WalletService.getById(taskPlus.getUserId()); - if (web3Wallet == null) { - web3Wallet = new Web3WalletPlus(); - web3Wallet.setId(taskPlus.getUserId()); - web3Wallet.setPassword(UUID.randomUUID().toString()); - web3Wallet.setEthBalance(new BigDecimal(0)); - web3Wallet.setTrxBalance(new BigDecimal(0)); - web3Wallet.setUsdtBalance(new BigDecimal(0)); - web3Wallet.setCreatedAt(new Date()); - web3Wallet.setUpdatedAt(new Date()); - this.web3WalletService.save(web3Wallet); - } - List itemPluses = this.usdtAggregationTaskItemService.getListByStatusAndParentId(0, taskPlus.getId()); - int success = 0; - for (UsdtAggregationTaskItemPlus itemPlus : itemPluses) { - WalletAddressPlus walletAddressPlus = walletAddressService.getByTokenAndAppId(itemPlus.getTokenAddress(), itemPlus.getAppId()); - if (walletAddressPlus.getUpdatedAt().getTime() < itemPlus.getCreatedAt().getTime()) { - itemPlus.setStatus(0); - itemPlus.setRemark("等待钱包更新"); - usdtAggregationTaskItemService.updateById(itemPlus); - continue; - } - ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey()); - try { - if (walletAddressPlus.getEnergyNum() < tronService.defaultEstimateEnergy()) { - itemPlus.setStatus(0); - itemPlus.setRemark("能量不足,需要手续费"); - usdtAggregationTaskItemService.updateById(itemPlus); - continue; - } - long bandwidth = tronService.defaultEstimateBandwidth(); - if (bandwidth > walletAddressPlus.getBandwidthNum()) { - itemPlus.setStatus(0); - itemPlus.setRemark("带宽不足需要手续费"); - usdtAggregationTaskItemService.updateById(itemPlus); - continue; - } - if (bandwidth > walletAddressPlus.getBandwidthStakedNum() - && bandwidth > (walletAddressPlus.getBandwidthNum() - walletAddressPlus.getBandwidthStakedNum())) { - itemPlus.setStatus(0); - itemPlus.setRemark("代理|免费带宽不足需要手续费"); - usdtAggregationTaskItemService.updateById(itemPlus); - continue; - } - if (walletAddressPlus.getWithdrawUsdtBalance().subtract(itemPlus.getOpeAmount()).doubleValue() < 0) { - itemPlus.setStatus(2); - itemPlus.setRemark("超额或者重复提现,请排查"); - usdtAggregationTaskItemService.updateById(itemPlus); - continue; - } - String result = this.tronService.usdtTrans(api, itemPlus.getTokenAddress(), itemPlus.getDistTokenAddress(), itemPlus.getOpeAmount().toString()); - //验证是否成功 TODO - if (StringUtils.isNotEmpty(result)) { - itemPlus.setStatus(1); - itemPlus.setRemark(result); - walletAddressPlus.setWithdrawUsdtBalance(walletAddressPlus.getWithdrawUsdtBalance().subtract(itemPlus.getOpeAmount())); - web3Wallet.setUsdtBalance(web3Wallet.getUsdtBalance().subtract(itemPlus.getOpeAmount())); - - UsdtFundFlowPlus shFlow = new UsdtFundFlowPlus(); - shFlow.setAppId(itemPlus.getAppId()); - shFlow.setAmount(itemPlus.getOpeAmount()); - shFlow.setOrderId(itemPlus.getId()); - shFlow.setOpType(2); - shFlow.setUserId(itemPlus.getUserId()); - shFlow.setToken(itemPlus.getTokenAddress()); - shFlow.setRemark("归集成功"); - shFlow.setCreatedAt(new Date()); - shFlow.setUpdatedAt(new Date()); - this.usdtFundFlowService.save(shFlow); - - this.web3WalletService.updateById(web3Wallet); - this.walletAddressService.updateById(walletAddressPlus); - success++; - } else { - itemPlus.setStatus(0); - itemPlus.setRemark("归集失败"); - } - } catch (Exception e) { - log.error(e.getMessage(), e); - itemPlus.setStatus(0); - itemPlus.setRemark(e.getMessage()); - } - itemPlus.setUpdatedAt(new Date()); - this.usdtAggregationTaskItemService.updateById(itemPlus); - api.close(); - } - if (success == itemPluses.size() && itemPluses.size() > 0) { - taskPlus.setStatus(1); - this.usdtAggregationTaskService.updateById(taskPlus); - } - } - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/task/SplitAccountsTask.java b/ruoyi-admin/src/main/java/com/ruoyi/task/SplitAccountsTask.java deleted file mode 100644 index d6fc690..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/task/SplitAccountsTask.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.ruoyi.task; - -import com.ruoyi.system.domain.*; -import com.ruoyi.system.service.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -import java.math.BigDecimal; -import java.util.*; - -@Component("splitAccountsTask") -public class SplitAccountsTask { - @Autowired - private IUsdtOrdersService usdtOrdersService; - @Autowired - private IUsdtUserSettlementConfigurationService usdtUserSettlementConfigurationService; - @Autowired - private IUsdtFundFlowService usdtFundFlowService; - @Autowired - private IWalletAddressService walletAddressService; - @Autowired - private IWeb3WalletService web3WalletService; -// @Scheduled(cron = "0/10 * * * * ?") - @Scheduled(cron = "0 */10 * * * ?") - public void execute() { -// com.license.LicenseBootstrap.init(); - List list = usdtOrdersService.getWillSettlement(1000); - Map configMap = new HashMap(); - List fundFlows = new ArrayList(); - List ids = new ArrayList<>(); - Map web3WalletMap = new HashMap<>(); - for (UsdtOrdersPlus usdtOrdersPlus : list) { - WalletAddressPlus walletAddressPlus = walletAddressService.getByTokenAndAppId(usdtOrdersPlus.getToken(),usdtOrdersPlus.getAppId() - ,WalletAddressPlus::getId,WalletAddressPlus::getWithdrawUsdtBalance); - if(walletAddressPlus.getWithdrawUsdtBalance() == null){ - walletAddressPlus.setWithdrawUsdtBalance(new BigDecimal(0)); - } - UsdtUserSettlementConfigurationPlus config = configMap.getOrDefault(usdtOrdersPlus.getUserId(), usdtUserSettlementConfigurationService.getByUserId(usdtOrdersPlus.getUserId())); - BigDecimal yj = usdtOrdersPlus.getActualAmount().multiply(config.getCommissionRate()); - UsdtFundFlowPlus yjFlow = new UsdtFundFlowPlus(); - yjFlow.setAppId(usdtOrdersPlus.getAppId()); - yjFlow.setAmount(yj); - yjFlow.setOrderId(usdtOrdersPlus.getId()); - yjFlow.setOpType(1); - yjFlow.setUserId(usdtOrdersPlus.getUserId()); - yjFlow.setToken(usdtOrdersPlus.getToken()); - - Web3WalletPlus web3Wallet = web3WalletMap.get(usdtOrdersPlus.getUserId()); - if (web3Wallet == null) { - web3Wallet = new Web3WalletPlus(); - web3Wallet.setId(usdtOrdersPlus.getUserId()); - web3Wallet.setPassword(UUID.randomUUID().toString()); - web3Wallet.setEthBalance(new BigDecimal(0)); - web3Wallet.setTrxBalance(new BigDecimal(0)); - web3Wallet.setUsdtBalance(new BigDecimal(0)); - web3Wallet.setCreatedAt(new Date()); - web3Wallet.setUpdatedAt(new Date()); - this.web3WalletService.save(web3Wallet); - } else { - web3Wallet.setUpdatedAt(new Date()); - } - web3Wallet.setUsdtBalance(web3Wallet.getUsdtBalance().add(usdtOrdersPlus.getActualAmount().subtract(yj))); - web3WalletMap.put(usdtOrdersPlus.getUserId(), web3Wallet); - - UsdtFundFlowPlus shFlow = new UsdtFundFlowPlus(); - shFlow.setAppId(usdtOrdersPlus.getAppId()); - shFlow.setAmount(usdtOrdersPlus.getActualAmount().subtract(yj)); - shFlow.setOrderId(usdtOrdersPlus.getId()); - shFlow.setOpType(0); - shFlow.setUserId(usdtOrdersPlus.getUserId()); - shFlow.setToken(usdtOrdersPlus.getToken()); - walletAddressPlus.setWithdrawUsdtBalance(walletAddressPlus.getWithdrawUsdtBalance().add(shFlow.getAmount())); - fundFlows.add(yjFlow); - fundFlows.add(shFlow); - ids.add(usdtOrdersPlus.getId()); - this.walletAddressService.updateWithdrawUsdtBalanceById(walletAddressPlus.getId(),walletAddressPlus.getWithdrawUsdtBalance()); - } - Iterator> iterator = web3WalletMap.entrySet().iterator(); - List updates = new ArrayList<>(); - while (iterator.hasNext()) { - updates.add(iterator.next().getValue()); - } - if (!updates.isEmpty()) { - web3WalletService.updateBatchById(updates); - } - if (!fundFlows.isEmpty()) { - usdtFundFlowService.saveBatch(fundFlows); - } - if (!ids.isEmpty()) { - this.usdtOrdersService.updateSettlementStatusByIds(ids, 1); - } - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/task/WalletAddressTask.java b/ruoyi-admin/src/main/java/com/ruoyi/task/WalletAddressTask.java deleted file mode 100644 index 453d6af..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/task/WalletAddressTask.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.ruoyi.task; - -import com.ruoyi.system.domain.WalletAddressPlus; -import com.ruoyi.system.domain.vo.EnergyAndBandwidthVo; -import com.ruoyi.system.service.ITronService; -import com.ruoyi.system.service.IWalletAddressService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; -import org.tron.trident.core.ApiWrapper; - -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; -@Slf4j -@Component("WalletAddressTask") -public class WalletAddressTask { - @Autowired - private ITronService tronService; - @Autowired - private IWalletAddressService walletAddressService; -// @Scheduled(cron = "0/5 * * * * ?") -@Scheduled(cron = "0 */10 * * * ?") - public void execute() { -// com.license.LicenseBootstrap.init(); - List walletAddressPluses = walletAddressService.list(); - for (WalletAddressPlus walletAddressPlus : walletAddressPluses) { - ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey()); - BigDecimal amout = tronService.getUsdtBalance(api,walletAddressPlus.getToken()); - walletAddressPlus.setUsdtBalance(amout); - amout = tronService.getTRxBalance(api,walletAddressPlus.getToken()); - walletAddressPlus.setTrxBalance(amout); - EnergyAndBandwidthVo energyAndBandwidthVo = tronService.energyAndBandwidth(walletAddressPlus.getToken()); - walletAddressPlus.setEnergyNum(energyAndBandwidthVo.getEnergy().longValue()); - walletAddressPlus.setBandwidthNum(energyAndBandwidthVo.getBandwidth().longValue()); - amout = tronService.votedBalance(api,walletAddressPlus.getToken()); - walletAddressPlus.setVotedNum(amout.longValue()); - amout = tronService.stakedTrxBalance(api,walletAddressPlus.getToken(),1); - walletAddressPlus.setEnergyStakedTrxNum(amout.longValue()); - amout = tronService.stakedTrxBalance(api,walletAddressPlus.getToken(),0); - walletAddressPlus.setBandwidthStakedTrxNum(amout.longValue()); - energyAndBandwidthVo = tronService.allDelegatedDnergyAndBandwidth(walletAddressPlus.getToken()); - walletAddressPlus.setAcquiredDelegatedBandwidthValue(energyAndBandwidthVo.getAcquiredBandwidth()); - walletAddressPlus.setAcquiredDelegatedEnergyValue(energyAndBandwidthVo.getAcquiredEnergy()); - walletAddressPlus.setDelegatedBandwidthValue(energyAndBandwidthVo.getDelegateBandwidth()); - walletAddressPlus.setDelegatedEnergyValue(energyAndBandwidthVo.getDelegateEnergy()); - walletAddressPlus.setBandwidthStakedNum(energyAndBandwidthVo.getBandwidthStakedNum()); - - amout = tronService.delegatedStakedTrxBalance(api,walletAddressPlus.getToken(),1); - walletAddressPlus.setDelegatedEnergyTrxNum(amout.longValue()); - amout = tronService.delegatedStakedTrxBalance(api,walletAddressPlus.getToken(),0); - walletAddressPlus.setDelegatedBandwidthTrxNum(amout.longValue()); - - amout = tronService.acquiredDelegatedStakedTrxBalance(api,walletAddressPlus.getToken(),1); - walletAddressPlus.setAcquiredDelegatedEnergyTrxNum(amout.longValue()); - amout = tronService.acquiredDelegatedStakedTrxBalance(api,walletAddressPlus.getToken(),0); - walletAddressPlus.setAcquiredDelegatedBandwidthTrxNum(amout.longValue()); - - amout = tronService.voteBalance(api,walletAddressPlus.getToken()); - walletAddressPlus.setVoteNum(amout.longValue()+walletAddressPlus.getDelegatedBandwidthTrxNum()+ walletAddressPlus.getDelegatedEnergyTrxNum()); - - walletAddressPlus.setStakedTrxNum(walletAddressPlus.getVoteNum()); - - if(walletAddressPlus.getStakedTrxNum() != energyAndBandwidthVo.getStakedTrxNum().longValue()){ - log.error("please check stakedTrxNum is true"); - walletAddressPlus.setStakedTrxNum(energyAndBandwidthVo.getStakedTrxNum()); - walletAddressPlus.setVoteNum(walletAddressPlus.getStakedTrxNum()); - } - walletAddressPlus.setUpdatedAt(new Date()); - walletAddressService.updateById(walletAddressPlus); - api.close(); - } - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/TomcatConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/TomcatConfig.java deleted file mode 100644 index 8caa417..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/TomcatConfig.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.ruoyi.web.core.config; - - -import org.apache.catalina.connector.Connector; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; -import org.springframework.boot.web.servlet.server.ServletWebServerFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * Create by IntelliJ IDEA - * - * @author chenlei - * @dateTime 2019/5/23 18:09 - * @description TomcatConfig - */ -//@Configuration -public class TomcatConfig { - @Value("${server.http.port:8085}") - private Integer httpPort; -// @Bean -// public ServletWebServerFactory webServerFactory() { -// TomcatServletWebServerFactory fa = new TomcatServletWebServerFactory(); -// fa.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "[]{}")); -// return fa; -// } - - -// @Bean -// public Connector connector(){ -// Connector connector=new Connector("org.apache.coyote.http11.Http11NioProtocol"); -// connector.setScheme("http"); -// connector.setPort(80); -// connector.setSecure(false); -// connector.setRedirectPort(443); -// return connector; -// } -// -// @Bean -// public TomcatServletWebServerFactory tomcatServletWebServerFactory(Connector connector){ -// TomcatServletWebServerFactory tomcat=new TomcatServletWebServerFactory(){ -// @Override -// protected void postProcessContext(Context context) { -// SecurityConstraint securityConstraint=new SecurityConstraint(); -// securityConstraint.setUserConstraint("CONFIDENTIAL"); -// SecurityCollection collection=new SecurityCollection(); -// collection.addPattern("/*"); -// securityConstraint.addCollection(collection); -// context.addConstraint(securityConstraint); -// } -// }; -// connector.setProperty("relaxedQueryChars", "[]{}"); -// tomcat.addAdditionalTomcatConnectors(connector); -// return tomcat; -// } - - /* --------------------请按照自己spring boot版本选择 start--------------------- */ - - // 这是spring boot 2.0.X版本的 添加这个,上一个就不用添加了 - @Bean - public ServletWebServerFactory servletContainer() { - TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); - tomcat.addAdditionalTomcatConnectors(createStandardConnector()); // 添加http - return tomcat; - } - - /* --------------------请按照自己spring boot版本选择 end--------------------- */ - - - // 配置http - private Connector createStandardConnector() { - Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); - connector.setPort(httpPort); - return connector; - } - -} \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/UsdtFundFlowController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/UsdtFundFlowController.java deleted file mode 100644 index f78adce..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/UsdtFundFlowController.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.ruoyi.system.controller; - -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.select.Ids; -import com.ruoyi.common.select.SelectItem; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.UsdtFundFlow; -import com.ruoyi.system.domain.UsdtFundFlowPlus; -import com.ruoyi.system.service.IUsdtFundFlowService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 资金流水Controller - * - * @author luqj - * @date 2025-12-04 - */ -@RestController -@RequestMapping("/system/usdt_flow") -public class UsdtFundFlowController extends BaseController -{ - @Autowired - private IUsdtFundFlowService usdtFundFlowService; - @PreAuthorize("@ss.hasPermi('system:usdt_flow:getByIds')") - @PostMapping("/getByIds") - public AjaxResult getByIds(@RequestBody Ids ids) - { - List list = usdtFundFlowService.getByIds(ids.getLongIds(),false,UsdtFundFlowPlus::getRemark,UsdtFundFlowPlus::getId); - return AjaxResult.success(list); - } - @PreAuthorize("@ss.hasPermi('system:usdt_flow:user-getByIds')") - @PostMapping("/user/getByIds") - public AjaxResult userGetByIds(@RequestBody Ids ids) - { - List list = usdtFundFlowService.getByIds(ids.getLongIds(),true,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getRemark,UsdtFundFlowPlus::getId); - return AjaxResult.success(list); - } - @PreAuthorize("@ss.hasPermi('system:usdt_flow:select')") - @GetMapping("/select") - public AjaxResult select(String keyword) - { - List list = usdtFundFlowService.select(keyword,false); - return AjaxResult.success(list); - } - @PreAuthorize("@ss.hasPermi('system:usdt_flow:user-select')") - @GetMapping("/user/select") - public AjaxResult userSelect(String keyword) - { - List list = usdtFundFlowService.select(keyword,true); - return AjaxResult.success(list); - } - /** - * 查询资金流水列表 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:list')") - @GetMapping("/list") - public TableDataInfo list(UsdtFundFlow usdtFundFlow) - { - startPage(); - List list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,false); - return getDataTable(list); - } -/** - * 查询资金流水列表 - */ -@PreAuthorize("@ss.hasPermi('system:usdt_flow:user-list')") -@GetMapping("/user/list") - public TableDataInfo userList(UsdtFundFlow usdtFundFlow) - { - startPage(); - List list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,true); - return getDataTable(list); - } - /** - * 导出资金流水列表 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:export')") - @Log(title = "资金流水", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(UsdtFundFlow usdtFundFlow) - { - List list = usdtFundFlowService.selectUsdtFundFlowList(usdtFundFlow,false); - ExcelUtil util = new ExcelUtil(UsdtFundFlow.class); - return util.exportExcel(list, "usdt_flow"); - } - - /** - * 获取资金流水详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return AjaxResult.success(usdtFundFlowService.selectUsdtFundFlowById(id,false)); - } - /** - * 获取资金流水详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:user-query')") - @GetMapping(value = "/user/{id}") - public AjaxResult userGetInfo(@PathVariable("id") Long id) - { - return AjaxResult.success(usdtFundFlowService.selectUsdtFundFlowById(id,true)); - } - /** - * 新增资金流水 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:add')") - @Log(title = "资金流水", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody UsdtFundFlow usdtFundFlow) - { - return toAjax(usdtFundFlowService.insertUsdtFundFlow(usdtFundFlow,false)); - } - /** - * 新增资金流水 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:user-add')") - @Log(title = "资金流水", businessType = BusinessType.INSERT) - @PostMapping("/user") - public AjaxResult userAdd(@RequestBody UsdtFundFlow usdtFundFlow) - { - return toAjax(usdtFundFlowService.insertUsdtFundFlow(usdtFundFlow,true)); - } - /** - * 修改资金流水 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:edit')") - @Log(title = "资金流水", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody UsdtFundFlow usdtFundFlow) - { - return toAjax(usdtFundFlowService.updateUsdtFundFlow(usdtFundFlow,false)); - } - @PreAuthorize("@ss.hasPermi('system:usdt_flow:user-edit')") - @Log(title = "资金流水", businessType = BusinessType.UPDATE) - @PutMapping("/user") - public AjaxResult userEdit(@RequestBody UsdtFundFlow usdtFundFlow) - { - return toAjax(usdtFundFlowService.updateUsdtFundFlow(usdtFundFlow,true)); - } - /** - * 删除资金流水 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:remove')") - @Log(title = "资金流水", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(usdtFundFlowService.deleteUsdtFundFlowByIds(ids,false)); - } - /** - * 删除资金流水 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_flow:user-remove')") - @Log(title = "资金流水", businessType = BusinessType.DELETE) - @DeleteMapping("/user/{ids}") - public AjaxResult userRemove(@PathVariable Long[] ids) - { - return toAjax(usdtFundFlowService.deleteUsdtFundFlowByIds(ids,true)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/UsdtUserSettlementConfigurationController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/UsdtUserSettlementConfigurationController.java deleted file mode 100644 index b361a5c..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/UsdtUserSettlementConfigurationController.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.ruoyi.system.controller; - -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.select.Ids; -import com.ruoyi.common.select.SelectItem; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.UsdtUserSettlementConfiguration; -import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus; -import com.ruoyi.system.service.IUsdtUserSettlementConfigurationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 商户配置Controller - * - * @author luqj - * @date 2025-12-04 - */ -@RestController -@RequestMapping("/system/usdt_user_configuration") -public class UsdtUserSettlementConfigurationController extends BaseController -{ - @Autowired - private IUsdtUserSettlementConfigurationService usdtUserSettlementConfigurationService; - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:getByIds')") - @PostMapping("/getByIds") - public AjaxResult getByIds(@RequestBody Ids ids) - { - List list = usdtUserSettlementConfigurationService.getByIds(ids.getLongIds(),false,UsdtUserSettlementConfigurationPlus::getRemark,UsdtUserSettlementConfigurationPlus::getId); - return AjaxResult.success(list); - } - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-getByIds')") - @PostMapping("/user/getByIds") - public AjaxResult userGetByIds(@RequestBody Ids ids) - { - List list = usdtUserSettlementConfigurationService.getByIds(ids.getLongIds(),true,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getRemark,UsdtUserSettlementConfigurationPlus::getId); - return AjaxResult.success(list); - } - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:select')") - @GetMapping("/select") - public AjaxResult select(String keyword) - { - List list = usdtUserSettlementConfigurationService.select(keyword,false); - return AjaxResult.success(list); - } - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-select')") - @GetMapping("/user/select") - public AjaxResult userSelect(String keyword) - { - List list = usdtUserSettlementConfigurationService.select(keyword,true); - return AjaxResult.success(list); - } - /** - * 查询商户配置列表 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:list')") - @GetMapping("/list") - public TableDataInfo list(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration) - { - startPage(); - List list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,false); - return getDataTable(list); - } -/** - * 查询商户配置列表 - */ -@PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-list')") -@GetMapping("/user/list") - public TableDataInfo userList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration) - { - startPage(); - List list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,true); - return getDataTable(list); - } - /** - * 导出商户配置列表 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:export')") - @Log(title = "商户配置", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration) - { - List list = usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration,false); - ExcelUtil util = new ExcelUtil(UsdtUserSettlementConfiguration.class); - return util.exportExcel(list, "usdt_user_configuration"); - } - - /** - * 获取商户配置详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return AjaxResult.success(usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationById(id,false)); - } - /** - * 获取商户配置详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-query')") - @GetMapping(value = "/user/{id}") - public AjaxResult userGetInfo(@PathVariable("id") Long id) - { - return AjaxResult.success(usdtUserSettlementConfigurationService.selectUsdtUserSettlementConfigurationById(id,true)); - } - /** - * 新增商户配置 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:add')") - @Log(title = "商户配置", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration) - { - return toAjax(usdtUserSettlementConfigurationService.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,false)); - } - /** - * 新增商户配置 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-add')") - @Log(title = "商户配置", businessType = BusinessType.INSERT) - @PostMapping("/user") - public AjaxResult userAdd(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration) - { - return toAjax(usdtUserSettlementConfigurationService.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,true)); - } - /** - * 修改商户配置 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:edit')") - @Log(title = "商户配置", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration) - { - return toAjax(usdtUserSettlementConfigurationService.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,false)); - } - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-edit')") - @Log(title = "商户配置", businessType = BusinessType.UPDATE) - @PutMapping("/user") - public AjaxResult userEdit(@RequestBody UsdtUserSettlementConfiguration usdtUserSettlementConfiguration) - { - return toAjax(usdtUserSettlementConfigurationService.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration,true)); - } - /** - * 删除商户配置 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:remove')") - @Log(title = "商户配置", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(usdtUserSettlementConfigurationService.deleteUsdtUserSettlementConfigurationByIds(ids,false)); - } - /** - * 删除商户配置 - */ - @PreAuthorize("@ss.hasPermi('system:usdt_user_configuration:user-remove')") - @Log(title = "商户配置", businessType = BusinessType.DELETE) - @DeleteMapping("/user/{ids}") - public AjaxResult userRemove(@PathVariable Long[] ids) - { - return toAjax(usdtUserSettlementConfigurationService.deleteUsdtUserSettlementConfigurationByIds(ids,true)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserAuthController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserAuthController.java deleted file mode 100644 index 3ea7443..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/UserAuthController.java +++ /dev/null @@ -1,168 +0,0 @@ -package com.ruoyi.system.controller; - -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.select.Ids; -import com.ruoyi.common.select.SelectItem; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.UserAuth; -import com.ruoyi.system.domain.UserAuthPlus; -import com.ruoyi.system.service.IUserAuthService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 用户授权Controller - * - * @author luqj - * @date 2025-11-25 - */ -@RestController -@RequestMapping("/system/auth" ) -public class UserAuthController extends BaseController { - @Autowired - private IUserAuthService userAuthService; - - @PreAuthorize("@ss.hasPermi('system:auth:getByIds')" ) - @PostMapping("/getByIds" ) - public AjaxResult getByIds(@RequestBody Ids ids) { - List list = userAuthService.getByIds(ids.getLongIds(), false, UserAuthPlus::getName, UserAuthPlus::getId); - return AjaxResult.success(list); - } - - @PreAuthorize("@ss.hasPermi('system:auth:user-getByIds')" ) - @PostMapping("/user/getByIds" ) - public AjaxResult userGetByIds(@RequestBody Ids ids) { - List list = userAuthService.getByIds(ids.getLongIds(), true, UserAuthPlus::getName,UserAuthPlus::getUserId, UserAuthPlus::getId); - return AjaxResult.success(list); - } - - @PreAuthorize("@ss.hasPermi('system:auth:select')" ) - @GetMapping("/select" ) - public AjaxResult select(String keyword) { - List list = userAuthService.select(keyword, false); - return AjaxResult.success(list); - } - - @PreAuthorize("@ss.hasPermi('system:auth:user-select')" ) - @GetMapping("/user/select" ) - public AjaxResult userSelect(String keyword) { - List list = userAuthService.select(keyword, true); - return AjaxResult.success(list); - } - - /** - * 查询用户授权列表 - */ - @PreAuthorize("@ss.hasPermi('system:auth:list')" ) - @GetMapping("/list" ) - public TableDataInfo list(UserAuth userAuth) { - startPage(); - List list = userAuthService.selectUserAuthList(userAuth, false); - return getDataTable(list); - } - - /** - * 查询用户授权列表 - */ - @PreAuthorize("@ss.hasPermi('system:auth:user-list')" ) - @GetMapping("/user/list" ) - public TableDataInfo userList(UserAuth userAuth) { - startPage(); - List list = userAuthService.selectUserAuthList(userAuth, true); - return getDataTable(list); - } - - /** - * 导出用户授权列表 - */ - @PreAuthorize("@ss.hasPermi('system:auth:export')" ) - @Log(title = "用户授权" , businessType = BusinessType.EXPORT) - @GetMapping("/export" ) - public AjaxResult export(UserAuth userAuth) { - List list = userAuthService.selectUserAuthList(userAuth, false); - ExcelUtil util = new ExcelUtil(UserAuth.class); - return util.exportExcel(list, "auth" ); - } - - /** - * 获取用户授权详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:auth:query')" ) - @GetMapping(value = "/{id}" ) - public AjaxResult getInfo(@PathVariable("id" ) Long id) { - return AjaxResult.success(userAuthService.selectUserAuthById(id, false)); - } - - /** - * 获取用户授权详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:auth:user-query')" ) - @GetMapping(value = "/user/{id}" ) - public AjaxResult userGetInfo(@PathVariable("id" ) Long id) { - return AjaxResult.success(userAuthService.selectUserAuthById(id, true)); - } - - /** - * 新增用户授权 - */ - @PreAuthorize("@ss.hasPermi('system:auth:add')" ) - @Log(title = "用户授权" , businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody UserAuth userAuth) { - return toAjax(userAuthService.insertUserAuth(userAuth, false)); - } - - /** - * 新增用户授权 - */ - @PreAuthorize("@ss.hasPermi('system:auth:user-add')" ) - @Log(title = "用户授权" , businessType = BusinessType.INSERT) - @PostMapping("/user" ) - public AjaxResult userAdd(@RequestBody UserAuth userAuth) { - return toAjax(userAuthService.insertUserAuth(userAuth, true)); - } - - /** - * 修改用户授权 - */ - @PreAuthorize("@ss.hasPermi('system:auth:edit')" ) - @Log(title = "用户授权" , businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody UserAuth userAuth) { - return toAjax(userAuthService.updateUserAuth(userAuth, false)); - } - - @PreAuthorize("@ss.hasPermi('system:auth:user-edit')" ) - @Log(title = "用户授权" , businessType = BusinessType.UPDATE) - @PutMapping("/user" ) - public AjaxResult userEdit(@RequestBody UserAuth userAuth) { - return toAjax(userAuthService.updateUserAuth(userAuth, true)); - } - - /** - * 删除用户授权 - */ - @PreAuthorize("@ss.hasPermi('system:auth:remove')" ) - @Log(title = "用户授权" , businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}" ) - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(userAuthService.deleteUserAuthByIds(ids, false)); - } - - /** - * 删除用户授权 - */ - @PreAuthorize("@ss.hasPermi('system:auth:user-remove')" ) - @Log(title = "用户授权" , businessType = BusinessType.DELETE) - @DeleteMapping("/user/{ids}" ) - public AjaxResult userRemove(@PathVariable Long[] ids) { - return toAjax(userAuthService.deleteUserAuthByIds(ids, true)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/Web3WalletController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/Web3WalletController.java deleted file mode 100644 index 9878c1e..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/Web3WalletController.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.ruoyi.system.controller; - -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.select.Ids; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.Web3Wallet; -import com.ruoyi.system.domain.Web3WalletPlus; -import com.ruoyi.system.service.IWeb3WalletService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 钱包管理Controller - * - * @author luqj - * @date 2025-11-25 - */ -@RestController -@RequestMapping("/system/wallet" ) -public class Web3WalletController extends BaseController { - @Autowired - private IWeb3WalletService web3WalletService; - - @PreAuthorize("@ss.hasPermi('system:wallet:getByIds')" ) - @PostMapping("/getByIds" ) - public AjaxResult getByIds(@RequestBody Ids ids) { - List list = web3WalletService.getByIds(ids.getLongIds(), false, Web3WalletPlus::getUsdtBalance, Web3WalletPlus::getId); - return AjaxResult.success(list); - } - - @PreAuthorize("@ss.hasPermi('system:wallet:user-getByIds')" ) - @PostMapping("/user/getByIds" ) - public AjaxResult userGetByIds(@RequestBody Ids ids) { - List list = web3WalletService.getByIds(ids.getLongIds(), true, Web3WalletPlus::getUsdtBalance, Web3WalletPlus::getId); - return AjaxResult.success(list); - } - - /** - * 查询钱包管理列表 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:list')" ) - @GetMapping("/list" ) - public TableDataInfo list(Web3Wallet web3Wallet) { - startPage(); - List list = web3WalletService.selectWeb3WalletList(web3Wallet, false); - return getDataTable(list); - } - - /** - * 查询钱包管理列表 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:user-list')" ) - @GetMapping("/user/list" ) - public TableDataInfo userList(Web3Wallet web3Wallet) { - startPage(); - List list = web3WalletService.selectWeb3WalletList(web3Wallet, true); - return getDataTable(list); - } - - /** - * 导出钱包管理列表 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:export')" ) - @Log(title = "钱包管理" , businessType = BusinessType.EXPORT) - @GetMapping("/export" ) - public AjaxResult export(Web3Wallet web3Wallet) { - List list = web3WalletService.selectWeb3WalletList(web3Wallet, false); - ExcelUtil util = new ExcelUtil(Web3Wallet.class); - return util.exportExcel(list, "wallet" ); - } - - /** - * 获取钱包管理详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:query')" ) - @GetMapping(value = "/{id}" ) - public AjaxResult getInfo(@PathVariable("id" ) Long id) { - return AjaxResult.success(web3WalletService.selectWeb3WalletById(id, false)); - } - - /** - * 获取钱包管理详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:user-query')" ) - @GetMapping(value = "/user/{id}" ) - public AjaxResult userGetInfo(@PathVariable("id" ) Long id) { - return AjaxResult.success(web3WalletService.selectWeb3WalletById(id, true)); - } - - /** - * 新增钱包管理 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:add')" ) - @Log(title = "钱包管理" , businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody Web3Wallet web3Wallet) { - return toAjax(web3WalletService.insertWeb3Wallet(web3Wallet, false)); - } - - /** - * 新增钱包管理 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:user-add')" ) - @Log(title = "钱包管理" , businessType = BusinessType.INSERT) - @PostMapping("/user" ) - public AjaxResult userAdd(@RequestBody Web3Wallet web3Wallet) { - return toAjax(web3WalletService.insertWeb3Wallet(web3Wallet, true)); - } - - /** - * 修改钱包管理 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:edit')" ) - @Log(title = "钱包管理" , businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody Web3Wallet web3Wallet) { - return toAjax(web3WalletService.updateWeb3Wallet(web3Wallet, false)); - } - - @PreAuthorize("@ss.hasPermi('system:wallet:user-edit')" ) - @Log(title = "钱包管理" , businessType = BusinessType.UPDATE) - @PutMapping("/user" ) - public AjaxResult userEdit(@RequestBody Web3Wallet web3Wallet) { - return toAjax(web3WalletService.updateWeb3Wallet(web3Wallet, true)); - } - - /** - * 删除钱包管理 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:remove')" ) - @Log(title = "钱包管理" , businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}" ) - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(web3WalletService.deleteWeb3WalletByIds(ids, false)); - } - - /** - * 删除钱包管理 - */ - @PreAuthorize("@ss.hasPermi('system:wallet:user-remove')" ) - @Log(title = "钱包管理" , businessType = BusinessType.DELETE) - @DeleteMapping("/user/{ids}" ) - public AjaxResult userRemove(@PathVariable Long[] ids) { - return toAjax(web3WalletService.deleteWeb3WalletByIds(ids, true)); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtFundFlow.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtFundFlow.java deleted file mode 100644 index 7c1b4ca..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtFundFlow.java +++ /dev/null @@ -1,168 +0,0 @@ -package com.ruoyi.system.domain; - -import java.math.BigDecimal; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import java.io.Serializable; -/** - * 资金流水对象 usdt_fund_flow - * - * @author luqj - * @date 2025-12-04 - */ -public class UsdtFundFlow extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 主键 */ - private Long id; - - /** 订单ID */ - @Excel(name = "订单ID") - private Long orderId; - - /** 用户 */ - @Excel(name = "用户") - private Long userId; - - /** 应用 */ - @Excel(name = "应用") - private Long appId; - - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date createdAt; - - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date updatedAt; - - /** 删除时间 */ - private Date deletedAt; - - /** 操作金额 */ - @Excel(name = "操作金额") - private BigDecimal amount; - - /** 操作类型 */ - @Excel(name = "操作类型") - private Integer opType; - - /** Token地址 */ - @Excel(name = "Token地址") - private String token; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setOrderId(Long orderId) - { - this.orderId = orderId; - } - - public Long getOrderId() - { - return orderId; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setAppId(Long appId) - { - this.appId = appId; - } - - public Long getAppId() - { - return appId; - } - public void setCreatedAt(Date createdAt) - { - this.createdAt = createdAt; - } - - public Date getCreatedAt() - { - return createdAt; - } - public void setUpdatedAt(Date updatedAt) - { - this.updatedAt = updatedAt; - } - - public Date getUpdatedAt() - { - return updatedAt; - } - public void setDeletedAt(Date deletedAt) - { - this.deletedAt = deletedAt; - } - - public Date getDeletedAt() - { - return deletedAt; - } - public void setAmount(BigDecimal amount) - { - this.amount = amount; - } - - public BigDecimal getAmount() - { - return amount; - } - public void setOpType(Integer opType) - { - this.opType = opType; - } - - public Integer getOpType() - { - return opType; - } - public void setToken(String token) - { - this.token = token; - } - - public String getToken() - { - return token; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("orderId", getOrderId()) - .append("userId", getUserId()) - .append("appId", getAppId()) - .append("createdAt", getCreatedAt()) - .append("updatedAt", getUpdatedAt()) - .append("deletedAt", getDeletedAt()) - .append("amount", getAmount()) - .append("opType", getOpType()) - .append("token", getToken()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtFundFlowPlus.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtFundFlowPlus.java deleted file mode 100644 index cff4e6e..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtFundFlowPlus.java +++ /dev/null @@ -1,177 +0,0 @@ -package com.ruoyi.system.domain; - -import java.math.BigDecimal; -import java.util.Date; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import java.io.Serializable; -import java.util.Date; -import com.baomidou.mybatisplus.annotation.TableName; -/** - * 资金流水对象 usdt_fund_flow - * - * @author luqj - * @date 2025-12-04 - */ -@TableName(value = "usdt_fund_flow") -public class UsdtFundFlowPlus implements Serializable -{ - private static final long serialVersionUID = 1L; - - /** 主键 */ - @TableId(type = IdType.INPUT) - private Long id; - /** 订单ID */ - @Excel(name = "订单ID") - private Long orderId; - /** 用户 */ - @Excel(name = "用户") - private Long userId; - /** 应用 */ - @Excel(name = "应用") - private Long appId; - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date createdAt; - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date updatedAt; - /** 删除时间 */ - private Date deletedAt; - /** 操作金额 */ - @Excel(name = "操作金额") - private BigDecimal amount; - /** 操作类型 */ - @Excel(name = "操作类型 操作类型 0 商户收入 1 平台抽佣 2 商户归集提现金额") - private Integer opType; - /** Token地址 */ - @Excel(name = "Token地址") - private String token; - /** 备注 */ - @Excel(name = "备注") - private String remark; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setOrderId(Long orderId) - { - this.orderId = orderId; - } - - public Long getOrderId() - { - return orderId; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setAppId(Long appId) - { - this.appId = appId; - } - - public Long getAppId() - { - return appId; - } - public void setCreatedAt(Date createdAt) - { - this.createdAt = createdAt; - } - - public Date getCreatedAt() - { - return createdAt; - } - public void setUpdatedAt(Date updatedAt) - { - this.updatedAt = updatedAt; - } - - public Date getUpdatedAt() - { - return updatedAt; - } - public void setDeletedAt(Date deletedAt) - { - this.deletedAt = deletedAt; - } - - public Date getDeletedAt() - { - return deletedAt; - } - public void setAmount(BigDecimal amount) - { - this.amount = amount; - } - - public BigDecimal getAmount() - { - return amount; - } - public void setOpType(Integer opType) - { - this.opType = opType; - } - - public Integer getOpType() - { - return opType; - } - public void setToken(String token) - { - this.token = token; - } - - public String getToken() - { - return token; - } - public void setRemark(String remark) - { - this.remark = remark; - } - - public String getRemark() - { - return remark; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("orderId", getOrderId()) - .append("userId", getUserId()) - .append("appId", getAppId()) - .append("createdAt", getCreatedAt()) - .append("updatedAt", getUpdatedAt()) - .append("deletedAt", getDeletedAt()) - .append("amount", getAmount()) - .append("opType", getOpType()) - .append("token", getToken()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtOrders.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtOrders.java index b6975c5..279ba87 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtOrders.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtOrders.java @@ -90,7 +90,17 @@ public class UsdtOrders extends BaseEntity @Excel(name = "用户") private Long userId; - public void setId(Long id) + private Integer orderType; + + public Integer getOrderType() { + return orderType; + } + + public void setOrderType(Integer orderType) { + this.orderType = orderType; + } + + public void setId(Long id) { this.id = id; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtOrdersPlus.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtOrdersPlus.java index 8fd287b..cbd4ffe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtOrdersPlus.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtOrdersPlus.java @@ -79,7 +79,19 @@ public class UsdtOrdersPlus implements Serializable /** 用户 */ @Excel(name = "用户") private Long userId; - public void setId(Long id) + + @Excel(name = "订单类型") + private Integer orderType; + + public Integer getOrderType() { + return orderType; + } + + public void setOrderType(Integer orderType) { + this.orderType = orderType; + } + + public void setId(Long id) { this.id = id; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtUserSettlementConfiguration.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtUserSettlementConfiguration.java deleted file mode 100644 index eb3fd6c..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtUserSettlementConfiguration.java +++ /dev/null @@ -1,154 +0,0 @@ -package com.ruoyi.system.domain; - -import java.math.BigDecimal; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import java.io.Serializable; -/** - * 商户配置对象 usdt_user_settlement_configuration - * - * @author luqj - * @date 2025-12-04 - */ -public class UsdtUserSettlementConfiguration extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 主键 */ - private Long id; - - /** 用户id */ - @Excel(name = "用户id") - private Long userId; - - /** 佣金比例 */ - @Excel(name = "佣金比例") - private BigDecimal commissionRate; - - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date createdAt; - - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date updatedAt; - - /** 删除时间 */ - private Date deletedAt; - - /** 提现手续费 */ - @Excel(name = "提现手续费") - private BigDecimal withdrawalFee; - - /** 状态 */ - @Excel(name = "状态") - private Long status; - - /** 预留配置 */ - @Excel(name = "预留配置") - private String extInfo; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setCommissionRate(BigDecimal commissionRate) - { - this.commissionRate = commissionRate; - } - - public BigDecimal getCommissionRate() - { - return commissionRate; - } - public void setCreatedAt(Date createdAt) - { - this.createdAt = createdAt; - } - - public Date getCreatedAt() - { - return createdAt; - } - public void setUpdatedAt(Date updatedAt) - { - this.updatedAt = updatedAt; - } - - public Date getUpdatedAt() - { - return updatedAt; - } - public void setDeletedAt(Date deletedAt) - { - this.deletedAt = deletedAt; - } - - public Date getDeletedAt() - { - return deletedAt; - } - public void setWithdrawalFee(BigDecimal withdrawalFee) - { - this.withdrawalFee = withdrawalFee; - } - - public BigDecimal getWithdrawalFee() - { - return withdrawalFee; - } - public void setStatus(Long status) - { - this.status = status; - } - - public Long getStatus() - { - return status; - } - public void setExtInfo(String extInfo) - { - this.extInfo = extInfo; - } - - public String getExtInfo() - { - return extInfo; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userId", getUserId()) - .append("commissionRate", getCommissionRate()) - .append("createdAt", getCreatedAt()) - .append("updatedAt", getUpdatedAt()) - .append("deletedAt", getDeletedAt()) - .append("withdrawalFee", getWithdrawalFee()) - .append("status", getStatus()) - .append("extInfo", getExtInfo()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtUserSettlementConfigurationPlus.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtUserSettlementConfigurationPlus.java deleted file mode 100644 index 608d18d..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UsdtUserSettlementConfigurationPlus.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.ruoyi.system.domain; - -import java.math.BigDecimal; -import java.util.Date; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import java.io.Serializable; -import java.util.Date; -import com.baomidou.mybatisplus.annotation.TableName; -/** - * 商户配置对象 usdt_user_settlement_configuration - * - * @author luqj - * @date 2025-12-04 - */ -@TableName(value = "usdt_user_settlement_configuration") -public class UsdtUserSettlementConfigurationPlus implements Serializable -{ - private static final long serialVersionUID = 1L; - - /** 主键 */ - @TableId(type = IdType.INPUT) - private Long id; - /** 用户id */ - @Excel(name = "用户id") - private Long userId; - /** 佣金比例 */ - @Excel(name = "佣金比例") - private BigDecimal commissionRate; - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date createdAt; - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date updatedAt; - /** 删除时间 */ - private Date deletedAt; - /** 提现手续费 */ - @Excel(name = "提现手续费") - private BigDecimal withdrawalFee; - /** 状态 */ - @Excel(name = "状态") - private Long status; - /** 预留配置 */ - @Excel(name = "预留配置") - private String extInfo; - /** 备注 */ - @Excel(name = "备注") - private String remark; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setCommissionRate(BigDecimal commissionRate) - { - this.commissionRate = commissionRate; - } - - public BigDecimal getCommissionRate() - { - return commissionRate; - } - public void setCreatedAt(Date createdAt) - { - this.createdAt = createdAt; - } - - public Date getCreatedAt() - { - return createdAt; - } - public void setUpdatedAt(Date updatedAt) - { - this.updatedAt = updatedAt; - } - - public Date getUpdatedAt() - { - return updatedAt; - } - public void setDeletedAt(Date deletedAt) - { - this.deletedAt = deletedAt; - } - - public Date getDeletedAt() - { - return deletedAt; - } - public void setWithdrawalFee(BigDecimal withdrawalFee) - { - this.withdrawalFee = withdrawalFee; - } - - public BigDecimal getWithdrawalFee() - { - return withdrawalFee; - } - public void setStatus(Long status) - { - this.status = status; - } - - public Long getStatus() - { - return status; - } - public void setExtInfo(String extInfo) - { - this.extInfo = extInfo; - } - - public String getExtInfo() - { - return extInfo; - } - public void setRemark(String remark) - { - this.remark = remark; - } - - public String getRemark() - { - return remark; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userId", getUserId()) - .append("commissionRate", getCommissionRate()) - .append("createdAt", getCreatedAt()) - .append("updatedAt", getUpdatedAt()) - .append("deletedAt", getDeletedAt()) - .append("withdrawalFee", getWithdrawalFee()) - .append("status", getStatus()) - .append("extInfo", getExtInfo()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAuth.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAuth.java deleted file mode 100644 index c3fb8c1..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAuth.java +++ /dev/null @@ -1,180 +0,0 @@ -package com.ruoyi.system.domain; - -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import java.io.Serializable; -/** - * 用户授权对象 user_auth - * - * @author luqj - * @date 2025-11-25 - */ -public class UserAuth extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 主键ID */ - private Long id; - - /** 用户 */ - @Excel(name = "用户") - private Long userId; - - /** 认证类型 */ - @Excel(name = "认证类型") - private Integer authType; - - /** 名称 */ - @Excel(name = "名称") - private String name; - - /** 身份证 */ - @Excel(name = "身份证") - private String idNumber; - - /** 公司名称 */ - @Excel(name = "公司名称") - private String companyName; - - /** 授权状态 */ - @Excel(name = "授权状态") - private Integer authStatus; - - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date createdAt; - - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date updatedAt; - - /** 审核人 */ - @Excel(name = "审核人") - private String reviewer; - - /** 删除时间 */ - private Date deletedAt; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setAuthType(Integer authType) - { - this.authType = authType; - } - - public Integer getAuthType() - { - return authType; - } - public void setName(String name) - { - this.name = name; - } - - public String getName() - { - return name; - } - public void setIdNumber(String idNumber) - { - this.idNumber = idNumber; - } - - public String getIdNumber() - { - return idNumber; - } - public void setCompanyName(String companyName) - { - this.companyName = companyName; - } - - public String getCompanyName() - { - return companyName; - } - public void setAuthStatus(Integer authStatus) - { - this.authStatus = authStatus; - } - - public Integer getAuthStatus() - { - return authStatus; - } - public void setCreatedAt(Date createdAt) - { - this.createdAt = createdAt; - } - - public Date getCreatedAt() - { - return createdAt; - } - public void setUpdatedAt(Date updatedAt) - { - this.updatedAt = updatedAt; - } - - public Date getUpdatedAt() - { - return updatedAt; - } - public void setReviewer(String reviewer) - { - this.reviewer = reviewer; - } - - public String getReviewer() - { - return reviewer; - } - public void setDeletedAt(Date deletedAt) - { - this.deletedAt = deletedAt; - } - - public Date getDeletedAt() - { - return deletedAt; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userId", getUserId()) - .append("authType", getAuthType()) - .append("name", getName()) - .append("idNumber", getIdNumber()) - .append("companyName", getCompanyName()) - .append("authStatus", getAuthStatus()) - .append("createdAt", getCreatedAt()) - .append("updatedAt", getUpdatedAt()) - .append("reviewer", getReviewer()) - .append("deletedAt", getDeletedAt()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAuthPlus.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAuthPlus.java deleted file mode 100644 index 3dbc211..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAuthPlus.java +++ /dev/null @@ -1,176 +0,0 @@ -package com.ruoyi.system.domain; - -import java.util.Date; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import java.io.Serializable; -import java.util.Date; -import com.baomidou.mybatisplus.annotation.TableName; -/** - * 用户授权对象 user_auth - * - * @author luqj - * @date 2025-11-25 - */ -@TableName(value = "user_auth") -public class UserAuthPlus implements Serializable -{ - private static final long serialVersionUID = 1L; - - /** 主键ID */ - @TableId(type = IdType.INPUT) - private Long id; - /** 用户 */ - @Excel(name = "用户") - private Long userId; - /** 认证类型 */ - @Excel(name = "认证类型") - private Integer authType; - /** 名称 */ - @Excel(name = "名称") - private String name; - /** 身份证 */ - @Excel(name = "身份证") - private String idNumber; - /** 公司名称 */ - @Excel(name = "公司名称") - private String companyName; - /** 授权状态 */ - @Excel(name = "授权状态") - private Integer authStatus; - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date createdAt; - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date updatedAt; - /** 审核人 */ - @Excel(name = "审核人") - private String reviewer; - /** 删除时间 */ - private Date deletedAt; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setAuthType(Integer authType) - { - this.authType = authType; - } - - public Integer getAuthType() - { - return authType; - } - public void setName(String name) - { - this.name = name; - } - - public String getName() - { - return name; - } - public void setIdNumber(String idNumber) - { - this.idNumber = idNumber; - } - - public String getIdNumber() - { - return idNumber; - } - public void setCompanyName(String companyName) - { - this.companyName = companyName; - } - - public String getCompanyName() - { - return companyName; - } - public void setAuthStatus(Integer authStatus) - { - this.authStatus = authStatus; - } - - public Integer getAuthStatus() - { - return authStatus; - } - public void setCreatedAt(Date createdAt) - { - this.createdAt = createdAt; - } - - public Date getCreatedAt() - { - return createdAt; - } - public void setUpdatedAt(Date updatedAt) - { - this.updatedAt = updatedAt; - } - - public Date getUpdatedAt() - { - return updatedAt; - } - public void setReviewer(String reviewer) - { - this.reviewer = reviewer; - } - - public String getReviewer() - { - return reviewer; - } - public void setDeletedAt(Date deletedAt) - { - this.deletedAt = deletedAt; - } - - public Date getDeletedAt() - { - return deletedAt; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userId", getUserId()) - .append("authType", getAuthType()) - .append("name", getName()) - .append("idNumber", getIdNumber()) - .append("companyName", getCompanyName()) - .append("authStatus", getAuthStatus()) - .append("createdAt", getCreatedAt()) - .append("updatedAt", getUpdatedAt()) - .append("reviewer", getReviewer()) - .append("deletedAt", getDeletedAt()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/WalletAddress.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/WalletAddress.java index fd7153a..97c1efd 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/WalletAddress.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/WalletAddress.java @@ -9,125 +9,150 @@ import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import java.io.Serializable; /** - * token管理对象 wallet_address + * 【请填写功能名称】对象 wallet_address * * @author luqj - * @date 2025-12-30 + * @date 2026-09-26 */ public class WalletAddress extends BaseEntity { private static final long serialVersionUID = 1L; - /** 主键 */ - @Excel(name = "主键") + /** $column.columnComment */ private Long id; - /** Token */ - @Excel(name = "Token") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String token; - /** 状态 */ - @Excel(name = "状态") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long status; - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Date createdAt; - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Date updatedAt; - /** 删除时间 */ + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Date deletedAt; - /** 应用 */ - @Excel(name = "应用") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long appId; - /** 用户 */ - @Excel(name = "用户") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long userId; - /** 密钥 */ - @Excel(name = "密钥") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String walletUserName; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String tokenIndex; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String tokenKey; - @Excel(name = "质押还剩能用的带宽") - private Long bandwidthStakedNum; - /** usdt余额 */ - @Excel(name = "usdt余额") + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal usdtBalance; - /** trx余额 */ - @Excel(name = "trx余额") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal trxBalance; - /** 能量-可用 */ - @Excel(name = "能量-可用") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long energyNum; - /** 带宽-可用 */ - @Excel(name = "带宽-可用") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long energyAllNum; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long energyUsedNum; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long bandwidthNum; - /** 可以提现usdt金额 */ - @Excel(name = "可以提现usdt金额") - private BigDecimal withdrawUsdtBalance; - - /** 代理给别人能量的trx数量 */ - @Excel(name = "代理给别人能量的trx数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long delegatedEnergyTrxNum; - /** 代理给别人的能量 */ - @Excel(name = "代理给别人的能量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal delegatedEnergyValue; - /** 别人代理给我能量的trx数量 */ - @Excel(name = "别人代理给我能量的trx数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long acquiredDelegatedEnergyTrxNum; - /** 别人代理给我的能量 */ - @Excel(name = "别人代理给我的能量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal acquiredDelegatedEnergyValue; - /** 代理给别人的带宽trx数量 */ - @Excel(name = "代理给别人的带宽trx数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long delegatedBandwidthTrxNum; - /** 代理给别人的带宽 */ - @Excel(name = "代理给别人的带宽") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal delegatedBandwidthValue; - /** 别人代理给我带宽的trx数量 */ - @Excel(name = "别人代理给我带宽的trx数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long acquiredDelegatedBandwidthTrxNum; - /** 别人代理给我的带宽 */ - @Excel(name = "别人代理给我的带宽") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal acquiredDelegatedBandwidthValue; - /** 质押的trx数量-不含代理 */ - @Excel(name = "质押的trx数量-不含代理") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long stakedTrxNum; - /** 能量质押的trx数量-不含代理 */ - @Excel(name = "能量质押的trx数量-不含代理") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long energyStakedTrxNum; - /** 带宽质押的trx数量-不含代理 */ - @Excel(name = "带宽质押的trx数量-不含代理") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long bandwidthStakedTrxNum; - /** 可投票数 */ - @Excel(name = "可投票数") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long voteNum; - /** 已经投票数量 */ - @Excel(name = "已经投票数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long votedNum; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long bandwidthStakedNum; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long bandwidthStakedAllNum; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long bandwidthFreeNum; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long bandwidthFreeAllNum; + public void setId(Long id) { this.id = id; @@ -142,15 +167,7 @@ public class WalletAddress extends BaseEntity this.token = token; } - public Long getBandwidthStakedNum() { - return bandwidthStakedNum; - } - - public void setBandwidthStakedNum(Long bandwidthStakedNum) { - this.bandwidthStakedNum = bandwidthStakedNum; - } - - public String getToken() + public String getToken() { return token; } @@ -208,12 +225,30 @@ public class WalletAddress extends BaseEntity { return userId; } - public void setTokenKey(String key) + public void setWalletUserName(String walletUserName) { - this.tokenKey = key; + this.walletUserName = walletUserName; } - public String getTokenKey() + public String getWalletUserName() + { + return walletUserName; + } + public void setTokenIndex(String tokenIndex) + { + this.tokenIndex = tokenIndex; + } + + public String getTokenIndex() + { + return tokenIndex; + } + public void setTokenKey(String tokenKey) + { + this.tokenKey = tokenKey; + } + + public String getTokenKey() { return tokenKey; } @@ -244,6 +279,24 @@ public class WalletAddress extends BaseEntity { return energyNum; } + public void setEnergyAllNum(Long energyAllNum) + { + this.energyAllNum = energyAllNum; + } + + public Long getEnergyAllNum() + { + return energyAllNum; + } + public void setEnergyUsedNum(Long energyUsedNum) + { + this.energyUsedNum = energyUsedNum; + } + + public Long getEnergyUsedNum() + { + return energyUsedNum; + } public void setBandwidthNum(Long bandwidthNum) { this.bandwidthNum = bandwidthNum; @@ -253,15 +306,6 @@ public class WalletAddress extends BaseEntity { return bandwidthNum; } - public void setWithdrawUsdtBalance(BigDecimal withdrawUsdtBalance) - { - this.withdrawUsdtBalance = withdrawUsdtBalance; - } - - public BigDecimal getWithdrawUsdtBalance() - { - return withdrawUsdtBalance; - } public void setDelegatedEnergyTrxNum(Long delegatedEnergyTrxNum) { this.delegatedEnergyTrxNum = delegatedEnergyTrxNum; @@ -379,6 +423,42 @@ public class WalletAddress extends BaseEntity { return votedNum; } + public void setBandwidthStakedNum(Long bandwidthStakedNum) + { + this.bandwidthStakedNum = bandwidthStakedNum; + } + + public Long getBandwidthStakedNum() + { + return bandwidthStakedNum; + } + public void setBandwidthStakedAllNum(Long bandwidthStakedAllNum) + { + this.bandwidthStakedAllNum = bandwidthStakedAllNum; + } + + public Long getBandwidthStakedAllNum() + { + return bandwidthStakedAllNum; + } + public void setBandwidthFreeNum(Long bandwidthFreeNum) + { + this.bandwidthFreeNum = bandwidthFreeNum; + } + + public Long getBandwidthFreeNum() + { + return bandwidthFreeNum; + } + public void setBandwidthFreeAllNum(Long bandwidthFreeAllNum) + { + this.bandwidthFreeAllNum = bandwidthFreeAllNum; + } + + public Long getBandwidthFreeAllNum() + { + return bandwidthFreeAllNum; + } @Override public String toString() { @@ -391,12 +471,15 @@ public class WalletAddress extends BaseEntity .append("deletedAt", getDeletedAt()) .append("appId", getAppId()) .append("userId", getUserId()) + .append("walletUserName", getWalletUserName()) + .append("tokenIndex", getTokenIndex()) .append("tokenKey", getTokenKey()) .append("usdtBalance", getUsdtBalance()) .append("trxBalance", getTrxBalance()) .append("energyNum", getEnergyNum()) + .append("energyAllNum", getEnergyAllNum()) + .append("energyUsedNum", getEnergyUsedNum()) .append("bandwidthNum", getBandwidthNum()) - .append("withdrawUsdtBalance", getWithdrawUsdtBalance()) .append("delegatedEnergyTrxNum", getDelegatedEnergyTrxNum()) .append("delegatedEnergyValue", getDelegatedEnergyValue()) .append("acquiredDelegatedEnergyTrxNum", getAcquiredDelegatedEnergyTrxNum()) @@ -410,6 +493,10 @@ public class WalletAddress extends BaseEntity .append("bandwidthStakedTrxNum", getBandwidthStakedTrxNum()) .append("voteNum", getVoteNum()) .append("votedNum", getVotedNum()) + .append("bandwidthStakedNum", getBandwidthStakedNum()) + .append("bandwidthStakedAllNum", getBandwidthStakedAllNum()) + .append("bandwidthFreeNum", getBandwidthFreeNum()) + .append("bandwidthFreeAllNum", getBandwidthFreeAllNum()) .toString(); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/WalletAddressPlus.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/WalletAddressPlus.java index 88c3ff9..4b357ad 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/WalletAddressPlus.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/WalletAddressPlus.java @@ -2,9 +2,6 @@ package com.ruoyi.system.domain; import java.math.BigDecimal; import java.util.Date; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -14,101 +11,117 @@ import java.io.Serializable; import java.util.Date; import com.baomidou.mybatisplus.annotation.TableName; /** - * token管理对象 wallet_address + * 【请填写功能名称】对象 wallet_address * * @author luqj - * @date 2025-12-30 + * @date 2026-09-26 */ @TableName(value = "wallet_address") public class WalletAddressPlus implements Serializable { private static final long serialVersionUID = 1L; - /** 主键 */ - @TableId(type = IdType.INPUT) - @Excel(name = "主键") + /** $column.columnComment */ private Long id; - /** Token */ - @Excel(name = "Token") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String token; - /** 状态 */ - @Excel(name = "状态") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long status; - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Date createdAt; - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Date updatedAt; - /** 删除时间 */ + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Date deletedAt; - /** 应用 */ - @Excel(name = "应用") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long appId; - /** 用户 */ - @Excel(name = "用户") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long userId; - /** 密钥 */ - @Excel(name = "密钥") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String walletUserName; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String tokenIndex; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private String tokenKey; - /** usdt余额 */ - @Excel(name = "usdt余额") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal usdtBalance; - /** trx余额 */ - @Excel(name = "trx余额") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal trxBalance; - /** 能量-可用 */ - @Excel(name = "能量-可用") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long energyNum; - @Excel(name = "质押还剩能用的带宽") - private Long bandwidthStakedNum; - /** 带宽-可用 */ - @Excel(name = "带宽-可用") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long energyAllNum; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long energyUsedNum; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long bandwidthNum; - /** 可以提现usdt金额 */ - @Excel(name = "可以提现usdt金额") - private BigDecimal withdrawUsdtBalance; - /** 代理给别人能量的trx数量 */ - @Excel(name = "代理给别人能量的trx数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long delegatedEnergyTrxNum; - /** 代理给别人的能量 */ - @Excel(name = "代理给别人的能量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal delegatedEnergyValue; - /** 别人代理给我能量的trx数量 */ - @Excel(name = "别人代理给我能量的trx数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long acquiredDelegatedEnergyTrxNum; - /** 别人代理给我的能量 */ - @Excel(name = "别人代理给我的能量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal acquiredDelegatedEnergyValue; - /** 代理给别人的带宽trx数量 */ - @Excel(name = "代理给别人的带宽trx数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long delegatedBandwidthTrxNum; - /** 代理给别人的带宽 */ - @Excel(name = "代理给别人的带宽") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal delegatedBandwidthValue; - /** 别人代理给我带宽的trx数量 */ - @Excel(name = "别人代理给我带宽的trx数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long acquiredDelegatedBandwidthTrxNum; - /** 别人代理给我的带宽 */ - @Excel(name = "别人代理给我的带宽") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private BigDecimal acquiredDelegatedBandwidthValue; - /** 质押的trx数量-不含代理 */ - @Excel(name = "质押的trx数量-不含代理") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long stakedTrxNum; - /** 能量质押的trx数量-不含代理 */ - @Excel(name = "能量质押的trx数量-不含代理") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long energyStakedTrxNum; - /** 带宽质押的trx数量-不含代理 */ - @Excel(name = "带宽质押的trx数量-不含代理") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long bandwidthStakedTrxNum; - /** 可投票数 */ - @Excel(name = "可投票数") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long voteNum; - /** 已经投票数量 */ - @Excel(name = "已经投票数量") + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") private Long votedNum; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long bandwidthStakedNum; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long bandwidthStakedAllNum; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long bandwidthFreeNum; + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long bandwidthFreeAllNum; public void setId(Long id) { this.id = id; @@ -141,15 +154,7 @@ public class WalletAddressPlus implements Serializable this.createdAt = createdAt; } - public Long getBandwidthStakedNum() { - return bandwidthStakedNum; - } - - public void setBandwidthStakedNum(Long bandwidthStakedNum) { - this.bandwidthStakedNum = bandwidthStakedNum; - } - - public Date getCreatedAt() + public Date getCreatedAt() { return createdAt; } @@ -189,12 +194,30 @@ public class WalletAddressPlus implements Serializable { return userId; } - public void setTokenKey(String key) + public void setWalletUserName(String walletUserName) { - this.tokenKey = key; + this.walletUserName = walletUserName; } - public String getTokenKey() + public String getWalletUserName() + { + return walletUserName; + } + public void setTokenIndex(String tokenIndex) + { + this.tokenIndex = tokenIndex; + } + + public String getTokenIndex() + { + return tokenIndex; + } + public void setTokenKey(String tokenKey) + { + this.tokenKey = tokenKey; + } + + public String getTokenKey() { return tokenKey; } @@ -225,6 +248,24 @@ public class WalletAddressPlus implements Serializable { return energyNum; } + public void setEnergyAllNum(Long energyAllNum) + { + this.energyAllNum = energyAllNum; + } + + public Long getEnergyAllNum() + { + return energyAllNum; + } + public void setEnergyUsedNum(Long energyUsedNum) + { + this.energyUsedNum = energyUsedNum; + } + + public Long getEnergyUsedNum() + { + return energyUsedNum; + } public void setBandwidthNum(Long bandwidthNum) { this.bandwidthNum = bandwidthNum; @@ -234,15 +275,6 @@ public class WalletAddressPlus implements Serializable { return bandwidthNum; } - public void setWithdrawUsdtBalance(BigDecimal withdrawUsdtBalance) - { - this.withdrawUsdtBalance = withdrawUsdtBalance; - } - - public BigDecimal getWithdrawUsdtBalance() - { - return withdrawUsdtBalance; - } public void setDelegatedEnergyTrxNum(Long delegatedEnergyTrxNum) { this.delegatedEnergyTrxNum = delegatedEnergyTrxNum; @@ -360,6 +392,42 @@ public class WalletAddressPlus implements Serializable { return votedNum; } + public void setBandwidthStakedNum(Long bandwidthStakedNum) + { + this.bandwidthStakedNum = bandwidthStakedNum; + } + + public Long getBandwidthStakedNum() + { + return bandwidthStakedNum; + } + public void setBandwidthStakedAllNum(Long bandwidthStakedAllNum) + { + this.bandwidthStakedAllNum = bandwidthStakedAllNum; + } + + public Long getBandwidthStakedAllNum() + { + return bandwidthStakedAllNum; + } + public void setBandwidthFreeNum(Long bandwidthFreeNum) + { + this.bandwidthFreeNum = bandwidthFreeNum; + } + + public Long getBandwidthFreeNum() + { + return bandwidthFreeNum; + } + public void setBandwidthFreeAllNum(Long bandwidthFreeAllNum) + { + this.bandwidthFreeAllNum = bandwidthFreeAllNum; + } + + public Long getBandwidthFreeAllNum() + { + return bandwidthFreeAllNum; + } @Override public String toString() { @@ -372,12 +440,15 @@ public class WalletAddressPlus implements Serializable .append("deletedAt", getDeletedAt()) .append("appId", getAppId()) .append("userId", getUserId()) + .append("walletUserName", getWalletUserName()) + .append("tokenIndex", getTokenIndex()) .append("tokenKey", getTokenKey()) .append("usdtBalance", getUsdtBalance()) .append("trxBalance", getTrxBalance()) .append("energyNum", getEnergyNum()) + .append("energyAllNum", getEnergyAllNum()) + .append("energyUsedNum", getEnergyUsedNum()) .append("bandwidthNum", getBandwidthNum()) - .append("withdrawUsdtBalance", getWithdrawUsdtBalance()) .append("delegatedEnergyTrxNum", getDelegatedEnergyTrxNum()) .append("delegatedEnergyValue", getDelegatedEnergyValue()) .append("acquiredDelegatedEnergyTrxNum", getAcquiredDelegatedEnergyTrxNum()) @@ -391,6 +462,10 @@ public class WalletAddressPlus implements Serializable .append("bandwidthStakedTrxNum", getBandwidthStakedTrxNum()) .append("voteNum", getVoteNum()) .append("votedNum", getVotedNum()) + .append("bandwidthStakedNum", getBandwidthStakedNum()) + .append("bandwidthStakedAllNum", getBandwidthStakedAllNum()) + .append("bandwidthFreeNum", getBandwidthFreeNum()) + .append("bandwidthFreeAllNum", getBandwidthFreeAllNum()) .toString(); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Web3Wallet.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Web3Wallet.java deleted file mode 100644 index e4703ae..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Web3Wallet.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.ruoyi.system.domain; - -import java.math.BigDecimal; -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import java.io.Serializable; -/** - * 钱包管理对象 web3_wallet - * - * @author luqj - * @date 2025-11-25 - */ -public class Web3Wallet extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 用户 */ - private Long id; - - /** usdt */ - @Excel(name = "usdt") - private BigDecimal usdtBalance; - - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date createdAt; - - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date updatedAt; - - /** 删除时间 */ - private Date deletedAt; - - /** trx */ - @Excel(name = "trx") - private BigDecimal trxBalance; - - /** eth */ - @Excel(name = "eth") - private BigDecimal ethBalance; - - /** 密码 */ - @Excel(name = "密码") - private String password; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUsdtBalance(BigDecimal usdtBalance) - { - this.usdtBalance = usdtBalance; - } - - public BigDecimal getUsdtBalance() - { - return usdtBalance; - } - public void setCreatedAt(Date createdAt) - { - this.createdAt = createdAt; - } - - public Date getCreatedAt() - { - return createdAt; - } - public void setUpdatedAt(Date updatedAt) - { - this.updatedAt = updatedAt; - } - - public Date getUpdatedAt() - { - return updatedAt; - } - public void setDeletedAt(Date deletedAt) - { - this.deletedAt = deletedAt; - } - - public Date getDeletedAt() - { - return deletedAt; - } - public void setTrxBalance(BigDecimal trxBalance) - { - this.trxBalance = trxBalance; - } - - public BigDecimal getTrxBalance() - { - return trxBalance; - } - public void setEthBalance(BigDecimal ethBalance) - { - this.ethBalance = ethBalance; - } - - public BigDecimal getEthBalance() - { - return ethBalance; - } - public void setPassword(String password) - { - this.password = password; - } - - public String getPassword() - { - return password; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("usdtBalance", getUsdtBalance()) - .append("createdAt", getCreatedAt()) - .append("updatedAt", getUpdatedAt()) - .append("deletedAt", getDeletedAt()) - .append("trxBalance", getTrxBalance()) - .append("ethBalance", getEthBalance()) - .append("password", getPassword()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Web3WalletPlus.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Web3WalletPlus.java deleted file mode 100644 index 5630a11..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Web3WalletPlus.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.ruoyi.system.domain; - -import java.math.BigDecimal; -import java.util.Date; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import java.io.Serializable; -import java.util.Date; -import com.baomidou.mybatisplus.annotation.TableName; -/** - * 钱包管理对象 web3_wallet - * - * @author luqj - * @date 2025-11-25 - */ -@TableName(value = "web3_wallet") -public class Web3WalletPlus implements Serializable -{ - private static final long serialVersionUID = 1L; - - /** 用户 */ - @TableId(type = IdType.INPUT) - private Long id; - /** usdt */ - @Excel(name = "usdt") - private BigDecimal usdtBalance; - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date createdAt; - /** 更新时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date updatedAt; - /** 删除时间 */ - private Date deletedAt; - /** trx */ - @Excel(name = "trx") - private BigDecimal trxBalance; - /** eth */ - @Excel(name = "eth") - private BigDecimal ethBalance; - /** 密码 */ - @Excel(name = "密码") - private String password; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUsdtBalance(BigDecimal usdtBalance) - { - this.usdtBalance = usdtBalance; - } - - public BigDecimal getUsdtBalance() - { - return usdtBalance; - } - public void setCreatedAt(Date createdAt) - { - this.createdAt = createdAt; - } - - public Date getCreatedAt() - { - return createdAt; - } - public void setUpdatedAt(Date updatedAt) - { - this.updatedAt = updatedAt; - } - - public Date getUpdatedAt() - { - return updatedAt; - } - public void setDeletedAt(Date deletedAt) - { - this.deletedAt = deletedAt; - } - - public Date getDeletedAt() - { - return deletedAt; - } - public void setTrxBalance(BigDecimal trxBalance) - { - this.trxBalance = trxBalance; - } - - public BigDecimal getTrxBalance() - { - return trxBalance; - } - public void setEthBalance(BigDecimal ethBalance) - { - this.ethBalance = ethBalance; - } - - public BigDecimal getEthBalance() - { - return ethBalance; - } - public void setPassword(String password) - { - this.password = password; - } - - public String getPassword() - { - return password; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("usdtBalance", getUsdtBalance()) - .append("createdAt", getCreatedAt()) - .append("updatedAt", getUpdatedAt()) - .append("deletedAt", getDeletedAt()) - .append("trxBalance", getTrxBalance()) - .append("ethBalance", getEthBalance()) - .append("password", getPassword()) - .toString(); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UsdtFundFlowMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UsdtFundFlowMapper.java deleted file mode 100644 index 559ef3e..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UsdtFundFlowMapper.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Param; -import com.ruoyi.system.domain.UsdtFundFlow; -import com.ruoyi.system.domain.UsdtFundFlowPlus; - -/** - * 资金流水Mapper接口 - * - * @author luqj - * @date 2025-12-04 - */ -public interface UsdtFundFlowMapper extends BaseMapper -{ - /** - * 查询资金流水 - * - * @param id 资金流水ID - * @return 资金流水 - */ - public UsdtFundFlow selectUsdtFundFlowById(Long id); - - /** - * 查询资金流水列表 - * - * @param usdtFundFlow 资金流水 - * @return 资金流水集合 - */ - public List selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow); - - /** - * 新增资金流水 - * - * @param usdtFundFlow 资金流水 - * @return 结果 - */ - public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow); - - /** - * 修改资金流水 - * - * @param usdtFundFlow 资金流水 - * @return 结果 - */ - public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow); - - /** - * 删除资金流水 - * - * @param id 资金流水ID - * @return 结果 - */ - public int deleteUsdtFundFlowById(Long id); - - /** - * 批量删除资金流水 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteUsdtFundFlowByIds(Long[] ids); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UsdtUserSettlementConfigurationMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UsdtUserSettlementConfigurationMapper.java deleted file mode 100644 index 106e791..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UsdtUserSettlementConfigurationMapper.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Param; -import com.ruoyi.system.domain.UsdtUserSettlementConfiguration; -import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus; - -/** - * 商户配置Mapper接口 - * - * @author luqj - * @date 2025-12-04 - */ -public interface UsdtUserSettlementConfigurationMapper extends BaseMapper -{ - /** - * 查询商户配置 - * - * @param id 商户配置ID - * @return 商户配置 - */ - public UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id); - - /** - * 查询商户配置列表 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 商户配置集合 - */ - public List selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration); - - /** - * 新增商户配置 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 结果 - */ - public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration); - - /** - * 修改商户配置 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 结果 - */ - public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration); - - /** - * 删除商户配置 - * - * @param id 商户配置ID - * @return 结果 - */ - public int deleteUsdtUserSettlementConfigurationById(Long id); - - /** - * 批量删除商户配置 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteUsdtUserSettlementConfigurationByIds(Long[] ids); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserAuthMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserAuthMapper.java deleted file mode 100644 index 7d45c45..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserAuthMapper.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Param; -import com.ruoyi.system.domain.UserAuth; -import com.ruoyi.system.domain.UserAuthPlus; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author luqj - * @date 2025-11-20 - */ -public interface UserAuthMapper extends BaseMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 【请填写功能名称】 - */ - public UserAuth selectUserAuthById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param userAuth 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectUserAuthList(UserAuth userAuth); - - /** - * 新增【请填写功能名称】 - * - * @param userAuth 【请填写功能名称】 - * @return 结果 - */ - public int insertUserAuth(UserAuth userAuth); - - /** - * 修改【请填写功能名称】 - * - * @param userAuth 【请填写功能名称】 - * @return 结果 - */ - public int updateUserAuth(UserAuth userAuth); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 结果 - */ - public int deleteUserAuthById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteUserAuthByIds(Long[] ids); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Web3WalletMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Web3WalletMapper.java deleted file mode 100644 index e6f75e7..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Web3WalletMapper.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Param; -import com.ruoyi.system.domain.Web3Wallet; -import com.ruoyi.system.domain.Web3WalletPlus; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author luqj - * @date 2025-11-21 - */ -public interface Web3WalletMapper extends BaseMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 【请填写功能名称】 - */ - public Web3Wallet selectWeb3WalletById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param web3Wallet 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectWeb3WalletList(Web3Wallet web3Wallet); - - /** - * 新增【请填写功能名称】 - * - * @param web3Wallet 【请填写功能名称】 - * @return 结果 - */ - public int insertWeb3Wallet(Web3Wallet web3Wallet); - - /** - * 修改【请填写功能名称】 - * - * @param web3Wallet 【请填写功能名称】 - * @return 结果 - */ - public int updateWeb3Wallet(Web3Wallet web3Wallet); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 结果 - */ - public int deleteWeb3WalletById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteWeb3WalletByIds(Long[] ids); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUsdtFundFlowService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUsdtFundFlowService.java deleted file mode 100644 index f001016..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUsdtFundFlowService.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.ruoyi.system.service; - -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.common.select.SelectItem; -import com.ruoyi.system.domain.UsdtFundFlow; -import com.ruoyi.system.domain.UsdtFundFlowPlus; - -import java.util.List; -import java.util.Map; -/** - * 资金流水Service接口 - * - * @author luqj - * @date 2025-12-04 - */ -public interface IUsdtFundFlowService extends IService -{ - - List select(String keyword,boolean isUser); - /** - * 查询资金流水 - * - * @param id 资金流水ID - * @return 资金流水 - */ - public UsdtFundFlow selectUsdtFundFlowById(Long id,boolean isUser); - - /** - * 查询资金流水列表 - * - * @param usdtFundFlow 资金流水 - * @return 资金流水集合 - */ - public List selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow,boolean isUser); - - /** - * 新增资金流水 - * - * @param usdtFundFlow 资金流水 - * @return 结果 - */ - public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser); - - /** - * 修改资金流水 - * - * @param usdtFundFlow 资金流水 - * @return 结果 - */ - public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser); - - /** - * 批量删除资金流水 - * - * @param ids 需要删除的资金流水ID - * @return 结果 - */ - public int deleteUsdtFundFlowByIds(Long[] ids,boolean isUser); - - /** - * 删除资金流水信息 - * - * @param id 资金流水ID - * @return 结果 - */ - public int deleteUsdtFundFlowById(Long id,boolean isUser); - - List getByIds(List ids,boolean isUser, SFunction... columns); - - UsdtFundFlowPlus getById(Long id, SFunction... columns); - - Map getMapByIds(List ids, SFunction... columns); - - List getByIds(List ids); - - Map getMapByIds(List ids); - - /** - * @param field sum 字段 - * @param where 条件 - * @param tClass 返回类型 - * @param - * @return - */ - T sum(String field, String where, Class tClass); - - Long count(String where); - - List countByGroupBy(String select, String where, String groupby, Class tClass); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUsdtUserSettlementConfigurationService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUsdtUserSettlementConfigurationService.java deleted file mode 100644 index 1999a05..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUsdtUserSettlementConfigurationService.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.ruoyi.system.service; - -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.common.select.SelectItem; -import com.ruoyi.system.domain.UsdtUserSettlementConfiguration; -import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus; - -import java.util.List; -import java.util.Map; -/** - * 商户配置Service接口 - * - * @author luqj - * @date 2025-12-04 - */ -public interface IUsdtUserSettlementConfigurationService extends IService -{ - - List select(String keyword,boolean isUser); - /** - * 查询商户配置 - * - * @param id 商户配置ID - * @return 商户配置 - */ - public UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id,boolean isUser); - - - UsdtUserSettlementConfigurationPlus getByUserId(Long userId); - /** - * 查询商户配置列表 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 商户配置集合 - */ - public List selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser); - - /** - * 新增商户配置 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 结果 - */ - public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser); - - /** - * 修改商户配置 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 结果 - */ - public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser); - - /** - * 批量删除商户配置 - * - * @param ids 需要删除的商户配置ID - * @return 结果 - */ - public int deleteUsdtUserSettlementConfigurationByIds(Long[] ids,boolean isUser); - - /** - * 删除商户配置信息 - * - * @param id 商户配置ID - * @return 结果 - */ - public int deleteUsdtUserSettlementConfigurationById(Long id,boolean isUser); - - List getByIds(List ids,boolean isUser, SFunction... columns); - - UsdtUserSettlementConfigurationPlus getById(Long id, SFunction... columns); - - Map getMapByIds(List ids, SFunction... columns); - - List getByIds(List ids); - - Map getMapByIds(List ids); - - /** - * @param field sum 字段 - * @param where 条件 - * @param tClass 返回类型 - * @param - * @return - */ - T sum(String field, String where, Class tClass); - - Long count(String where); - - List countByGroupBy(String select, String where, String groupby, Class tClass); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserAuthService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserAuthService.java deleted file mode 100644 index f19d921..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserAuthService.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.ruoyi.system.service; -import java.util.Map; -import java.util.List; -import com.ruoyi.system.domain.UserAuth; -import com.ruoyi.system.domain.UserAuthPlus; -import com.baomidou.mybatisplus.extension.service.IService; -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.ruoyi.common.select.SelectItem; -/** - * 用户授权Service接口 - * - * @author luqj - * @date 2025-11-25 - */ -public interface IUserAuthService extends IService -{ - - List select(String keyword,boolean isUser); - /** - * 查询用户授权 - * - * @param id 用户授权ID - * @return 用户授权 - */ - public UserAuth selectUserAuthById(Long id,boolean isUser); - - /** - * 查询用户授权列表 - * - * @param userAuth 用户授权 - * @return 用户授权集合 - */ - public List selectUserAuthList(UserAuth userAuth,boolean isUser); - - /** - * 新增用户授权 - * - * @param userAuth 用户授权 - * @return 结果 - */ - public int insertUserAuth(UserAuth userAuth,boolean isUser); - - /** - * 修改用户授权 - * - * @param userAuth 用户授权 - * @return 结果 - */ - public int updateUserAuth(UserAuth userAuth,boolean isUser); - - /** - * 批量删除用户授权 - * - * @param ids 需要删除的用户授权ID - * @return 结果 - */ - public int deleteUserAuthByIds(Long[] ids,boolean isUser); - - /** - * 删除用户授权信息 - * - * @param id 用户授权ID - * @return 结果 - */ - public int deleteUserAuthById(Long id,boolean isUser); - - List getByIds(List ids,boolean isUser, SFunction... columns); - - UserAuthPlus getById(Long id, SFunction... columns); - - Map getMapByIds(List ids, SFunction... columns); - - List getByIds(List ids); - - Map getMapByIds(List ids); - - /** - * @param field sum 字段 - * @param where 条件 - * @param tClass 返回类型 - * @param - * @return - */ - T sum(String field, String where, Class tClass); - - Long count(String where); - - List countByGroupBy(String select, String where, String groupby, Class tClass); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IWalletAddressService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IWalletAddressService.java index f95be54..d4d27dc 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IWalletAddressService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IWalletAddressService.java @@ -77,7 +77,6 @@ public interface IWalletAddressService extends IService Map getMapByIds(List ids, SFunction... columns); - boolean updateWithdrawUsdtBalanceById(Long id, BigDecimal withdrawUsdtBalance); List getByIds(List ids); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IWeb3WalletService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IWeb3WalletService.java deleted file mode 100644 index 509cf51..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IWeb3WalletService.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.ruoyi.system.service; -import java.util.Map; -import java.util.List; -import com.ruoyi.system.domain.Web3Wallet; -import com.ruoyi.system.domain.Web3WalletPlus; -import com.baomidou.mybatisplus.extension.service.IService; -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.ruoyi.common.select.SelectItem; -/** - * 钱包管理Service接口 - * - * @author luqj - * @date 2025-11-25 - */ -public interface IWeb3WalletService extends IService -{ - - /** - * 查询钱包管理 - * - * @param id 钱包管理ID - * @return 钱包管理 - */ - public Web3Wallet selectWeb3WalletById(Long id,boolean isUser); - - /** - * 查询钱包管理列表 - * - * @param web3Wallet 钱包管理 - * @return 钱包管理集合 - */ - public List selectWeb3WalletList(Web3Wallet web3Wallet,boolean isUser); - - /** - * 新增钱包管理 - * - * @param web3Wallet 钱包管理 - * @return 结果 - */ - public int insertWeb3Wallet(Web3Wallet web3Wallet,boolean isUser); - - /** - * 修改钱包管理 - * - * @param web3Wallet 钱包管理 - * @return 结果 - */ - public int updateWeb3Wallet(Web3Wallet web3Wallet,boolean isUser); - - /** - * 批量删除钱包管理 - * - * @param ids 需要删除的钱包管理ID - * @return 结果 - */ - public int deleteWeb3WalletByIds(Long[] ids,boolean isUser); - - /** - * 删除钱包管理信息 - * - * @param id 钱包管理ID - * @return 结果 - */ - public int deleteWeb3WalletById(Long id,boolean isUser); - - List getByIds(List ids,boolean isUser, SFunction... columns); - - Web3WalletPlus getById(Long id, SFunction... columns); - - Map getMapByIds(List ids, SFunction... columns); - - List getByIds(List ids); - - Map getMapByIds(List ids); - - /** - * @param field sum 字段 - * @param where 条件 - * @param tClass 返回类型 - * @param - * @return - */ - T sum(String field, String where, Class tClass); - - Long count(String where); - - List countByGroupBy(String select, String where, String groupby, Class tClass); -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtAggregationTaskServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtAggregationTaskServiceImpl.java index d9afc5a..35b7eba 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtAggregationTaskServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtAggregationTaskServiceImpl.java @@ -39,8 +39,6 @@ public class UsdtAggregationTaskServiceImpl extends ServiceImpl list = walletAddressService.getListByAppId(usdtAggregationTask.getAppId()); - list.sort(new Comparator() { - @Override - public int compare(WalletAddressPlus p1, WalletAddressPlus p2) { - return Double.compare(p2.getWithdrawUsdtBalance().doubleValue(), p1.getWithdrawUsdtBalance().doubleValue()); // 倒序排序 - } - }); - String willTxAmount = this.sum("total_amount","status = 0 and verify_status=1 and user_id="+usdtAggregationTask.getUserId(),String.class); - if(willTxAmount == null){ - willTxAmount ="0.00"; - } - if(new BigDecimal(willTxAmount).add(usdtAggregationTask.getTotalAmount()) - .subtract(web3WalletPlus.getUsdtBalance()).doubleValue()>0){ - throw new RuntimeException("待提现金额超过账户金额"); - } - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .eq(UsdtAggregationTaskPlus::getAppId, usdtAggregationTask.getAppId()) - .eq(UsdtAggregationTaskPlus::getUserId,usdtAggregationTask.getUserId()) - .eq(UsdtAggregationTaskPlus::getStatus,0); - if(count(lambdaQueryWrapper) > 0){ - throw new RuntimeException("存在正在提现的记录"); - } - - this.usdtAggregationTaskMapper.insertUsdtAggregationTask(usdtAggregationTask); - BigDecimal totalAmount = usdtAggregationTask.getTotalAmount(); - List usdtAggregationTaskItems = new ArrayList<>(); - BigDecimal hasTxItem = new BigDecimal(0); - for (WalletAddressPlus item : list) { - if (item.getWithdrawUsdtBalance() == null) { - item.setWithdrawUsdtBalance(new BigDecimal(0)); - } - UsdtAggregationTaskItemPlus usdtAggregationTaskItem = new UsdtAggregationTaskItemPlus(); - usdtAggregationTaskItem.setUserId(SecurityUtils.getUserId()); - usdtAggregationTaskItem.setAppId(usdtAggregationTask.getAppId()); - usdtAggregationTaskItem.setCreatedAt(new Date()); - usdtAggregationTaskItem.setUpdatedAt(new Date()); - usdtAggregationTaskItem.setStatus(0); - usdtAggregationTaskItem.setDistTokenAddress(usdtAggregationTask.getDistTokenAddress()); - usdtAggregationTaskItem.setParentId(usdtAggregationTask.getId()); - usdtAggregationTaskItem.setTokenAddress(item.getToken()); - - if (item.getEnergyNum() < tronService.defaultEstimateEnergy()) { - log.error(item.getToken()+"能量不足,需要手续费"); - continue; - } - long bandwidth = tronService.defaultEstimateBandwidth(); - if (bandwidth > item.getBandwidthNum()) { - log.error(item.getToken()+"带宽不足需要手续费"); - continue; - } - if(bandwidth > item.getBandwidthStakedNum() - && bandwidth > (item.getBandwidthNum()-item.getBandwidthStakedNum())){ - log.error("代理|免费带宽不足需要手续费"); - continue; - } - - String tempAmount = usdtAggregationTaskItemService.sum("ope_amount","status = 0 and token_address ='"+item.getToken()+"'",String.class); - if(tempAmount ==null){ - tempAmount = "0.00"; - } - if (item.getWithdrawUsdtBalance().subtract(totalAmount).longValue() > 0) { - usdtAggregationTaskItem.setOpeAmount(totalAmount); - usdtAggregationTaskItems.add(usdtAggregationTaskItem); - hasTxItem = hasTxItem.add(item.getWithdrawUsdtBalance().subtract(new BigDecimal(tempAmount)) - .subtract(totalAmount)); - totalAmount = new BigDecimal(0); - break; - } else { - usdtAggregationTaskItem.setOpeAmount(item.getWithdrawUsdtBalance()); - totalAmount = totalAmount.subtract(item.getWithdrawUsdtBalance()); - usdtAggregationTaskItems.add(usdtAggregationTaskItem); - hasTxItem = hasTxItem.add(item.getWithdrawUsdtBalance().subtract(new BigDecimal(tempAmount)) - .subtract(item.getWithdrawUsdtBalance())); - } - } - if (hasTxItem.doubleValue() < 0) { - throw new RuntimeException("app下的地址可提现金额不足,amount=" + hasTxItem.toString()); - } - if (totalAmount.longValue() > 0) { - throw new RuntimeException("app下的地址可提现金额不足,amount=" + totalAmount.toString()); - } - if (!usdtAggregationTaskItems.isEmpty()) { - this.usdtAggregationTaskItemService.saveBatch(usdtAggregationTaskItems); - }else{ - throw new RuntimeException("没有可以免费提现的地址"); - } - return 1; + return this.usdtAggregationTaskMapper.insertUsdtAggregationTask(usdtAggregationTask); } else { return usdtAggregationTaskMapper.insertUsdtAggregationTask(usdtAggregationTask); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtFundFlowServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtFundFlowServiceImpl.java deleted file mode 100644 index 501cbc2..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtFundFlowServiceImpl.java +++ /dev/null @@ -1,270 +0,0 @@ -package com.ruoyi.system.service.impl; - -import com.alibaba.fastjson.JSONArray; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.common.select.SelectItem; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.UsdtFundFlow; -import com.ruoyi.system.domain.UsdtFundFlowPlus; -import com.ruoyi.system.mapper.UsdtFundFlowMapper; -import com.ruoyi.system.service.IUsdtFundFlowService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Service; - -import java.util.*; -/** - * 资金流水Service业务层处理 - * - * @author luqj - * @date 2025-12-04 - */ -@Service -public class UsdtFundFlowServiceImpl extends ServiceImpl implements IUsdtFundFlowService -{ - @Autowired - private UsdtFundFlowMapper usdtFundFlowMapper; - @Autowired - private JdbcTemplate jdbcTemplate; - - @Override - public List getByIds(List ids ,boolean isUser, SFunction... columns) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).in(UsdtFundFlowPlus::getId, ids); - if(isUser){ - lambdaQueryWrapper.eq(UsdtFundFlowPlus::getUserId, SecurityUtils.getUserId()); - } - List list = this.list(lambdaQueryWrapper); - if(isUser){ - checkUserPlus(list); - } - return list; - } - private void checkUserPlus(List list) { - for (UsdtFundFlowPlus item : list){ - if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){ - throw new RuntimeException("无权限"); - } - } - } - private void checkUser(List list) { - for (UsdtFundFlow item : list){ - if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){ - throw new RuntimeException("无权限"); - } - } - } - private void checkUser(UsdtFundFlowPlus item) { - if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){ - throw new RuntimeException("无权限"); - } - } - private void checkUser(UsdtFundFlow item) { - if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){ - throw new RuntimeException("无权限"); - } - } - @Override - public List select(String keyword,boolean isUser) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(UsdtFundFlowPlus::getId,UsdtFundFlowPlus::getUserId, UsdtFundFlowPlus::getRemark) - .like(UsdtFundFlowPlus::getRemark, keyword); - if(isUser){ - lambdaQueryWrapper.eq(UsdtFundFlowPlus::getUserId, SecurityUtils.getUserId()); - } - List list = this.list(lambdaQueryWrapper); - if(isUser){ - checkUserPlus(list); - } - List result =new ArrayList<>(); - for (UsdtFundFlowPlus item : list){ - SelectItem selectItem = new SelectItem(); - selectItem.setName(item.getRemark()); - selectItem.setId(item.getId()); - result.add(selectItem); - } - return result; - } - @Override - public UsdtFundFlowPlus getById(Long id, SFunction... columns) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).eq(UsdtFundFlowPlus::getId, id); - return baseMapper.selectOne(lambdaQueryWrapper); - } - - @Override - public Map getMapByIds(List ids, SFunction... columns) { - List list = this.getByIds(ids,false, columns); - Map map = new HashMap<>(); - for (UsdtFundFlowPlus item : list) { - map.put(item.getId(), item); - } - return map; - } - - @Override - public Map getMapByIds(List ids) { - List list = this.getByIds(ids); - Map map = new HashMap<>(); - for (UsdtFundFlowPlus item : list) { - map.put(item.getId(), item); - } - return map; - } - - @Override - public List getByIds(List ids) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper().in(UsdtFundFlowPlus::getId, ids); - return this.list(lambdaQueryWrapper); - } - - public T sum(String field, String where, Class tClass) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(" sum(" + field + ") as total "); - stringBuffer.append(" from usdt_fund_flow "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass); - return result; - } - - public Long count(String where) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(" count(1)"); - stringBuffer.append(" from "); - stringBuffer.append(" usdt_fund_flow "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class); - return result; - } - - public List countByGroupBy(String select, String where, String groupby, Class tClass) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(select); - stringBuffer.append(" from "); - stringBuffer.append(" usdt_fund_flow "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - stringBuffer.append(" group by "); - stringBuffer.append(groupby); - List result = jdbcTemplate.queryForList(stringBuffer.toString()); - List tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass); - return tList; - } - /** - * 查询资金流水 - * - * @param id 资金流水ID - * @return 资金流水 - */ - @Override - public UsdtFundFlow selectUsdtFundFlowById(Long id,boolean isUser) - { - UsdtFundFlow vo = usdtFundFlowMapper.selectUsdtFundFlowById(id); - if(isUser){ - checkUser(vo); - } - return vo; - } - - /** - * 查询资金流水列表 - * - * @param usdtFundFlow 资金流水 - * @return 资金流水 - */ - @Override - public List selectUsdtFundFlowList(UsdtFundFlow usdtFundFlow,boolean isUser) - { - if(usdtFundFlow == null){ - usdtFundFlow = new UsdtFundFlow(); - } - if(isUser){ - usdtFundFlow.setUserId(SecurityUtils.getUserId()); - } - List list = usdtFundFlowMapper.selectUsdtFundFlowList(usdtFundFlow); - if(isUser){ - checkUser(list); - } - return list; - } - - /** - * 新增资金流水 - * - * @param usdtFundFlow 资金流水 - * @return 结果 - */ - @Override - public int insertUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser) - { - usdtFundFlow.setCreatedAt(DateUtils.getNowDate()); - usdtFundFlow.setUpdatedAt(DateUtils.getNowDate()); - if(isUser){ - usdtFundFlow.setUserId(SecurityUtils.getUserId()); - } - return usdtFundFlowMapper.insertUsdtFundFlow(usdtFundFlow); - } - - /** - * 修改资金流水 - * - * @param usdtFundFlow 资金流水 - * @return 结果 - */ - @Override - public int updateUsdtFundFlow(UsdtFundFlow usdtFundFlow,boolean isUser) - { - usdtFundFlow.setUpdatedAt(DateUtils.getNowDate()); - if(isUser){ - checkUser(usdtFundFlow); - } - return usdtFundFlowMapper.updateUsdtFundFlow(usdtFundFlow); - } - - /** - * 批量删除资金流水 - * - * @param ids 需要删除的资金流水ID - * @return 结果 - */ - @Override - public int deleteUsdtFundFlowByIds(Long[] ids,boolean isUser) - { - if(isUser){ - List list= getByIds(Arrays.asList(ids),false,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getId); - checkUserPlus(list); - } - return usdtFundFlowMapper.deleteUsdtFundFlowByIds(ids); - } - - /** - * 删除资金流水信息 - * - * @param id 资金流水ID - * @return 结果 - */ - @Override - public int deleteUsdtFundFlowById(Long id,boolean isUser) - { - if(isUser){ - UsdtFundFlowPlus vo = getById(id,UsdtFundFlowPlus::getUserId,UsdtFundFlowPlus::getId); - checkUser(vo); - } - return usdtFundFlowMapper.deleteUsdtFundFlowById(id); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtUserSettlementConfigurationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtUserSettlementConfigurationServiceImpl.java deleted file mode 100644 index 298f29e..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UsdtUserSettlementConfigurationServiceImpl.java +++ /dev/null @@ -1,277 +0,0 @@ -package com.ruoyi.system.service.impl; - -import com.alibaba.fastjson.JSONArray; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.common.select.SelectItem; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.UsdtUserSettlementConfiguration; -import com.ruoyi.system.domain.UsdtUserSettlementConfigurationPlus; -import com.ruoyi.system.mapper.UsdtUserSettlementConfigurationMapper; -import com.ruoyi.system.service.IUsdtUserSettlementConfigurationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Service; - -import java.util.*; -/** - * 商户配置Service业务层处理 - * - * @author luqj - * @date 2025-12-04 - */ -@Service -public class UsdtUserSettlementConfigurationServiceImpl extends ServiceImpl implements IUsdtUserSettlementConfigurationService -{ - @Autowired - private UsdtUserSettlementConfigurationMapper usdtUserSettlementConfigurationMapper; - @Autowired - private JdbcTemplate jdbcTemplate; - - @Override - public List getByIds(List ids ,boolean isUser, SFunction... columns) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).in(UsdtUserSettlementConfigurationPlus::getId, ids); - if(isUser){ - lambdaQueryWrapper.eq(UsdtUserSettlementConfigurationPlus::getUserId, SecurityUtils.getUserId()); - } - List list = this.list(lambdaQueryWrapper); - if(isUser){ - checkUserPlus(list); - } - return list; - } - private void checkUserPlus(List list) { - for (UsdtUserSettlementConfigurationPlus item : list){ - if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){ - throw new RuntimeException("无权限"); - } - } - } - private void checkUser(List list) { - for (UsdtUserSettlementConfiguration item : list){ - if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){ - throw new RuntimeException("无权限"); - } - } - } - private void checkUser(UsdtUserSettlementConfigurationPlus item) { - if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){ - throw new RuntimeException("无权限"); - } - } - private void checkUser(UsdtUserSettlementConfiguration item) { - if(null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()){ - throw new RuntimeException("无权限"); - } - } - @Override - public List select(String keyword,boolean isUser) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(UsdtUserSettlementConfigurationPlus::getId,UsdtUserSettlementConfigurationPlus::getUserId, UsdtUserSettlementConfigurationPlus::getRemark) - .like(UsdtUserSettlementConfigurationPlus::getRemark, keyword); - if(isUser){ - lambdaQueryWrapper.eq(UsdtUserSettlementConfigurationPlus::getUserId, SecurityUtils.getUserId()); - } - List list = this.list(lambdaQueryWrapper); - if(isUser){ - checkUserPlus(list); - } - List result =new ArrayList<>(); - for (UsdtUserSettlementConfigurationPlus item : list){ - SelectItem selectItem = new SelectItem(); - selectItem.setName(item.getRemark()); - selectItem.setId(item.getId()); - result.add(selectItem); - } - return result; - } - @Override - public UsdtUserSettlementConfigurationPlus getById(Long id, SFunction... columns) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).eq(UsdtUserSettlementConfigurationPlus::getId, id); - return baseMapper.selectOne(lambdaQueryWrapper); - } - - @Override - public Map getMapByIds(List ids, SFunction... columns) { - List list = this.getByIds(ids,false, columns); - Map map = new HashMap<>(); - for (UsdtUserSettlementConfigurationPlus item : list) { - map.put(item.getId(), item); - } - return map; - } - - @Override - public Map getMapByIds(List ids) { - List list = this.getByIds(ids); - Map map = new HashMap<>(); - for (UsdtUserSettlementConfigurationPlus item : list) { - map.put(item.getId(), item); - } - return map; - } - - @Override - public List getByIds(List ids) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper().in(UsdtUserSettlementConfigurationPlus::getId, ids); - return this.list(lambdaQueryWrapper); - } - - public T sum(String field, String where, Class tClass) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(" sum(" + field + ") as total "); - stringBuffer.append(" from usdt_user_settlement_configuration "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass); - return result; - } - - public Long count(String where) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(" count(1)"); - stringBuffer.append(" from "); - stringBuffer.append(" usdt_user_settlement_configuration "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class); - return result; - } - - public List countByGroupBy(String select, String where, String groupby, Class tClass) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(select); - stringBuffer.append(" from "); - stringBuffer.append(" usdt_user_settlement_configuration "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - stringBuffer.append(" group by "); - stringBuffer.append(groupby); - List result = jdbcTemplate.queryForList(stringBuffer.toString()); - List tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass); - return tList; - } - /** - * 查询商户配置 - * - * @param id 商户配置ID - * @return 商户配置 - */ - @Override - public UsdtUserSettlementConfiguration selectUsdtUserSettlementConfigurationById(Long id,boolean isUser) - { - UsdtUserSettlementConfiguration vo = usdtUserSettlementConfigurationMapper.selectUsdtUserSettlementConfigurationById(id); - if(isUser){ - checkUser(vo); - } - return vo; - } - - @Override - public UsdtUserSettlementConfigurationPlus getByUserId(Long userId) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .eq(UsdtUserSettlementConfigurationPlus::getUserId, userId); - return getOne(lambdaQueryWrapper); - } - - /** - * 查询商户配置列表 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 商户配置 - */ - @Override - public List selectUsdtUserSettlementConfigurationList(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser) - { - if(usdtUserSettlementConfiguration == null){ - usdtUserSettlementConfiguration = new UsdtUserSettlementConfiguration(); - } - if(isUser){ - usdtUserSettlementConfiguration.setUserId(SecurityUtils.getUserId()); - } - List list = usdtUserSettlementConfigurationMapper.selectUsdtUserSettlementConfigurationList(usdtUserSettlementConfiguration); - if(isUser){ - checkUser(list); - } - return list; - } - - /** - * 新增商户配置 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 结果 - */ - @Override - public int insertUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser) - { - usdtUserSettlementConfiguration.setCreatedAt(DateUtils.getNowDate()); - usdtUserSettlementConfiguration.setUpdatedAt(DateUtils.getNowDate()); - if(isUser){ - usdtUserSettlementConfiguration.setUserId(SecurityUtils.getUserId()); - } - return usdtUserSettlementConfigurationMapper.insertUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration); - } - - /** - * 修改商户配置 - * - * @param usdtUserSettlementConfiguration 商户配置 - * @return 结果 - */ - @Override - public int updateUsdtUserSettlementConfiguration(UsdtUserSettlementConfiguration usdtUserSettlementConfiguration,boolean isUser) - { - usdtUserSettlementConfiguration.setUpdatedAt(DateUtils.getNowDate()); - if(isUser){ - checkUser(usdtUserSettlementConfiguration); - } - return usdtUserSettlementConfigurationMapper.updateUsdtUserSettlementConfiguration(usdtUserSettlementConfiguration); - } - - /** - * 批量删除商户配置 - * - * @param ids 需要删除的商户配置ID - * @return 结果 - */ - @Override - public int deleteUsdtUserSettlementConfigurationByIds(Long[] ids,boolean isUser) - { - if(isUser){ - List list= getByIds(Arrays.asList(ids),false,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getId); - checkUserPlus(list); - } - return usdtUserSettlementConfigurationMapper.deleteUsdtUserSettlementConfigurationByIds(ids); - } - - /** - * 删除商户配置信息 - * - * @param id 商户配置ID - * @return 结果 - */ - @Override - public int deleteUsdtUserSettlementConfigurationById(Long id,boolean isUser) - { - if(isUser){ - UsdtUserSettlementConfigurationPlus vo = getById(id,UsdtUserSettlementConfigurationPlus::getUserId,UsdtUserSettlementConfigurationPlus::getId); - checkUser(vo); - } - return usdtUserSettlementConfigurationMapper.deleteUsdtUserSettlementConfigurationById(id); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserAuthServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserAuthServiceImpl.java deleted file mode 100644 index cdafc93..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserAuthServiceImpl.java +++ /dev/null @@ -1,271 +0,0 @@ -package com.ruoyi.system.service.impl; - -import com.alibaba.fastjson.JSONArray; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.common.select.SelectItem; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.UserAuth; -import com.ruoyi.system.domain.UserAuthPlus; -import com.ruoyi.system.mapper.UserAuthMapper; -import com.ruoyi.system.service.IUserAuthService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Service; - -import java.util.*; - -/** - * 用户授权Service业务层处理 - * - * @author luqj - * @date 2025-11-25 - */ -@Service -public class UserAuthServiceImpl extends ServiceImpl implements IUserAuthService { - @Autowired - private UserAuthMapper userAuthMapper; - @Autowired - private JdbcTemplate jdbcTemplate; - - @Override - public List getByIds(List ids, boolean isUser, SFunction... columns) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).in(UserAuthPlus::getId, ids); - if (isUser) { - lambdaQueryWrapper.eq(UserAuthPlus::getUserId, SecurityUtils.getUserId()); - } - List list = this.list(lambdaQueryWrapper); - if (isUser) { - checkUserPlus(list); - } - return list; - } - - private void checkUserPlus(List list) { - for (UserAuthPlus item : list) { - if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) { - throw new RuntimeException("无权限"); - } - } - } - - private void checkUser(List list) { - for (UserAuth item : list) { - if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) { - throw new RuntimeException("无权限"); - } - } - } - - private void checkUser(UserAuthPlus item) { - if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) { - throw new RuntimeException("无权限"); - } - } - - private void checkUser(UserAuth item) { - if (null != SecurityUtils.getUserId() && item.getUserId().longValue() != SecurityUtils.getUserId()) { - throw new RuntimeException("无权限"); - } - } - - @Override - public List select(String keyword, boolean isUser) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(UserAuthPlus::getId, UserAuthPlus::getUserId, UserAuthPlus::getName) - .like(UserAuthPlus::getName, keyword); - if (isUser) { - lambdaQueryWrapper.eq(UserAuthPlus::getUserId, SecurityUtils.getUserId()); - } - List list = this.list(lambdaQueryWrapper); - if (isUser) { - checkUserPlus(list); - } - List result = new ArrayList<>(); - for (UserAuthPlus item : list) { - SelectItem selectItem = new SelectItem(); - selectItem.setName(item.getName()); - selectItem.setId(item.getId()); - result.add(selectItem); - } - return result; - } - - @Override - public UserAuthPlus getById(Long id, SFunction... columns) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).eq(UserAuthPlus::getId, id); - return baseMapper.selectOne(lambdaQueryWrapper); - } - - @Override - public Map getMapByIds(List ids, SFunction... columns) { - List list = this.getByIds(ids, false, columns); - Map map = new HashMap<>(); - for (UserAuthPlus item : list) { - map.put(item.getId(), item); - } - return map; - } - - @Override - public Map getMapByIds(List ids) { - List list = this.getByIds(ids); - Map map = new HashMap<>(); - for (UserAuthPlus item : list) { - map.put(item.getId(), item); - } - return map; - } - - @Override - public List getByIds(List ids) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper().in(UserAuthPlus::getId, ids); - return this.list(lambdaQueryWrapper); - } - - public T sum(String field, String where, Class tClass) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(" sum(" + field + ") as total "); - stringBuffer.append(" from user_auth "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass); - return result; - } - - public Long count(String where) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(" count(1)"); - stringBuffer.append(" from "); - stringBuffer.append(" user_auth "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class); - return result; - } - - public List countByGroupBy(String select, String where, String groupby, Class tClass) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(select); - stringBuffer.append(" from "); - stringBuffer.append(" user_auth "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - stringBuffer.append(" group by "); - stringBuffer.append(groupby); - List result = jdbcTemplate.queryForList(stringBuffer.toString()); - List tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass); - return tList; - } - - /** - * 查询用户授权 - * - * @param id 用户授权ID - * @return 用户授权 - */ - @Override - public UserAuth selectUserAuthById(Long id, boolean isUser) { - UserAuth vo = userAuthMapper.selectUserAuthById(id); - if (isUser) { - checkUser(vo); - } - return vo; - } - - /** - * 查询用户授权列表 - * - * @param userAuth 用户授权 - * @return 用户授权 - */ - @Override - public List selectUserAuthList(UserAuth userAuth, boolean isUser) { - if (userAuth == null) { - userAuth = new UserAuth(); - } - if (isUser) { - userAuth.setUserId(SecurityUtils.getUserId()); - } - List list = userAuthMapper.selectUserAuthList(userAuth); - if (isUser) { - checkUser(list); - } - return list; - } - - /** - * 新增用户授权 - * - * @param userAuth 用户授权 - * @return 结果 - */ - @Override - public int insertUserAuth(UserAuth userAuth, boolean isUser) { - userAuth.setCreatedAt(DateUtils.getNowDate()); - userAuth.setUpdatedAt(DateUtils.getNowDate()); - if (isUser) { - userAuth.setUserId(SecurityUtils.getUserId()); - } - return userAuthMapper.insertUserAuth(userAuth); - } - - /** - * 修改用户授权 - * - * @param userAuth 用户授权 - * @return 结果 - */ - @Override - public int updateUserAuth(UserAuth userAuth, boolean isUser) { - userAuth.setUpdatedAt(DateUtils.getNowDate()); - if (isUser) { - checkUser(userAuth); - } - return userAuthMapper.updateUserAuth(userAuth); - } - - /** - * 批量删除用户授权 - * - * @param ids 需要删除的用户授权ID - * @return 结果 - */ - @Override - public int deleteUserAuthByIds(Long[] ids, boolean isUser) { - if (isUser) { - List list = getByIds(Arrays.asList(ids), false, UserAuthPlus::getUserId, UserAuthPlus::getId); - checkUserPlus(list); - } - return userAuthMapper.deleteUserAuthByIds(ids); - } - - /** - * 删除用户授权信息 - * - * @param id 用户授权ID - * @return 结果 - */ - @Override - public int deleteUserAuthById(Long id, boolean isUser) { - if (isUser) { - UserAuthPlus vo = getById(id, UserAuthPlus::getUserId, UserAuthPlus::getId); - checkUser(vo); - } - return userAuthMapper.deleteUserAuthById(id); - } -} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WalletAddressServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WalletAddressServiceImpl.java index 5a1ffe9..af4706c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WalletAddressServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WalletAddressServiceImpl.java @@ -184,14 +184,6 @@ public class WalletAddressServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper(); - lambdaQueryWrapper.eq(WalletAddressPlus::getId, id); - return this.update(walletAddressPlus,lambdaQueryWrapper); - } - @Override public Map getMapByIds(List ids) { List list = this.getByIds(ids); Map map = new HashMap<>(); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Web3WalletServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Web3WalletServiceImpl.java deleted file mode 100644 index 418a5de..0000000 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Web3WalletServiceImpl.java +++ /dev/null @@ -1,261 +0,0 @@ -package com.ruoyi.system.service.impl; - -import com.alibaba.fastjson.JSONArray; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.support.SFunction; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.Web3Wallet; -import com.ruoyi.system.domain.Web3WalletPlus; -import com.ruoyi.system.mapper.Web3WalletMapper; -import com.ruoyi.system.service.IWeb3WalletService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Service; - -import java.math.BigDecimal; -import java.util.*; - -/** - * 钱包管理Service业务层处理 - * - * @author luqj - * @date 2025-11-25 - */ -@Service -public class Web3WalletServiceImpl extends ServiceImpl implements IWeb3WalletService { - @Autowired - private Web3WalletMapper web3WalletMapper; - @Autowired - private JdbcTemplate jdbcTemplate; - - @Override - public List getByIds(List ids, boolean isUser, SFunction... columns) { - LambdaQueryWrapper lambdaQueryWrapper = null; - if (isUser) { - lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).eq(Web3WalletPlus::getId, SecurityUtils.getUserId()); - } else { - lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).in(Web3WalletPlus::getId, ids); - } - List list = this.list(lambdaQueryWrapper); - if (isUser) { - checkUserPlus(list); - } - return list; - } - - private void checkUserPlus(List list) { - for (Web3WalletPlus item : list) { - if (null != SecurityUtils.getUserId() && item.getId().longValue() != SecurityUtils.getUserId()) { - throw new RuntimeException("无权限"); - } - } - } - - private void checkUser(List list) { - for (Web3Wallet item : list) { - if (null != SecurityUtils.getUserId() && item.getId().longValue() != SecurityUtils.getUserId()) { - throw new RuntimeException("无权限"); - } - } - } - - private void checkUser(Web3WalletPlus item) { - if (null != SecurityUtils.getUserId() && item.getId().longValue() != SecurityUtils.getUserId()) { - throw new RuntimeException("无权限"); - } - } - - private void checkUser(Web3Wallet item) { - if (null != SecurityUtils.getUserId() && item.getId().longValue() != SecurityUtils.getUserId()) { - throw new RuntimeException("无权限"); - } - } - - @Override - public Web3WalletPlus getById(Long id, SFunction... columns) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() - .select(columns).eq(Web3WalletPlus::getId, id); - return baseMapper.selectOne(lambdaQueryWrapper); - } - - @Override - public Map getMapByIds(List ids, SFunction... columns) { - List list = this.getByIds(ids, false, columns); - Map map = new HashMap<>(); - for (Web3WalletPlus item : list) { - map.put(item.getId(), item); - } - return map; - } - - @Override - public Map getMapByIds(List ids) { - List list = this.getByIds(ids); - Map map = new HashMap<>(); - for (Web3WalletPlus item : list) { - map.put(item.getId(), item); - } - return map; - } - - @Override - public List getByIds(List ids) { - LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper().in(Web3WalletPlus::getId, ids); - return this.list(lambdaQueryWrapper); - } - - public T sum(String field, String where, Class tClass) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(" sum(" + field + ") as total "); - stringBuffer.append(" from web3_wallet "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - T result = jdbcTemplate.queryForObject(stringBuffer.toString(), tClass); - return result; - } - - public Long count(String where) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(" count(1)"); - stringBuffer.append(" from "); - stringBuffer.append(" web3_wallet "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - Long result = jdbcTemplate.queryForObject(stringBuffer.toString(), Long.class); - return result; - } - - public List countByGroupBy(String select, String where, String groupby, Class tClass) { - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("select "); - stringBuffer.append(select); - stringBuffer.append(" from "); - stringBuffer.append(" web3_wallet "); - if (StringUtils.isNotBlank(where)) { - stringBuffer.append(" where "); - stringBuffer.append(where); - } - stringBuffer.append(" group by "); - stringBuffer.append(groupby); - List result = jdbcTemplate.queryForList(stringBuffer.toString()); - List tList = JSONArray.parseArray(JSONArray.toJSONString(result), tClass); - return tList; - } - - /** - * 查询钱包管理 - * - * @param id 钱包管理ID - * @return 钱包管理 - */ - @Override - public Web3Wallet selectWeb3WalletById(Long id, boolean isUser) { - Web3Wallet vo = web3WalletMapper.selectWeb3WalletById(id); - if (isUser) { - checkUser(vo); - } - return vo; - } - - /** - * 查询钱包管理列表 - * - * @param web3Wallet 钱包管理 - * @return 钱包管理 - */ - @Override - public List selectWeb3WalletList(Web3Wallet web3Wallet, boolean isUser) { - if (isUser) { - Web3WalletPlus myWallet = this.getById(SecurityUtils.getUserId()); - if(myWallet == null){ - myWallet = new Web3WalletPlus(); - myWallet.setId(SecurityUtils.getUserId()); - myWallet.setPassword(UUID.randomUUID().toString()); - myWallet.setEthBalance(new BigDecimal(0)); - myWallet.setTrxBalance(new BigDecimal(0)); - myWallet.setUsdtBalance(new BigDecimal(0)); - myWallet.setCreatedAt(new Date()); - myWallet.setUpdatedAt(new Date()); - this.save(myWallet); - } - web3Wallet.setId(SecurityUtils.getUserId()); - } - List list = web3WalletMapper.selectWeb3WalletList(web3Wallet); - if (isUser) { - checkUser(list); - } - return list; - } - - /** - * 新增钱包管理 - * - * @param web3Wallet 钱包管理 - * @return 结果 - */ - @Override - public int insertWeb3Wallet(Web3Wallet web3Wallet, boolean isUser) { - web3Wallet.setCreatedAt(DateUtils.getNowDate()); - web3Wallet.setUpdatedAt(DateUtils.getNowDate()); - if (isUser) { - web3Wallet.setId(SecurityUtils.getUserId()); - } - return web3WalletMapper.insertWeb3Wallet(web3Wallet); - } - - /** - * 修改钱包管理 - * - * @param web3Wallet 钱包管理 - * @return 结果 - */ - @Override - public int updateWeb3Wallet(Web3Wallet web3Wallet, boolean isUser) { - web3Wallet.setUpdatedAt(DateUtils.getNowDate()); - if (isUser) { - checkUser(web3Wallet); - } - return web3WalletMapper.updateWeb3Wallet(web3Wallet); - } - - /** - * 批量删除钱包管理 - * - * @param ids 需要删除的钱包管理ID - * @return 结果 - */ - @Override - public int deleteWeb3WalletByIds(Long[] ids, boolean isUser) { - if (isUser) { - List list = getByIds(Arrays.asList(ids), false, Web3WalletPlus::getUsdtBalance, Web3WalletPlus::getId); - checkUserPlus(list); - } - return web3WalletMapper.deleteWeb3WalletByIds(ids); - } - - /** - * 删除钱包管理信息 - * - * @param id 钱包管理ID - * @return 结果 - */ - @Override - public int deleteWeb3WalletById(Long id, boolean isUser) { - if (isUser) { - Web3WalletPlus vo = getById(id, Web3WalletPlus::getUsdtBalance, Web3WalletPlus::getId); - checkUser(vo); - } - return web3WalletMapper.deleteWeb3WalletById(id); - } -} diff --git a/ruoyi-system/src/main/resources/mapper/system/UsdtAggregationTaskItemMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UsdtAggregationTaskItemMapper.xml index feba9d2..89c9ccd 100644 --- a/ruoyi-system/src/main/resources/mapper/system/UsdtAggregationTaskItemMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/UsdtAggregationTaskItemMapper.xml @@ -13,6 +13,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + @@ -20,17 +25,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, token_address, status, remark, ope_amount, created_at, updated_at, deleted_at, user_id, app_id, parent_id, dist_token_address from usdt_aggregation_task_item + select id, token_address, status, remark, ope_amount, created_at, updated_at, deleted_at, need_energy_num, need_bandwidth_num, gap_bandwidth_num, gap_energy_num, will_use_trx_num, user_id, app_id, parent_id, dist_token_address from usdt_aggregation_task_item @@ -49,6 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" created_at, updated_at, deleted_at, + need_energy_num, + need_bandwidth_num, + gap_bandwidth_num, + gap_energy_num, + will_use_trx_num, user_id, app_id, parent_id, @@ -62,6 +82,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{createdAt}, #{updatedAt}, #{deletedAt}, + #{needEnergyNum}, + #{needBandwidthNum}, + #{gapBandwidthNum}, + #{gapEnergyNum}, + #{willUseTrxNum}, #{userId}, #{appId}, #{parentId}, @@ -79,6 +104,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" created_at = #{createdAt}, updated_at = #{updatedAt}, deleted_at = #{deletedAt}, + need_energy_num = #{needEnergyNum}, + need_bandwidth_num = #{needBandwidthNum}, + gap_bandwidth_num = #{gapBandwidthNum}, + gap_energy_num = #{gapEnergyNum}, + will_use_trx_num = #{willUseTrxNum}, user_id = #{userId}, app_id = #{appId}, parent_id = #{parentId}, diff --git a/ruoyi-system/src/main/resources/mapper/system/UsdtFundFlowMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UsdtFundFlowMapper.xml deleted file mode 100644 index 8624ce7..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/UsdtFundFlowMapper.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - select id, order_id, user_id, app_id, created_at, updated_at, deleted_at, amount, op_type, token, remark from usdt_fund_flow - - - - - - - - insert into usdt_fund_flow - - order_id, - user_id, - app_id, - created_at, - updated_at, - deleted_at, - amount, - op_type, - token, - remark, - - - #{orderId}, - #{userId}, - #{appId}, - #{createdAt}, - #{updatedAt}, - #{deletedAt}, - #{amount}, - #{opType}, - #{token}, - #{remark}, - - - - - update usdt_fund_flow - - order_id = #{orderId}, - user_id = #{userId}, - app_id = #{appId}, - created_at = #{createdAt}, - updated_at = #{updatedAt}, - deleted_at = #{deletedAt}, - amount = #{amount}, - op_type = #{opType}, - token = #{token}, - remark = #{remark}, - - where id = #{id} - - - - delete from usdt_fund_flow where id = #{id} - - - - delete from usdt_fund_flow where id in - - #{id} - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/UsdtOrdersMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UsdtOrdersMapper.xml index b6c6947..3ca0e8e 100644 --- a/ruoyi-system/src/main/resources/mapper/system/UsdtOrdersMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/UsdtOrdersMapper.xml @@ -23,10 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - select id, trade_id, order_id, block_transaction_id, actual_amount, amount, token, status, notify_url, redirect_url, callback_num, callback_confirm, created_at, updated_at, deleted_at, app_id, settlement_status, user_id from orders + select id, trade_id, order_id,order_type, block_transaction_id, actual_amount, amount, token, status, notify_url, redirect_url, callback_num, callback_confirm, created_at, updated_at, deleted_at, app_id, settlement_status, user_id from orders @@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" app_id, settlement_status, user_id, + order_type, #{tradeId}, @@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{appId}, #{settlementStatus}, #{userId}, + #{orderType}, @@ -110,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" app_id = #{appId}, settlement_status = #{settlementStatus}, user_id = #{userId}, + order_type = #{orderType}, where id = #{id} diff --git a/ruoyi-system/src/main/resources/mapper/system/UsdtUserSettlementConfigurationMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UsdtUserSettlementConfigurationMapper.xml deleted file mode 100644 index abfea70..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/UsdtUserSettlementConfigurationMapper.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - select id, user_id, commission_rate, created_at, updated_at, deleted_at, withdrawal_fee, status, ext_info, remark from usdt_user_settlement_configuration - - - - - - - - insert into usdt_user_settlement_configuration - - user_id, - commission_rate, - created_at, - updated_at, - deleted_at, - withdrawal_fee, - status, - ext_info, - remark, - - - #{userId}, - #{commissionRate}, - #{createdAt}, - #{updatedAt}, - #{deletedAt}, - #{withdrawalFee}, - #{status}, - #{extInfo}, - #{remark}, - - - - - update usdt_user_settlement_configuration - - user_id = #{userId}, - commission_rate = #{commissionRate}, - created_at = #{createdAt}, - updated_at = #{updatedAt}, - deleted_at = #{deletedAt}, - withdrawal_fee = #{withdrawalFee}, - status = #{status}, - ext_info = #{extInfo}, - remark = #{remark}, - - where id = #{id} - - - - delete from usdt_user_settlement_configuration where id = #{id} - - - - delete from usdt_user_settlement_configuration where id in - - #{id} - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/UserAuthMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UserAuthMapper.xml deleted file mode 100644 index 58ded9e..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/UserAuthMapper.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - select id, user_id, auth_type, name, id_number, company_name, auth_status, created_at, updated_at, reviewer, deleted_at from user_auth - - - - - - - - insert into user_auth - - user_id, - auth_type, - name, - id_number, - company_name, - auth_status, - created_at, - updated_at, - reviewer, - deleted_at, - - - #{userId}, - #{authType}, - #{name}, - #{idNumber}, - #{companyName}, - #{authStatus}, - #{createdAt}, - #{updatedAt}, - #{reviewer}, - #{deletedAt}, - - - - - update user_auth - - user_id = #{userId}, - auth_type = #{authType}, - name = #{name}, - id_number = #{idNumber}, - company_name = #{companyName}, - auth_status = #{authStatus}, - created_at = #{createdAt}, - updated_at = #{updatedAt}, - reviewer = #{reviewer}, - deleted_at = #{deletedAt}, - - where id = #{id} - - - - delete from user_auth where id = #{id} - - - - delete from user_auth where id in - - #{id} - - - \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/WalletAddressMapper.xml b/ruoyi-system/src/main/resources/mapper/system/WalletAddressMapper.xml index 2f0210b..da97202 100644 --- a/ruoyi-system/src/main/resources/mapper/system/WalletAddressMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/WalletAddressMapper.xml @@ -13,12 +13,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + + - @@ -33,10 +35,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + - select id, token, status, created_at, updated_at,bandwidth_staked_num, deleted_at, app_id, user_id, token_key, usdt_balance, trx_balance, energy_num, bandwidth_num, withdraw_usdt_balance, delegated_energy_trx_num, delegated_energy_value, acquired_delegated_energy_trx_num, acquired_delegated_energy_value, delegated_bandwidth_trx_num, delegated_bandwidth_value, acquired_delegated_bandwidth_trx_num, acquired_delegated_bandwidth_value, staked_trx_num, energy_staked_trx_num, bandwidth_staked_trx_num, vote_num, voted_num from wallet_address + select id, token, status, created_at, updated_at, deleted_at, app_id, user_id, wallet_user_name, token_index, usdt_balance, trx_balance, energy_num, energy_all_num, energy_used_num, bandwidth_num, delegated_energy_trx_num, delegated_energy_value, acquired_delegated_energy_trx_num, acquired_delegated_energy_value, delegated_bandwidth_trx_num, delegated_bandwidth_value, acquired_delegated_bandwidth_trx_num, acquired_delegated_bandwidth_value, staked_trx_num, energy_staked_trx_num, bandwidth_staked_trx_num, vote_num, voted_num, bandwidth_staked_num, bandwidth_staked_all_num, bandwidth_free_num, bandwidth_free_all_num from wallet_address @@ -83,12 +97,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" deleted_at, app_id, user_id, - token_key, + wallet_user_name, + token_index, usdt_balance, trx_balance, energy_num, + energy_all_num, + energy_used_num, bandwidth_num, - withdraw_usdt_balance, delegated_energy_trx_num, delegated_energy_value, acquired_delegated_energy_trx_num, @@ -103,6 +119,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" vote_num, voted_num, bandwidth_staked_num, + bandwidth_staked_all_num, + bandwidth_free_num, + bandwidth_free_all_num, #{token}, @@ -112,12 +131,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{deletedAt}, #{appId}, #{userId}, - #{tokenKey}, + #{walletUserName}, + #{tokenIndex}, #{usdtBalance}, #{trxBalance}, #{energyNum}, + #{energyAllNum}, + #{energyUsedNum}, #{bandwidthNum}, - #{withdrawUsdtBalance}, #{delegatedEnergyTrxNum}, #{delegatedEnergyValue}, #{acquiredDelegatedEnergyTrxNum}, @@ -132,6 +153,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{voteNum}, #{votedNum}, #{bandwidthStakedNum}, + #{bandwidthStakedAllNum}, + #{bandwidthFreeNum}, + #{bandwidthFreeAllNum}, @@ -145,12 +169,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" deleted_at = #{deletedAt}, app_id = #{appId}, user_id = #{userId}, - token_key = #{tokenKey}, + wallet_user_name = #{walletUserName}, + token_index = #{tokenIndex}, usdt_balance = #{usdtBalance}, trx_balance = #{trxBalance}, energy_num = #{energyNum}, + energy_all_num = #{energyAllNum}, + energy_used_num = #{energyUsedNum}, bandwidth_num = #{bandwidthNum}, - withdraw_usdt_balance = #{withdrawUsdtBalance}, delegated_energy_trx_num = #{delegatedEnergyTrxNum}, delegated_energy_value = #{delegatedEnergyValue}, acquired_delegated_energy_trx_num = #{acquiredDelegatedEnergyTrxNum}, @@ -165,6 +191,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" vote_num = #{voteNum}, voted_num = #{votedNum}, bandwidth_staked_num = #{bandwidthStakedNum}, + bandwidth_staked_all_num = #{bandwidthStakedAllNum}, + bandwidth_free_num = #{bandwidthFreeNum}, + bandwidth_free_all_num = #{bandwidthFreeAllNum}, where id = #{id} diff --git a/ruoyi-system/src/main/resources/mapper/system/Web3WalletMapper.xml b/ruoyi-system/src/main/resources/mapper/system/Web3WalletMapper.xml deleted file mode 100644 index 859e5a9..0000000 --- a/ruoyi-system/src/main/resources/mapper/system/Web3WalletMapper.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - select id, usdt_balance, created_at, updated_at, deleted_at, trx_balance, eth_balance, password from web3_wallet - - - - - - - - insert into web3_wallet - - id, - usdt_balance, - created_at, - updated_at, - deleted_at, - trx_balance, - eth_balance, - password, - - - #{id}, - #{usdtBalance}, - #{createdAt}, - #{updatedAt}, - #{deletedAt}, - #{trxBalance}, - #{ethBalance}, - #{password}, - - - - - update web3_wallet - - usdt_balance = #{usdtBalance}, - created_at = #{createdAt}, - updated_at = #{updatedAt}, - deleted_at = #{deletedAt}, - trx_balance = #{trxBalance}, - eth_balance = #{ethBalance}, - password = #{password}, - - where id = #{id} - - - - delete from web3_wallet where id = #{id} - - - - delete from web3_wallet where id in - - #{id} - - - \ No newline at end of file