This commit is contained in:
Leo
2025-11-19 22:29:52 +08:00
parent 083bcca270
commit c541beb413
3 changed files with 31 additions and 8 deletions

View File

@@ -21,14 +21,15 @@ public class InstructionController extends BaseController {
}
/**
* 执行文本指令
* 执行文本指令(控制台入口,需要权限)
* body: { command: "京今日统计", forceGenerate: false }
*/
@PostMapping("/execute")
public AjaxResult execute(@RequestBody Map<String, Object> body) {
String cmd = body != null ? (body.get("command") != null ? String.valueOf(body.get("command")) : null) : null;
boolean forceGenerate = body != null && body.get("forceGenerate") != null && Boolean.parseBoolean(String.valueOf(body.get("forceGenerate")));
java.util.List<String> result = instructionService.execute(cmd, forceGenerate);
// 控制台入口,传递 isFromConsole=true跳过订单查询校验
java.util.List<String> result = instructionService.execute(cmd, forceGenerate, true);
return AjaxResult.success(result);
}