|
|
@ -31,6 +31,7 @@ import lombok.SneakyThrows; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
|
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -98,8 +99,6 @@ public class ConfluxServiceImpl implements ConfluxService { |
|
|
|
//校验时间戳
|
|
|
|
//校验时间戳
|
|
|
|
long time = Long.valueOf(checkArgs.getTimesTamp()); |
|
|
|
long time = Long.valueOf(checkArgs.getTimesTamp()); |
|
|
|
long timesTamp = System.currentTimeMillis(); |
|
|
|
long timesTamp = System.currentTimeMillis(); |
|
|
|
System.out.println("系统时间"+timesTamp); |
|
|
|
|
|
|
|
System.out.println("传入的时间"+time); |
|
|
|
|
|
|
|
if (timesTamp - time > 30000l) { |
|
|
|
if (timesTamp - time > 30000l) { |
|
|
|
return AjaxResult.error("时间参数错误!"); |
|
|
|
return AjaxResult.error("时间参数错误!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -161,14 +160,14 @@ public class ConfluxServiceImpl implements ConfluxService { |
|
|
|
executor.execute(() -> { |
|
|
|
executor.execute(() -> { |
|
|
|
boolean isFalg = true; |
|
|
|
boolean isFalg = true; |
|
|
|
while (isFalg) { |
|
|
|
while (isFalg) { |
|
|
|
if (executeMakeUp(contract, contractConfig.getUnitName())) { |
|
|
|
|
|
|
|
isFalg = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
Thread.sleep(500); |
|
|
|
Thread.sleep(5000); |
|
|
|
} catch (InterruptedException e) { |
|
|
|
} catch (InterruptedException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (executeMakeUp(contract, contractConfig.getUnitName())) { |
|
|
|
|
|
|
|
isFalg = false; |
|
|
|
|
|
|
|
} |
|
|
|
System.out.println("--------正在铸造----------->"); |
|
|
|
System.out.println("--------正在铸造----------->"); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -201,7 +200,6 @@ public class ConfluxServiceImpl implements ConfluxService { |
|
|
|
} |
|
|
|
} |
|
|
|
return AjaxResult.error("暂无数据"); |
|
|
|
return AjaxResult.error("暂无数据"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean executeMakeUp(String contract, String markName) { |
|
|
|
public boolean executeMakeUp(String contract, String markName) { |
|
|
|
log.info("[dispatchHandler]{}", "开始监听数据"); |
|
|
|
log.info("[dispatchHandler]{}", "开始监听数据"); |
|
|
|
CollectConfig collect = (CollectConfig) redisUtils.get(contract); |
|
|
|
CollectConfig collect = (CollectConfig) redisUtils.get(contract); |
|
|
|