ft:指令停止下发、允许下发通用接口接口

This commit is contained in:
PushM
2024-08-01 01:07:38 +08:00
parent fe7b515f7b
commit 037eda3a21

View File

@@ -345,8 +345,23 @@ public class TaskController implements TaskControllerApi {
public ResponseResult setCommandJudged(@PathVariable Integer isJudged,
@PathVariable String commandId) {
return ResponseResult.ok()
// .setData("success", commandService.setCommandJudged(commandId, isJudged))
.setData("success", true)
.setData("success", commandService.setCommandJudged(commandId, isJudged))
// .setData("success", true)
.setData("command_id", commandId);
}
@GetMapping("/{commandId}/valid2/{isValid}")
public ResponseResult setCommandValid(@PathVariable Integer isValid,
@PathVariable String commandId) {
if (isValid < 0 || isValid > 1) {
return ResponseResult.invalid()
.setData("success", false)
.setData("command_id", commandId);
}
return ResponseResult.ok()
.setData("success", commandService.setCommandValid(commandId, isValid))
// .setData("success", true)
.setData("command_id", commandId);
}