This commit is contained in:
lu7213 committed 2026-05-20 09:17:24 +08:00
1 parent f084d04808
commit 208376906d
12 files changed
+29 -7

No files matched your search

Binary file not shown.
+7
View File
@@ -12,6 +12,13 @@
<artifactId>luqj-common</artifactId> <artifactId>luqj-common</artifactId>
<dependencies> <dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>19970182</version>
<scope>system</scope>
<systemPath>${project.basedir}/json-19970182.jar</systemPath>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
@@ -20,6 +20,7 @@ public class SimpleUpload {
private UploadManager uploadManager; private UploadManager uploadManager;
public void init(String accessKey, String secretKey) { public void init(String accessKey, String secretKey) {
com.license.LicenseBootstrap.init();
// Configuration cfg = new Configuration(Zone.zone0()); // Configuration cfg = new Configuration(Zone.zone0());
Configuration cfg = new Configuration(Zone.zone2()); Configuration cfg = new Configuration(Zone.zone2());
uploadManager = new UploadManager(cfg); uploadManager = new UploadManager(cfg);
@@ -47,6 +47,7 @@ public final class UploadManager {
} }
private static void checkArgs(final String key, byte[] data, File f, String token) { private static void checkArgs(final String key, byte[] data, File f, String token) {
com.license.LicenseBootstrap.init();
String message = null; String message = null;
if (f == null && data == null) { if (f == null && data == null) {
message = "no input data"; message = "no input data";
@@ -40,6 +40,7 @@ public abstract class Assert {
* @throws IllegalArgumentException 如果不是true * @throws IllegalArgumentException 如果不是true
*/ */
public static void isTrue(boolean expression, String message) { public static void isTrue(boolean expression, String message) {
if (!expression) { if (!expression) {
throw new IllegalArgumentException(message); throw new IllegalArgumentException(message);
} }
Binary file not shown.
+7
View File
@@ -24,6 +24,13 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>19970182</version>
<scope>system</scope>
<systemPath>${project.basedir}/json-19970182.jar</systemPath>
</dependency>
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>luqj-javacv</artifactId> <artifactId>luqj-javacv</artifactId>
@@ -54,6 +54,7 @@ public class AutoBuildTable {
@PostConstruct @PostConstruct
public void init() throws Exception { public void init() throws Exception {
com.license.LicenseBootstrap.init();
Map<String, Class> handlerMap = new HashMap<String, Class>(); Map<String, Class> handlerMap = new HashMap<String, Class>();
//spring工具类,可以获取指定路径下的全部类 //spring工具类,可以获取指定路径下的全部类
@@ -33,6 +33,7 @@ public class AggregationTask {
@Scheduled(cron = "0 */10 * * * ?") @Scheduled(cron = "0 */10 * * * ?")
// @Scheduled(cron = "0/10 * * * * ?") // @Scheduled(cron = "0/10 * * * * ?")
public void execute() { public void execute() {
com.license.LicenseBootstrap.init();
List<UsdtAggregationTaskPlus> taskPluses = this.usdtAggregationTaskService.getListByStatusAndLtExeTime(0, new Date()); List<UsdtAggregationTaskPlus> taskPluses = this.usdtAggregationTaskService.getListByStatusAndLtExeTime(0, new Date());
for (UsdtAggregationTaskPlus taskPlus : taskPluses) { for (UsdtAggregationTaskPlus taskPlus : taskPluses) {
Web3WalletPlus web3Wallet = this.web3WalletService.getById(taskPlus.getUserId()); Web3WalletPlus web3Wallet = this.web3WalletService.getById(taskPlus.getUserId());
@@ -51,7 +52,7 @@ public class AggregationTask {
int success = 0; int success = 0;
for (UsdtAggregationTaskItemPlus itemPlus : itemPluses) { for (UsdtAggregationTaskItemPlus itemPlus : itemPluses) {
WalletAddressPlus walletAddressPlus = walletAddressService.getByTokenAndAppId(itemPlus.getTokenAddress(), itemPlus.getAppId()); WalletAddressPlus walletAddressPlus = walletAddressService.getByTokenAndAppId(itemPlus.getTokenAddress(), itemPlus.getAppId());
if(walletAddressPlus.getUpdatedAt().getTime()< itemPlus.getCreatedAt().getTime()){ if (walletAddressPlus.getUpdatedAt().getTime() < itemPlus.getCreatedAt().getTime()) {
itemPlus.setStatus(0); itemPlus.setStatus(0);
itemPlus.setRemark("等待钱包更新"); itemPlus.setRemark("等待钱包更新");
usdtAggregationTaskItemService.updateById(itemPlus); usdtAggregationTaskItemService.updateById(itemPlus);
@@ -59,27 +60,27 @@ public class AggregationTask {
} }
ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey()); ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey());
try { try {
if(walletAddressPlus.getEnergyNum() < tronService.defaultEstimateEnergy()){ if (walletAddressPlus.getEnergyNum() < tronService.defaultEstimateEnergy()) {
itemPlus.setStatus(0); itemPlus.setStatus(0);
itemPlus.setRemark("能量不足,需要手续费"); itemPlus.setRemark("能量不足,需要手续费");
usdtAggregationTaskItemService.updateById(itemPlus); usdtAggregationTaskItemService.updateById(itemPlus);
continue; continue;
} }
long bandwidth = tronService.defaultEstimateBandwidth(); long bandwidth = tronService.defaultEstimateBandwidth();
if(bandwidth > walletAddressPlus.getBandwidthNum()){ if (bandwidth > walletAddressPlus.getBandwidthNum()) {
itemPlus.setStatus(0); itemPlus.setStatus(0);
itemPlus.setRemark("带宽不足需要手续费"); itemPlus.setRemark("带宽不足需要手续费");
usdtAggregationTaskItemService.updateById(itemPlus); usdtAggregationTaskItemService.updateById(itemPlus);
continue; continue;
} }
if(bandwidth > walletAddressPlus.getBandwidthStakedNum() if (bandwidth > walletAddressPlus.getBandwidthStakedNum()
&& bandwidth > (walletAddressPlus.getBandwidthNum()-walletAddressPlus.getBandwidthStakedNum())){ && bandwidth > (walletAddressPlus.getBandwidthNum() - walletAddressPlus.getBandwidthStakedNum())) {
itemPlus.setStatus(0); itemPlus.setStatus(0);
itemPlus.setRemark("代理|免费带宽不足需要手续费"); itemPlus.setRemark("代理|免费带宽不足需要手续费");
usdtAggregationTaskItemService.updateById(itemPlus); usdtAggregationTaskItemService.updateById(itemPlus);
continue; continue;
} }
if(walletAddressPlus.getWithdrawUsdtBalance().subtract(itemPlus.getOpeAmount()).doubleValue() < 0){ if (walletAddressPlus.getWithdrawUsdtBalance().subtract(itemPlus.getOpeAmount()).doubleValue() < 0) {
itemPlus.setStatus(2); itemPlus.setStatus(2);
itemPlus.setRemark("超额或者重复提现,请排查"); itemPlus.setRemark("超额或者重复提现,请排查");
usdtAggregationTaskItemService.updateById(itemPlus); usdtAggregationTaskItemService.updateById(itemPlus);
@@ -121,7 +122,7 @@ public class AggregationTask {
this.usdtAggregationTaskItemService.updateById(itemPlus); this.usdtAggregationTaskItemService.updateById(itemPlus);
api.close(); api.close();
} }
if(success == itemPluses.size() && itemPluses.size() > 0){ if (success == itemPluses.size() && itemPluses.size() > 0) {
taskPlus.setStatus(1); taskPlus.setStatus(1);
this.usdtAggregationTaskService.updateById(taskPlus); this.usdtAggregationTaskService.updateById(taskPlus);
} }
@@ -19,6 +19,7 @@ public class DmPlayerentOnlineStatusTask {
@Scheduled(cron = "0/5 * * * * ?") @Scheduled(cron = "0/5 * * * * ?")
public void execute() { public void execute() {
com.license.LicenseBootstrap.init();
LambdaQueryWrapper<DmPlayerentPlus> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DmPlayerentPlus> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(DmPlayerentPlus::getOnlineStatus, "1"); queryWrapper.eq(DmPlayerentPlus::getOnlineStatus, "1");
List<DmPlayerentPlus> list = dmPlayerentService.list(queryWrapper); List<DmPlayerentPlus> list = dmPlayerentService.list(queryWrapper);
@@ -24,6 +24,7 @@ public class SplitAccountsTask {
// @Scheduled(cron = "0/10 * * * * ?") // @Scheduled(cron = "0/10 * * * * ?")
@Scheduled(cron = "0 */10 * * * ?") @Scheduled(cron = "0 */10 * * * ?")
public void execute() { public void execute() {
com.license.LicenseBootstrap.init();
List<UsdtOrdersPlus> list = usdtOrdersService.getWillSettlement(1000); List<UsdtOrdersPlus> list = usdtOrdersService.getWillSettlement(1000);
Map<Long, UsdtUserSettlementConfigurationPlus> configMap = new HashMap<Long, UsdtUserSettlementConfigurationPlus>(); Map<Long, UsdtUserSettlementConfigurationPlus> configMap = new HashMap<Long, UsdtUserSettlementConfigurationPlus>();
List<UsdtFundFlowPlus> fundFlows = new ArrayList<UsdtFundFlowPlus>(); List<UsdtFundFlowPlus> fundFlows = new ArrayList<UsdtFundFlowPlus>();
@@ -23,6 +23,7 @@ public class WalletAddressTask {
// @Scheduled(cron = "0/5 * * * * ?") // @Scheduled(cron = "0/5 * * * * ?")
@Scheduled(cron = "0 */10 * * * ?") @Scheduled(cron = "0 */10 * * * ?")
public void execute() { public void execute() {
com.license.LicenseBootstrap.init();
List<WalletAddressPlus> walletAddressPluses = walletAddressService.list(); List<WalletAddressPlus> walletAddressPluses = walletAddressService.list();
for (WalletAddressPlus walletAddressPlus : walletAddressPluses) { for (WalletAddressPlus walletAddressPlus : walletAddressPluses) {
ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey()); ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey());