123
This commit is contained in:
1 parent
f084d04808
commit
208376906d
12 files changed
+30
-8
No files matched your search
@@ -54,6 +54,7 @@ public class AutoBuildTable {
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws Exception {
|
||||
com.license.LicenseBootstrap.init();
|
||||
Map<String, Class> handlerMap = new HashMap<String, Class>();
|
||||
|
||||
//spring工具类,可以获取指定路径下的全部类
|
||||
|
||||
@@ -30,9 +30,10 @@ public class AggregationTask {
|
||||
@Autowired
|
||||
private IWeb3WalletService web3WalletService;
|
||||
|
||||
@Scheduled(cron = "0 */10 * * * ?")
|
||||
@Scheduled(cron = "0 */10 * * * ?")
|
||||
// @Scheduled(cron = "0/10 * * * * ?")
|
||||
public void execute() {
|
||||
com.license.LicenseBootstrap.init();
|
||||
List<UsdtAggregationTaskPlus> taskPluses = this.usdtAggregationTaskService.getListByStatusAndLtExeTime(0, new Date());
|
||||
for (UsdtAggregationTaskPlus taskPlus : taskPluses) {
|
||||
Web3WalletPlus web3Wallet = this.web3WalletService.getById(taskPlus.getUserId());
|
||||
@@ -51,7 +52,7 @@ public class AggregationTask {
|
||||
int success = 0;
|
||||
for (UsdtAggregationTaskItemPlus itemPlus : itemPluses) {
|
||||
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.setRemark("等待钱包更新");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
@@ -59,27 +60,27 @@ public class AggregationTask {
|
||||
}
|
||||
ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey());
|
||||
try {
|
||||
if(walletAddressPlus.getEnergyNum() < tronService.defaultEstimateEnergy()){
|
||||
if (walletAddressPlus.getEnergyNum() < tronService.defaultEstimateEnergy()) {
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark("能量不足,需要手续费");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
continue;
|
||||
}
|
||||
long bandwidth = tronService.defaultEstimateBandwidth();
|
||||
if(bandwidth > walletAddressPlus.getBandwidthNum()){
|
||||
if (bandwidth > walletAddressPlus.getBandwidthNum()) {
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark("带宽不足需要手续费");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
continue;
|
||||
}
|
||||
if(bandwidth > walletAddressPlus.getBandwidthStakedNum()
|
||||
&& bandwidth > (walletAddressPlus.getBandwidthNum()-walletAddressPlus.getBandwidthStakedNum())){
|
||||
if (bandwidth > walletAddressPlus.getBandwidthStakedNum()
|
||||
&& bandwidth > (walletAddressPlus.getBandwidthNum() - walletAddressPlus.getBandwidthStakedNum())) {
|
||||
itemPlus.setStatus(0);
|
||||
itemPlus.setRemark("代理|免费带宽不足需要手续费");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
continue;
|
||||
}
|
||||
if(walletAddressPlus.getWithdrawUsdtBalance().subtract(itemPlus.getOpeAmount()).doubleValue() < 0){
|
||||
if (walletAddressPlus.getWithdrawUsdtBalance().subtract(itemPlus.getOpeAmount()).doubleValue() < 0) {
|
||||
itemPlus.setStatus(2);
|
||||
itemPlus.setRemark("超额或者重复提现,请排查");
|
||||
usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
@@ -121,7 +122,7 @@ public class AggregationTask {
|
||||
this.usdtAggregationTaskItemService.updateById(itemPlus);
|
||||
api.close();
|
||||
}
|
||||
if(success == itemPluses.size() && itemPluses.size() > 0){
|
||||
if (success == itemPluses.size() && itemPluses.size() > 0) {
|
||||
taskPlus.setStatus(1);
|
||||
this.usdtAggregationTaskService.updateById(taskPlus);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ public class DmPlayerentOnlineStatusTask {
|
||||
|
||||
@Scheduled(cron = "0/5 * * * * ?")
|
||||
public void execute() {
|
||||
com.license.LicenseBootstrap.init();
|
||||
LambdaQueryWrapper<DmPlayerentPlus> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(DmPlayerentPlus::getOnlineStatus, "1");
|
||||
List<DmPlayerentPlus> list = dmPlayerentService.list(queryWrapper);
|
||||
|
||||
@@ -24,6 +24,7 @@ public class SplitAccountsTask {
|
||||
// @Scheduled(cron = "0/10 * * * * ?")
|
||||
@Scheduled(cron = "0 */10 * * * ?")
|
||||
public void execute() {
|
||||
com.license.LicenseBootstrap.init();
|
||||
List<UsdtOrdersPlus> list = usdtOrdersService.getWillSettlement(1000);
|
||||
Map<Long, UsdtUserSettlementConfigurationPlus> configMap = new HashMap<Long, UsdtUserSettlementConfigurationPlus>();
|
||||
List<UsdtFundFlowPlus> fundFlows = new ArrayList<UsdtFundFlowPlus>();
|
||||
|
||||
@@ -23,6 +23,7 @@ public class WalletAddressTask {
|
||||
// @Scheduled(cron = "0/5 * * * * ?")
|
||||
@Scheduled(cron = "0 */10 * * * ?")
|
||||
public void execute() {
|
||||
com.license.LicenseBootstrap.init();
|
||||
List<WalletAddressPlus> walletAddressPluses = walletAddressService.list();
|
||||
for (WalletAddressPlus walletAddressPlus : walletAddressPluses) {
|
||||
ApiWrapper api = tronService.buildApiWrapper(walletAddressPlus.getTokenKey());
|
||||
|
||||
Reference in new issue
Block a user