feat(mcp): 新增站点备用机列表查询工具 hardware.back.list.query

- 复刻老系统(xiaoqu-complex)/districtHardwareBack/queryHardwareBackListByDistrictId,
  返回 LLM 友好记录列表,selectCount 修复老接口分页 records 取页大小的 bug
- districtId 与 snCode 至少传一个;onlineStatus 取自 hardware_view.status 按页批量 IN 查询
- 新增 applyHardwareBackRowFilter 镜像 hardware_view 行权限,补齐老接口缺失的权限过滤
- prod 启动绑定研发专用 scope 6(code=code),dev 种子绑「测试专用」(code=test)
This commit is contained in:
wangheng
2026-12-02 11:39:48 +08:00
parent 8b985a4696
commit 5650f6732e
9 changed files with 3234 additions and 2640 deletions
+7
View File
@@ -125,6 +125,13 @@ SELECT s.id, t.id, 0 FROM agent_scope s JOIN tool t
WHERE s.code = 'test' AND t.name = 'sms.vercode.latest.query'
AND NOT EXISTS (SELECT 1 FROM scope_tool st WHERE st.scope_id = s.id AND st.tool_id = t.id);
-- 站点备用机列表(hardware.back.list.query):拍板 prod 只绑研发专用 scope 6,
-- dev 等价绑「测试专用」(code='test');不进入 operation/hardware/ops-query/sync。
INSERT INTO scope_tool (scope_id, tool_id, create_id)
SELECT s.id, t.id, 0 FROM agent_scope s JOIN tool t
WHERE s.code = 'test' AND t.name = 'hardware.back.list.query'
AND NOT EXISTS (SELECT 1 FROM scope_tool st WHERE st.scope_id = s.id AND st.tool_id = t.id);
COMMIT;
-- 校验