This commit is contained in:
张成
2025-12-15 18:36:20 +08:00
parent c083494fce
commit 6e5c35f144
15 changed files with 867 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ const db = require('../dbProxy');
const jobManager = require('../job/index');
const ScheduleUtils = require('./utils');
const ScheduleConfig = require('./config');
const authorizationService = require('../../services/authorization_service');
/**
@@ -91,6 +92,12 @@ class CommandManager {
throw new Error(`任务不存在: ${task_id}`);
}
// 1.5 检查账号授权状态
const authCheck = await authorizationService.checkAuthorization(task.sn_code, 'sn_code');
if (!authCheck.is_authorized) {
throw new Error(`授权检查失败: ${authCheck.message}`);
}
// 2. 获取指令信息
const command_name = command.command_name || command.name || '未知指令';
const command_type = command.command_type || command.type;