REM:
1. 修改设备id数据类型
This commit is contained in:
HuangXin 2020-11-13 17:09:08 +08:00
parent 08d68b66ab
commit b0084cf063
9 changed files with 15 additions and 11 deletions

View File

@ -62,7 +62,7 @@ public interface DisposeAbility {
* @param taskId the task id * @param taskId the task id
* @return the mul return type * @return the mul return type
*/ */
MulReturnType<ErrorCode, Long> taskStatus(Long taskId); MulReturnType<ErrorCode, Long> taskStatus(String taskId);
/** /**
* Gets ability device fireware. * Gets ability device fireware.

View File

@ -324,7 +324,7 @@ public class DpTechAbilityImpl implements DisposeAbility {
* @return the mul return type * @return the mul return type
*/ */
@Override @Override
public MulReturnType<ErrorCode, Long> taskStatus(Long taskId) { public MulReturnType<ErrorCode, Long> taskStatus(String taskId) {
return new MulReturnType<>(ErrorCode.ERR_UNSUPPORT, -1L); return new MulReturnType<>(ErrorCode.ERR_UNSUPPORT, -1L);
} }
} }

View File

@ -222,7 +222,7 @@ public class HaoHanAbilityImpl implements DisposeAbility {
* @return the mul return type * @return the mul return type
*/ */
@Override @Override
public MulReturnType<ErrorCode, Long> taskStatus(Long taskId) { public MulReturnType<ErrorCode, Long> taskStatus(String taskId) {
return new MulReturnType<>(ErrorCode.ERR_UNSUPPORT, -1L); return new MulReturnType<>(ErrorCode.ERR_UNSUPPORT, -1L);
} }
} }

View File

@ -415,7 +415,7 @@ public class PengXinAbilityImpl implements DisposeAbility {
* @return the mul return type * @return the mul return type
*/ */
@Override @Override
public MulReturnType<ErrorCode, Long> taskStatus(Long taskId) { public MulReturnType<ErrorCode, Long> taskStatus(String taskId) {
if (token == null || token.length() == 0) { if (token == null || token.length() == 0) {
return new MulReturnType<>(ErrorCode.ERR_LOGOUT, -1L); return new MulReturnType<>(ErrorCode.ERR_LOGOUT, -1L);
} }

View File

@ -140,7 +140,7 @@ public class VirtualAbilityImpl implements DisposeAbility {
* @return the mul return type * @return the mul return type
*/ */
@Override @Override
public MulReturnType<ErrorCode, Long> taskStatus(Long taskId) { public MulReturnType<ErrorCode, Long> taskStatus(String taskId) {
return new MulReturnType<>(ErrorCode.ERR_UNSUPPORT, -1L); return new MulReturnType<>(ErrorCode.ERR_UNSUPPORT, -1L);
} }
} }

View File

@ -51,7 +51,7 @@ public interface DeviceTaskManager {
* @param id the id * @param id the id
* @return the dispose device task status * @return the dispose device task status
*/ */
int changeDisposeDeviceTaskInfoDevStatus(Long id, Long devStatus); int changeDisposeDeviceTaskInfoDevStatus(String id, Long devStatus);
/** /**
* Sets exec attack type. * Sets exec attack type.

View File

@ -87,7 +87,7 @@ public class DeviceTaskManagerImpl implements DeviceTaskManager {
* @return the long * @return the long
*/ */
@Override @Override
public int changeDisposeDeviceTaskInfoDevStatus(Long id, Long devStatus) { public int changeDisposeDeviceTaskInfoDevStatus(String id, Long devStatus) {
return deviceTaskMapper.changeTaskDevStatus(id, devStatus); return deviceTaskMapper.changeTaskDevStatus(id, devStatus);
} }

View File

@ -92,7 +92,7 @@ public interface DeviceTaskMapper {
* @param status the status * @param status the status
* @return the int * @return the int
*/ */
int changeTaskDevStatus(@Param("id") Long id, int changeTaskDevStatus(@Param("id") String id,
@Param("status") Long status); @Param("status") Long status);
/** /**

View File

@ -716,10 +716,14 @@ public class DeviceTaskManagerServiceImpl implements DeviceTaskManagerService {
// 任务预计结束5分钟内 // 任务预计结束5分钟内
if (Helper.getTimestampDiffNow(task.getPlanEndTime()) < 5 * 60) { if (Helper.getTimestampDiffNow(task.getPlanEndTime()) < 5 * 60) {
if (v.getEndTime() == null && Helper.getTimestampDiffNow(v.getEndTime()) < 5 * 60) { if (v.getEndTime() == null && Helper.getTimestampDiffNow(v.getEndTime()) < 5 * 60) {
MulReturnType<ErrorCode, Long> ret = ai.getDb().taskStatus(v.getId());
if (ret.getFirstParam() == ErrorCode.ERR_OK) { if (v.getExternId() != null && v.getExternId().length() > 0) {
deviceTaskManager.changeDisposeDeviceTaskInfoDevStatus(v.getId(), ret.getSecondParam()); MulReturnType<ErrorCode, Long> ret = ai.getDb().taskStatus(v.getExternId());
if (ret.getFirstParam() == ErrorCode.ERR_OK) {
deviceTaskManager.changeDisposeDeviceTaskInfoDevStatus(v.getExternId(),
ret.getSecondParam());
}
} }
} }
} }