diff --git a/src/main/java/com/dispose/manager/impl/DeviceTaskManagerImpl.java b/src/main/java/com/dispose/manager/impl/DeviceTaskManagerImpl.java index 0247aae3..98abd24d 100644 --- a/src/main/java/com/dispose/manager/impl/DeviceTaskManagerImpl.java +++ b/src/main/java/com/dispose/manager/impl/DeviceTaskManagerImpl.java @@ -48,7 +48,7 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager { @Override public boolean addDisposeDeviceTaskInfo(Long taskId, Long deviceId, Long attackTypeMask) { // 如果已经存在相同任务,不再添加重复任务 - if (deviceTaskMapper.getTaskByDetails(taskId, deviceId).size() != 0) { + if (deviceTaskCreated(taskId, deviceId)) { return true; }