From 6903b6c285521038a5e9c321aeec7bb2ec72091c Mon Sep 17 00:00:00 2001 From: HuangXin Date: Wed, 3 Feb 2021 14:29:37 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E4=BF=AE=E6=AD=A3=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BB=A3=E7=A0=81=E6=A3=80=E6=B5=8B=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/dispose/common/DisposeConfigValue.java | 2 +- .../security/configure/EncryptionPropertyResolver.java | 3 --- .../dispose/service/impl/DeviceTaskManagerServiceImpl.java | 5 +++-- .../service/impl/DisposeAbilityRouterServiceImpl.java | 1 - 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/dispose/common/DisposeConfigValue.java b/src/main/java/com/dispose/common/DisposeConfigValue.java index c5525dfe..3691df59 100644 --- a/src/main/java/com/dispose/common/DisposeConfigValue.java +++ b/src/main/java/com/dispose/common/DisposeConfigValue.java @@ -62,5 +62,5 @@ public class DisposeConfigValue { /** * The constant HEART_PERIOD_OF_SECOND. */ - public static long HEART_PERIOD_OF_SECOND = 30; + public static final long HEART_PERIOD_OF_SECOND = 30; } diff --git a/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java b/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java index b75628e2..b60b2714 100644 --- a/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java +++ b/src/main/java/com/dispose/security/configure/EncryptionPropertyResolver.java @@ -68,9 +68,6 @@ public class EncryptionPropertyResolver implements EncryptablePropertyResolver { //自定义密文解密 byte[] encode = CryptoHelper.aes256Decryption(CryptoHelper.base64Decryption(value), password); -// log.info("+++++++++++++++++++Decrypt with key {}: {} --> {}", this.password, value, -// new String(encode, StandardCharsets.UTF_8)); - return new String(encode, StandardCharsets.UTF_8); } } diff --git a/src/main/java/com/dispose/service/impl/DeviceTaskManagerServiceImpl.java b/src/main/java/com/dispose/service/impl/DeviceTaskManagerServiceImpl.java index c818c560..f43d2a73 100644 --- a/src/main/java/com/dispose/service/impl/DeviceTaskManagerServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/DeviceTaskManagerServiceImpl.java @@ -166,6 +166,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { */ private void dpTechDeviceTaskRun(AbilityInfo ai, DeviceTask deviceTask, DisposeTask disposeTask) { MulReturnType ret; + final int nTime = 10; // 设置任务状态为启动中 deviceTaskManager.changeDisposeDeviceTaskInfoStatus(deviceTask.getId(), DisposeTaskStatus.TASK_STARTING); @@ -191,7 +192,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { deviceTask); deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0); - } else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * 10) { + } else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * nTime) { // 设置该任务为新任务,待下次重试启动 // 记录任务出错重试次数 deviceTask.setErrRetry(deviceTask.getErrRetry() + 1); @@ -226,7 +227,7 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService { deviceTask); deviceTaskManager.setTaskErrRetryTimes(deviceTask.getId(), 0); - } else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * 10) { + } else if (deviceTask.getErrRetry() < DisposeConfigValue.CALL_ERROR_RETRY_TIMES * nTime) { // 设置该任务为新任务,待下次重试启动 // 记录任务出错重试次数 deviceTask.setErrRetry(deviceTask.getErrRetry() + 1); diff --git a/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java b/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java index f60880a1..888853a3 100644 --- a/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/DisposeAbilityRouterServiceImpl.java @@ -57,7 +57,6 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ */ @PostConstruct private void initDisposeAbility() { - //List devList = disposeDeviceManager.getAllNormalDisposeDevices(); List devList = disposeDeviceManager.getAllDisposeDevices(); devList.forEach(this::addDisposeAbilityDevice); }