|
|
@@ -7,6 +7,7 @@ import cn.hutool.core.lang.UUID;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
import com.fdkankan.common.constant.CommonOperStatus;
|
|
|
+import com.fdkankan.common.constant.CommonStatus;
|
|
|
import com.fdkankan.common.constant.CommonSuccessStatus;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
@@ -159,4 +160,14 @@ public class XinxizhongxinServiceImpl implements XinxizhongxinService {
|
|
|
}
|
|
|
zgxxzxPushLogService.updateBatch(list);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void cancelTask(Integer id) {
|
|
|
+ ZgxxzxPushLog zgxxzxPushLog = zgxxzxPushLogService.getById(id);
|
|
|
+ if(zgxxzxPushLog == null || zgxxzxPushLog.getStatus() != CommonSuccessStatus.WAITING.code()){
|
|
|
+ throw new BusinessException(ErrorCode.FILE_NOT_EXIST.code(), "任务不存在或者非等待状态,无法取消");
|
|
|
+ }
|
|
|
+ zgxxzxPushLog.setStatus(3);
|
|
|
+ zgxxzxPushLogService.updateById(zgxxzxPushLog);
|
|
|
+ }
|
|
|
}
|