Просмотр исходного кода

feat(backend): 新增qiwei接口实现(未测试)

ice-static 4 месяцев назад
Родитель
Сommit
bf4ecfea9f
100 измененных файлов с 11844 добавлено и 91 удалено
  1. 7 0
      .claude/settings.local.json
  2. 10 1
      backend/.env.example
  3. 102 0
      backend/src/apps/pc/app.ts
  4. 155 0
      backend/src/apps/pc/community/controllers/community.controller.ts
  5. 69 0
      backend/src/apps/pc/community/models/community.model.ts
  6. 43 0
      backend/src/apps/pc/community/routes/community.routes.ts
  7. 186 0
      backend/src/apps/pc/community/services/community.service.ts
  8. 120 0
      backend/src/apps/pc/compliance/controllers/compliance.controller.ts
  9. 109 0
      backend/src/apps/pc/compliance/models/compliance.model.ts
  10. 28 0
      backend/src/apps/pc/compliance/routes/compliance.routes.ts
  11. 268 0
      backend/src/apps/pc/compliance/services/compliance.service.ts
  12. 155 0
      backend/src/apps/pc/content/controllers/content.controller.ts
  13. 94 0
      backend/src/apps/pc/content/models/content.model.ts
  14. 48 0
      backend/src/apps/pc/content/routes/content.routes.ts
  15. 238 0
      backend/src/apps/pc/content/services/content.service.ts
  16. 90 0
      backend/src/apps/pc/dashboard/controllers/dashboard.controller.ts
  17. 34 0
      backend/src/apps/pc/dashboard/routes/dashboard.routes.ts
  18. 229 0
      backend/src/apps/pc/dashboard/services/dashboard.service.ts
  19. 0 16
      backend/src/apps/pc/health/app.ts
  20. 24 3
      backend/src/apps/pc/health/controllers/health.controller.ts
  21. 26 5
      backend/src/apps/pc/health/server.ts
  22. 132 0
      backend/src/apps/pc/koc/controllers/koc.controller.ts
  23. 88 0
      backend/src/apps/pc/koc/models/koc.model.ts
  24. 54 0
      backend/src/apps/pc/koc/routes/koc.routes.ts
  25. 306 0
      backend/src/apps/pc/koc/services/koc.service.ts
  26. 301 0
      backend/src/apps/pc/qiwei/controllers/qiwei.controller.ts
  27. 147 0
      backend/src/apps/pc/qiwei/models/qiwei.model.ts
  28. 55 0
      backend/src/apps/pc/qiwei/routes/qiwei.routes.ts
  29. 381 0
      backend/src/apps/pc/qiwei/services/qiwei.service.ts
  30. 170 0
      backend/src/apps/pc/risk/controllers/risk.controller.ts
  31. 91 0
      backend/src/apps/pc/risk/models/risk.model.ts
  32. 42 0
      backend/src/apps/pc/risk/routes/risk.routes.ts
  33. 247 0
      backend/src/apps/pc/risk/services/risk.service.ts
  34. 175 0
      backend/src/apps/pc/room/controllers/room.controller.ts
  35. 77 0
      backend/src/apps/pc/room/models/room.model.ts
  36. 34 0
      backend/src/apps/pc/room/routes/room.routes.ts
  37. 322 0
      backend/src/apps/pc/room/services/room.service.ts
  38. 146 0
      backend/src/apps/pc/sales/controllers/sales.controller.ts
  39. 111 0
      backend/src/apps/pc/sales/models/sales.model.ts
  40. 53 0
      backend/src/apps/pc/sales/routes/sales.routes.ts
  41. 158 0
      backend/src/apps/pc/sales/services/sales.service.ts
  42. 154 0
      backend/src/apps/pc/staff/controllers/staff.controller.ts
  43. 61 0
      backend/src/apps/pc/staff/models/staff.model.ts
  44. 31 0
      backend/src/apps/pc/staff/routes/staff.routes.ts
  45. 160 0
      backend/src/apps/pc/staff/services/staff.service.ts
  46. 93 0
      backend/src/apps/pc/workbench/controllers/workbench.controller.ts
  47. 72 0
      backend/src/apps/pc/workbench/models/workbench.model.ts
  48. 28 0
      backend/src/apps/pc/workbench/routes/workbench.routes.ts
  49. 187 0
      backend/src/apps/pc/workbench/services/workbench.service.ts
  50. 46 1
      backend/src/index.ts
  51. 35 0
      backend/src/shared/errors/app-error.ts
  52. 41 0
      backend/src/shared/http/error-handler.ts
  53. 85 0
      backend/src/shared/http/response.ts
  54. 122 0
      backend/src/shared/qiwei/client.ts
  55. 62 0
      backend/src/shared/types/page.ts
  56. 82 0
      backend/src/shared/utils/docid.ts
  57. 73 65
      doc/后端目录规范.md
  58. 809 0
      doc/开发/PC后端接口文档.md
  59. 111 0
      doc/开发/QiWe开放平台文档/README.md
  60. 210 0
      doc/开发/QiWe开放平台文档/md/OpenID 2.md
  61. 6 0
      doc/开发/QiWe开放平台文档/md/Openid.md
  62. 6 0
      doc/开发/QiWe开放平台文档/md/个人收藏-分页.md
  63. 5 0
      doc/开发/QiWe开放平台文档/md/个人收藏-添加GIF表情.md
  64. 222 0
      doc/开发/QiWe开放平台文档/md/个人标签-增删改.md
  65. 5 0
      doc/开发/QiWe开放平台文档/md/个微文件下载.md
  66. 7 0
      doc/开发/QiWe开放平台文档/md/个微文件异步下载.md
  67. 7 0
      doc/开发/QiWe开放平台文档/md/二维码-code验证(步骤4).md
  68. 12 0
      doc/开发/QiWe开放平台文档/md/二维码-获取(步骤2).md
  69. 11 0
      doc/开发/QiWe开放平台文档/md/二维码状态-检测(步骤3).md
  70. 6 0
      doc/开发/QiWe开放平台文档/md/企微大文件异步上传.md
  71. 8 0
      doc/开发/QiWe开放平台文档/md/企微大文件异步下载.md
  72. 5 0
      doc/开发/QiWe开放平台文档/md/企微文件下载.md
  73. 6 0
      doc/开发/QiWe开放平台文档/md/企微文件异步上传.md
  74. 7 0
      doc/开发/QiWe开放平台文档/md/企微文件异步下载.md
  75. 6 0
      doc/开发/QiWe开放平台文档/md/会话分页.md
  76. 229 0
      doc/开发/QiWe开放平台文档/md/会话组-查询.md
  77. 203 0
      doc/开发/QiWe开放平台文档/md/会话组-编辑.md
  78. 210 0
      doc/开发/QiWe开放平台文档/md/修改消息状态.md
  79. 203 0
      doc/开发/QiWe开放平台文档/md/修改群公告.md
  80. 203 0
      doc/开发/QiWe开放平台文档/md/修改群内昵称.md
  81. 203 0
      doc/开发/QiWe开放平台文档/md/修改群名称.md
  82. 6 0
      doc/开发/QiWe开放平台文档/md/修改群备注.md
  83. 12 0
      doc/开发/QiWe开放平台文档/md/停用设备.md
  84. 205 0
      doc/开发/QiWe开放平台文档/md/内部联系人信息-更新.md
  85. 218 0
      doc/开发/QiWe开放平台文档/md/内部联系人分页.md
  86. 232 0
      doc/开发/QiWe开放平台文档/md/列表分页.md
  87. 225 0
      doc/开发/QiWe开放平台文档/md/创建群.md
  88. 8 0
      doc/开发/QiWe开放平台文档/md/创建设备(步骤1).md
  89. 201 0
      doc/开发/QiWe开放平台文档/md/删除朋友圈.md
  90. 201 0
      doc/开发/QiWe开放平台文档/md/删除联系人.md
  91. 12 0
      doc/开发/QiWe开放平台文档/md/发送GIF表情消息.md
  92. 215 0
      doc/开发/QiWe开放平台文档/md/发送名片消息.md
  93. 9 0
      doc/开发/QiWe开放平台文档/md/发送图片消息.md
  94. 221 0
      doc/开发/QiWe开放平台文档/md/发送定位消息.md
  95. 6 0
      doc/开发/QiWe开放平台文档/md/发送小程序消息.md
  96. 221 0
      doc/开发/QiWe开放平台文档/md/发送文件消息.md
  97. 8 0
      doc/开发/QiWe开放平台文档/md/发送朋友圈.md
  98. 241 0
      doc/开发/QiWe开放平台文档/md/发送混合文本消息.md
  99. 217 0
      doc/开发/QiWe开放平台文档/md/发送纯文本消息.md
  100. 229 0
      doc/开发/QiWe开放平台文档/md/发送视频号消息.md

+ 7 - 0
.claude/settings.local.json

@@ -0,0 +1,7 @@
+{
+  "permissions": {
+    "allow": [
+      "Bash(npx tsc *)"
+    ]
+  }
+}

+ 10 - 1
backend/.env.example

@@ -1,7 +1,16 @@
+# 运行环境
 NODE_ENV=development
 
-MOBILE_CHAT_PORT=3201
+# PC 端统一端口(所有模块共用一个 Express App)
 PC_PORT=3101
 
+# Mobile 端端口
+MOBILE_CHAT_PORT=3201
+
+# QiWe(企微)开放平台
+# QIWEI_BASE_URL=http://manager.qiweapi.com/qiwe
+# QIWEI_TOKEN=your_token_here
+
+# DashScope(阿里云百炼)AI
 DASHSCOPE_API_KEY=your_api_key_here
 DASHSCOPE_APP_ID=your_app_id_here

+ 102 - 0
backend/src/apps/pc/app.ts

@@ -0,0 +1,102 @@
+/**
+ * PC 端统一 Express 应用装配层
+ *
+ * 职责:
+ *   - 创建唯一的 Express 实例
+ *   - 挂载通用中间件(cors、json 解析、请求日志)
+ *   - 注册所有 PC 模块的路由
+ *   - 挂载统一错误处理
+ *   - 挂载全局健康检查
+ *
+ * 模块路由一览(共 11 个业务模块):
+ *   /api/health         健康检查
+ *   /api/qiwei          企微 API 代理网关        [模块 1]
+ *   /api/staff          人员管理                  [模块 1]
+ *   /api/communities    小区管理                  [模块 2]
+ *   /api/community-room-bindings  群-小区绑定     [模块 2]
+ *   /api/rooms          群管理                    [模块 2]
+ *   /api/compliance     合规检查                  [模块 4]
+ *   /api/risk           群风控                    [模块 5]
+ *   /api/content        内容运营                  [模块 6]
+ *   /api/channels       渠道 / 联系人 / KOC       [模块 7]
+ *   /api/contacts       外部联系人                [模块 7]
+ *   /api/koc            KOC 管理                  [模块 7]
+ *   /api/intent-leads   意向客户                  [模块 7]
+ *   /api/intent-tasks   跟进待办                  [模块 7]
+ *   /api/dashboard      数据看板                  [模块 8]
+ *   /api/sales          经营数据补录              [模块 9]
+ *   /api/workbench      统一工作台                [模块 10]
+ *   /api/notifications  通知管理                  [模块 10]
+ *   /api/audit-logs     审计日志                  [模块 10]
+ */
+
+import express from 'express';
+import cors from 'cors';
+import type { Express, Request, Response, NextFunction } from 'express';
+import { errorHandler } from '../../shared/http/error-handler.js';
+
+// ---- 导入所有 PC 模块路由 ----
+import { pcHealthApiRouter } from './health/routes/health.routes.js';
+import { pcQiWeApiRouter } from './qiwei/routes/qiwei.routes.js';
+import { pcStaffApiRouter } from './staff/routes/staff.routes.js';
+import { pcCommunityApiRouter } from './community/routes/community.routes.js';
+import { pcRoomApiRouter } from './room/routes/room.routes.js';
+import { pcComplianceApiRouter } from './compliance/routes/compliance.routes.js';
+import { pcRiskApiRouter } from './risk/routes/risk.routes.js';
+import { pcContentApiRouter } from './content/routes/content.routes.js';
+import { pcKocApiRouter } from './koc/routes/koc.routes.js';
+import { pcDashboardApiRouter } from './dashboard/routes/dashboard.routes.js';
+import { pcSalesApiRouter } from './sales/routes/sales.routes.js';
+import { pcWorkbenchApiRouter } from './workbench/routes/workbench.routes.js';
+
+/**
+ * 请求日志中间件
+ * 记录每个请求的方法、路径、状态码和耗时
+ */
+function requestLogger(req: Request, res: Response, next: NextFunction): void {
+  const start = Date.now();
+  res.on('finish', () => {
+    const duration = Date.now() - start;
+    const level = res.statusCode >= 400 ? 'WARN' : 'INFO';
+    console.log(
+      `[PC:${level}] ${req.method} ${req.originalUrl} → ${res.statusCode} (${duration}ms)`,
+    );
+  });
+  next();
+}
+
+/**
+ * 创建 PC 端统一 Express 应用
+ *
+ * 所有 PC 模块的路由都挂载在同一个 app 实例上,
+ * 共享同一套中间件(cors、json 解析、日志、错误处理)。
+ */
+export function createPcApp(): Express {
+  const app = express();
+
+  // ---- 通用中间件 ----
+  app.use(cors());
+  app.use(express.json());
+  app.use(requestLogger);
+
+  // ---- 注册所有模块路由 ----
+  // 注意:每个模块的路由文件已定义好各自的前缀(如 /staff、/rooms 等),
+  // 统一挂在 /api 下即可
+  app.use('/api', pcHealthApiRouter);
+  app.use('/api', pcQiWeApiRouter);
+  app.use('/api', pcStaffApiRouter);
+  app.use('/api', pcCommunityApiRouter);
+  app.use('/api', pcRoomApiRouter);
+  app.use('/api', pcComplianceApiRouter);
+  app.use('/api', pcRiskApiRouter);
+  app.use('/api', pcContentApiRouter);
+  app.use('/api', pcKocApiRouter);
+  app.use('/api', pcDashboardApiRouter);
+  app.use('/api', pcSalesApiRouter);
+  app.use('/api', pcWorkbenchApiRouter);
+
+  // ---- 统一错误处理(必须放在所有路由之后) ----
+  app.use(errorHandler);
+
+  return app;
+}

+ 155 - 0
backend/src/apps/pc/community/controllers/community.controller.ts

@@ -0,0 +1,155 @@
+/**
+ * 小区管理模块 — 控制器层
+ *
+ * 对应功能:
+ *   §5.5「录入小区基础档案」
+ *   §5.6「维护小区—群—门店对应关系」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  createCommunity,
+  listCommunities,
+  getCommunityById,
+  updateCommunity,
+  deleteCommunity,
+  createBinding,
+  listBindings,
+  deleteBinding,
+  getBindingByRoomId,
+} from '../services/community.service.js';
+
+// ============================================================
+// 小区 CRUD
+// ============================================================
+
+/** POST /api/communities — 录入小区档案 */
+export async function create(req: Request, res: Response): Promise<void> {
+  try {
+    const { name, totalHouseholds, storeId } = req.body as {
+      name?: string;
+      totalHouseholds?: number;
+      storeId?: number;
+    };
+
+    if (!name || !totalHouseholds || !storeId) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:name, totalHouseholds, storeId');
+      return;
+    }
+
+    const community = createCommunity(req.body);
+    sendSuccess(res, community, 201);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/communities — 查询小区列表 */
+export async function list(req: Request, res: Response): Promise<void> {
+  try {
+    const { storeId } = req.query;
+    const result = listCommunities(storeId ? Number(storeId) : undefined);
+    sendSuccess(res, result);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/communities/:id — 查询小区详情 */
+export async function getById(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const community = getCommunityById(id);
+    sendSuccess(res, community);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** PUT /api/communities/:id — 更新小区信息 */
+export async function update(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const community = updateCommunity(id, req.body);
+    sendSuccess(res, community);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** DELETE /api/communities/:id — 删除小区 */
+export async function remove(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    deleteCommunity(id);
+    sendSuccess(res, { deleted: true });
+  } catch (error) {
+    throw error;
+  }
+}
+
+// ============================================================
+// 小区-群-门店绑定
+// ============================================================
+
+/** POST /api/community-room-bindings — 绑定群到小区 */
+export async function bind(req: Request, res: Response): Promise<void> {
+  try {
+    const { communityId, roomId, storeId } = req.body as {
+      communityId?: number;
+      roomId?: string;
+      storeId?: number;
+    };
+
+    if (!communityId || !roomId || !storeId) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:communityId, roomId, storeId');
+      return;
+    }
+
+    const binding = createBinding({ communityId, roomId, storeId });
+    sendSuccess(res, binding, 201);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/community-room-bindings — 查询绑定列表 */
+export async function listBindingList(req: Request, res: Response): Promise<void> {
+  try {
+    const { communityId, storeId } = req.query;
+    const result = listBindings(
+      typeof communityId === 'string' ? Number(communityId) : undefined,
+      typeof storeId === 'string' ? Number(storeId) : undefined,
+    );
+    sendSuccess(res, result);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/community-room-bindings/by-room/:roomId — 按群 ID 查询绑定 */
+export async function getBindingByRoom(req: Request, res: Response): Promise<void> {
+  try {
+    const roomId = String(req.params.roomId);
+    const binding = getBindingByRoomId(roomId);
+    if (!binding) {
+      sendError(res, 404, 'BINDING_NOT_FOUND', `群 ${roomId} 未绑定任何小区`);
+      return;
+    }
+    sendSuccess(res, binding);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** DELETE /api/community-room-bindings/:id — 解绑 */
+export async function unbind(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    deleteBinding(id);
+    sendSuccess(res, { deleted: true });
+  } catch (error) {
+    throw error;
+  }
+}

+ 69 - 0
backend/src/apps/pc/community/models/community.model.ts

@@ -0,0 +1,69 @@
+/**
+ * 小区管理模块 — 数据模型定义
+ *
+ * 对应规范文档:
+ *   §5.5「录入小区基础档案」
+ *   §5.6「维护小区—群—门店对应关系」
+ *
+ * 核心概念:
+ *   - 小区 (Community):楼盘的档案信息(户数、房价、交房时间等)
+ *   - 门店 (Store):所属门店
+ *   - 群 (Room):企微外部客户群
+ *   - 三者通过 CommunityRoomBinding 表关联:communityId ↔ roomId ↔ storeId
+ */
+
+/** 小区基础档案 */
+export interface Community {
+  /** 主键 */
+  id: number;
+  /** 小区名称 */
+  name: string;
+  /** 总户数(触达率计算的分母,无法从 QiWe 自动获取) */
+  totalHouseholds: number;
+  /** 参考均价(元/㎡) */
+  avgPrice: number;
+  /** 交房年份 */
+  deliveryYear: number;
+  /** 所属门店 ID */
+  storeId: number;
+  /** 详细地址 */
+  address: string;
+  /** 备注 */
+  remark: string;
+  /** 创建时间 */
+  createdAt: string;
+  /** 更新时间 */
+  updatedAt: string;
+}
+
+/** 创建小区请求体 */
+export interface CreateCommunityRequest {
+  name: string;
+  totalHouseholds: number;
+  avgPrice?: number;
+  deliveryYear?: number;
+  storeId: number;
+  address?: string;
+  remark?: string;
+}
+
+/** 小区-群-门店绑定关系 */
+export interface CommunityRoomBinding {
+  /** 主键 */
+  id: number;
+  /** 小区 ID */
+  communityId: number;
+  /** 群 ID(企微 roomId) */
+  roomId: string;
+  /** 门店 ID(冗余,方便查询) */
+  storeId: number;
+  /** 绑定时间 */
+  createdAt: string;
+}
+
+/** 创建绑定请求体 */
+export interface CreateBindingRequest {
+  communityId: number;
+  roomId: string;
+  storeId: number;
+}

+ 43 - 0
backend/src/apps/pc/community/routes/community.routes.ts

@@ -0,0 +1,43 @@
+/**
+ * 小区管理模块 — 路由层
+ *
+ * 接口一览:
+ *   POST   /api/communities                            录入小区档案
+ *   GET    /api/communities                            查询小区列表
+ *   GET    /api/communities/:id                        查询小区详情
+ *   PUT    /api/communities/:id                        更新小区信息
+ *   DELETE /api/communities/:id                        删除小区
+ *   POST   /api/community-room-bindings                绑定群到小区
+ *   GET    /api/community-room-bindings                查询绑定列表
+ *   GET    /api/community-room-bindings/by-room/:roomId 按群查询绑定
+ *   DELETE /api/community-room-bindings/:id             解绑
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  create,
+  list,
+  getById,
+  update,
+  remove,
+  bind,
+  listBindingList,
+  getBindingByRoom,
+  unbind,
+} from '../controllers/community.controller.js';
+
+export const pcCommunityApiRouter: ExpressRouter = Router();
+
+// 小区档案
+pcCommunityApiRouter.post('/communities', create);
+pcCommunityApiRouter.get('/communities', list);
+pcCommunityApiRouter.get('/communities/:id', getById);
+pcCommunityApiRouter.put('/communities/:id', update);
+pcCommunityApiRouter.delete('/communities/:id', remove);
+
+// 绑定关系
+pcCommunityApiRouter.post('/community-room-bindings', bind);
+pcCommunityApiRouter.get('/community-room-bindings', listBindingList);
+pcCommunityApiRouter.get('/community-room-bindings/by-room/:roomId', getBindingByRoom);
+pcCommunityApiRouter.delete('/community-room-bindings/:id', unbind);

+ 186 - 0
backend/src/apps/pc/community/services/community.service.ts

@@ -0,0 +1,186 @@
+/**
+ * 小区管理模块 — 业务服务层
+ *
+ * 对应规范文档:
+ *   §5.5「录入小区基础档案」
+ *   §5.6「维护小区—群—门店对应关系」
+ *
+ * 业务规则:
+ *   1. 小区户数无法从 QiWe 自动获取,需人工录入
+ *   2. 群与小区/门店的绑定关系禁止自动猜测——必须人工确认
+ *   3. 未绑定群在看板中标记为「待维护」
+ *   4. 报表按小区/门店聚合时,通过绑定表 INNER JOIN
+ */
+
+import { AppError } from '../../../../shared/errors/app-error.js';
+import type {
+  Community,
+  CreateCommunityRequest,
+  CommunityRoomBinding,
+  CreateBindingRequest,
+} from '../models/community.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const communityStore = new Map<number, Community>();
+const bindingStore = new Map<number, CommunityRoomBinding>();
+let nextCommunityId = 1;
+let nextBindingId = 1;
+
+// ============================================================
+// 小区档案 CRUD
+// ============================================================
+
+/**
+ * 录入小区基础档案
+ *
+ * 户数是触达率计算的分母,必须准确。
+ * 房价、交房时间等字段供看板和经营分析使用。
+ */
+export function createCommunity(data: CreateCommunityRequest): Community {
+  const now = new Date().toISOString();
+  const community: Community = {
+    id: nextCommunityId++,
+    name: data.name,
+    totalHouseholds: data.totalHouseholds,
+    avgPrice: data.avgPrice || 0,
+    deliveryYear: data.deliveryYear || 0,
+    storeId: data.storeId,
+    address: data.address || '',
+    remark: data.remark || '',
+    createdAt: now,
+    updatedAt: now,
+  };
+
+  communityStore.set(community.id, community);
+  return community;
+}
+
+/**
+ * 查询小区列表(支持按门店筛选)
+ */
+export function listCommunities(storeId?: number): Community[] {
+  let result = Array.from(communityStore.values());
+  if (storeId !== undefined) {
+    result = result.filter((c) => c.storeId === storeId);
+  }
+  return result;
+}
+
+/**
+ * 查询单个小区详情
+ */
+export function getCommunityById(id: number): Community {
+  const community = communityStore.get(id);
+  if (!community) {
+    throw new AppError(404, 'COMMUNITY_NOT_FOUND', `小区 ID=${id} 不存在`);
+  }
+  return community;
+}
+
+/**
+ * 更新小区信息
+ */
+export function updateCommunity(id: number, data: Partial<CreateCommunityRequest>): Community {
+  const community = getCommunityById(id);
+
+  if (data.name !== undefined) community.name = data.name;
+  if (data.totalHouseholds !== undefined) community.totalHouseholds = data.totalHouseholds;
+  if (data.avgPrice !== undefined) community.avgPrice = data.avgPrice;
+  if (data.deliveryYear !== undefined) community.deliveryYear = data.deliveryYear;
+  if (data.storeId !== undefined) community.storeId = data.storeId;
+  if (data.address !== undefined) community.address = data.address;
+  if (data.remark !== undefined) community.remark = data.remark;
+  community.updatedAt = new Date().toISOString();
+
+  communityStore.set(id, community);
+  return community;
+}
+
+/**
+ * 删除小区
+ */
+export function deleteCommunity(id: number): void {
+  getCommunityById(id);
+  communityStore.delete(id);
+
+  // 同时清理关联的绑定关系
+  for (const [key, binding] of bindingStore) {
+    if (binding.communityId === id) {
+      bindingStore.delete(key);
+    }
+  }
+}
+
+// ============================================================
+// 小区-群-门店绑定
+// ============================================================
+
+/**
+ * 创建小区-群-门店绑定关系
+ *
+ * 业务约束:
+ *   - 同一个 roomId 不可重复绑定到不同的小区
+ *   - 绑定禁止自动猜测,必须人工确认
+ *
+ * @throws {AppError} 当 roomId 已被绑定时
+ */
+export function createBinding(data: CreateBindingRequest): CommunityRoomBinding {
+  // 检查 roomId 是否已绑定
+  for (const binding of bindingStore.values()) {
+    if (binding.roomId === data.roomId) {
+      throw new AppError(
+        409,
+        'BINDING_DUPLICATE',
+        `群 ${data.roomId} 已绑定到小区 ID=${binding.communityId},不可重复绑定`,
+      );
+    }
+  }
+
+  const binding: CommunityRoomBinding = {
+    id: nextBindingId++,
+    communityId: data.communityId,
+    roomId: data.roomId,
+    storeId: data.storeId,
+    createdAt: new Date().toISOString(),
+  };
+
+  bindingStore.set(binding.id, binding);
+  return binding;
+}
+
+/**
+ * 查询绑定关系列表(按小区或门店筛选)
+ */
+export function listBindings(communityId?: number, storeId?: number): CommunityRoomBinding[] {
+  let result = Array.from(bindingStore.values());
+  if (communityId !== undefined) {
+    result = result.filter((b) => b.communityId === communityId);
+  }
+  if (storeId !== undefined) {
+    result = result.filter((b) => b.storeId === storeId);
+  }
+  return result;
+}
+
+/**
+ * 删除绑定关系(解绑)
+ */
+export function deleteBinding(id: number): void {
+  const binding = bindingStore.get(id);
+  if (!binding) {
+    throw new AppError(404, 'BINDING_NOT_FOUND', `绑定 ID=${id} 不存在`);
+  }
+  bindingStore.delete(id);
+}
+
+/**
+ * 按 roomId 查询绑定(用于合规等模块关联查询)
+ */
+export function getBindingByRoomId(roomId: string): CommunityRoomBinding | undefined {
+  for (const binding of bindingStore.values()) {
+    if (binding.roomId === roomId) {
+      return binding;
+    }
+  }
+  return undefined;
+}

+ 120 - 0
backend/src/apps/pc/compliance/controllers/compliance.controller.ts

@@ -0,0 +1,120 @@
+/**
+ * 合规检查模块 — 控制器层
+ *
+ * 对应规范文档 §七「模块 4:沟通记录合规检查模块」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  runComplianceScan,
+  listIssues,
+  getIssueById,
+  updateIssueStatus,
+  generateReport,
+  getLastScan,
+} from '../services/compliance.service.js';
+import type { ComplianceIssueType, IssueStatus } from '../models/compliance.model.js';
+
+/**
+ * POST /api/compliance/scan
+ *
+ * 触发合规巡检(手动)。
+ *
+ * Body:
+ *   { "roomIds": ["10791082xxxx", "10791083xxxx"] }
+ */
+export async function scan(req: Request, res: Response): Promise<void> {
+  try {
+    const { roomIds } = req.body as { roomIds?: string[] };
+
+    if (!roomIds || !Array.isArray(roomIds) || roomIds.length === 0) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少 roomIds 参数(须为非空数组)');
+      return;
+    }
+
+    const result = runComplianceScan(roomIds);
+    sendSuccess(res, result);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/compliance/issues
+ *
+ * 查询合规问题列表(支持按 type/status/severity 筛选)。
+ */
+export async function listIssueList(req: Request, res: Response): Promise<void> {
+  try {
+    const { type, status, severity } = req.query;
+    const issues = listIssues(
+      type as ComplianceIssueType | undefined,
+      status as IssueStatus | undefined,
+      severity ? Number(severity) : undefined,
+    );
+    sendSuccess(res, issues);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/compliance/issues/:id
+ *
+ * 查询单个合规问题详情。
+ */
+export async function getIssue(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const issue = getIssueById(id);
+    sendSuccess(res, issue);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * PUT /api/compliance/issues/:id
+ *
+ * 更新合规问题状态(认领/处理/关闭)。
+ *
+ * Body:
+ *   { "status": "in_progress", "note": "已开始整改" }
+ */
+export async function updateIssue(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const { status, note } = req.body as { status?: IssueStatus; note?: string };
+
+    const validStatuses: IssueStatus[] = ['open', 'in_progress', 'resolved', 'closed'];
+    if (!status || !validStatuses.includes(status)) {
+      sendError(res, 400, 'VALIDATION_ERROR', `无效的状态:${status},可选:${validStatuses.join(', ')}`);
+      return;
+    }
+
+    const issue = updateIssueStatus(id, status, note);
+    sendSuccess(res, issue);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/compliance/reports
+ *
+ * 获取合规汇总报表(§7.16)。
+ *
+ * Query params:
+ *   totalRooms - 纳入统计的总群数(必填)
+ */
+export async function report(req: Request, res: Response): Promise<void> {
+  try {
+    const totalRooms = Number(req.query.totalRooms) || 0;
+    const report = generateReport(totalRooms);
+    const lastScan = getLastScan();
+    sendSuccess(res, { report, lastScan });
+  } catch (error) {
+    throw error;
+  }
+}

+ 109 - 0
backend/src/apps/pc/compliance/models/compliance.model.ts

@@ -0,0 +1,109 @@
+/**
+ * 合规检查模块 — 数据模型定义
+ *
+ * 对应规范文档 §七「模块 4:沟通记录合规检查模块」
+ *
+ * 核心概念:
+ *   - compliance_issue:合规问题记录(缺表、未置顶、格式错误、内容太简等)
+ *   - compliance_scan:巡检任务记录
+ *   - audit_log:操作审计日志
+ *
+ * 问题类型枚举(issue type):
+ *   - missing_doc       :群还没有沟通记录表
+ *   - not_pinned        :记录表未在群内置顶
+ *   - no_doc_in_notice  :群公告中无文档链接
+ *   - multi_doc         :群内出现多张表
+ *   - required_empty    :必填项为空
+ *   - format_error      :日期/格式/版式不规范
+ *   - stale_doc         :记录表很久没更新
+ *   - too_brief         :内容过于简略
+ *   - suspected_miss_log:群里聊过但表没更新
+ */
+
+/** 合规问题类型 */
+export type ComplianceIssueType =
+  | 'missing_doc'
+  | 'not_pinned'
+  | 'no_doc_in_notice'
+  | 'multi_doc'
+  | 'required_empty'
+  | 'format_error'
+  | 'stale_doc'
+  | 'too_brief'
+  | 'suspected_miss_log';
+
+/** 合规问题类型中文标签 */
+export const ComplianceIssueTypeLabel: Record<ComplianceIssueType, string> = {
+  missing_doc: '缺少沟通记录表',
+  not_pinned: '记录表未置顶',
+  no_doc_in_notice: '群公告无文档链接',
+  multi_doc: '群内存在多张表',
+  required_empty: '必填项为空',
+  format_error: '格式或版式不规范',
+  stale_doc: '记录表长期未更新',
+  too_brief: '内容过于简略',
+  suspected_miss_log: '疑似漏记(群内聊天但表未更新)',
+};
+
+/** 合规问题状态 */
+export type IssueStatus = 'open' | 'in_progress' | 'resolved' | 'closed';
+
+/** 合规问题记录 */
+export interface ComplianceIssue {
+  /** 主键 */
+  id: number;
+  /** 群 ID */
+  roomId: string;
+  /** 群名称(冗余) */
+  roomName: string;
+  /** 问题类型 */
+  type: ComplianceIssueType;
+  /** 问题描述 */
+  description: string;
+  /** 严重程度:1=低, 2=中, 3=高 */
+  severity: 1 | 2 | 3;
+  /** 状态 */
+  status: IssueStatus;
+  /** 负责人 ID */
+  assigneeId: number;
+  /** 关联的文档 ID(如有) */
+  docId: string;
+  /** 发现时间 */
+  foundAt: string;
+  /** 解决时间 */
+  resolvedAt: string;
+  /** 创建时间 */
+  createdAt: string;
+}
+
+/** 合规巡检任务 */
+export interface ComplianceScan {
+  /** 主键 */
+  id: number;
+  /** 巡检时间 */
+  scannedAt: string;
+  /** 巡检群数 */
+  totalRooms: number;
+  /** 新发现问题数 */
+  newIssues: number;
+  /** 已自动关闭的问题数 */
+  resolvedIssues: number;
+  /** 巡检状态 */
+  status: 'running' | 'completed' | 'failed';
+}
+
+/** 合规汇总报表 */
+export interface ComplianceReport {
+  /** 总群数 */
+  totalRooms: number;
+  /** 达标群数 */
+  compliantRooms: number;
+  /** 待整改群数 */
+  pendingRooms: number;
+  /** 按问题类型分组统计 */
+  issuesByType: Record<ComplianceIssueType, number>;
+  /** 按严重程度分组统计 */
+  issuesBySeverity: Record<number, number>;
+  /** 报表生成时间 */
+  generatedAt: string;
+}

+ 28 - 0
backend/src/apps/pc/compliance/routes/compliance.routes.ts

@@ -0,0 +1,28 @@
+/**
+ * 合规检查模块 — 路由层
+ *
+ * 接口一览:
+ *   POST /api/compliance/scan         触发合规巡检
+ *   GET  /api/compliance/issues       查询合规问题列表
+ *   GET  /api/compliance/issues/:id   查询问题详情
+ *   PUT  /api/compliance/issues/:id   更新问题状态
+ *   GET  /api/compliance/reports      获取合规汇总报表
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  scan,
+  listIssueList,
+  getIssue,
+  updateIssue,
+  report,
+} from '../controllers/compliance.controller.js';
+
+export const pcComplianceApiRouter: ExpressRouter = Router();
+
+pcComplianceApiRouter.post('/compliance/scan', scan);
+pcComplianceApiRouter.get('/compliance/issues', listIssueList);
+pcComplianceApiRouter.get('/compliance/issues/:id', getIssue);
+pcComplianceApiRouter.put('/compliance/issues/:id', updateIssue);
+pcComplianceApiRouter.get('/compliance/reports', report);

+ 268 - 0
backend/src/apps/pc/compliance/services/compliance.service.ts

@@ -0,0 +1,268 @@
+/**
+ * 合规检查模块 — 业务服务层
+ *
+ * 对应规范文档 §七「模块 4:沟通记录合规检查模块」
+ *
+ * 巡检流程(compliance_scan)由以下子任务组成:
+ *   §7.1  列出全部外部客户群(调用 room 模块数据)
+ *   §7.2  找出还没有沟通记录表的群
+ *   §7.3  查群里是否曾经发过记录表
+ *   §7.4  查记录表是否已置顶(API-12)
+ *   §7.5  查群公告里是否有文档链接(API-08 冗余字段)
+ *   §7.7  必填项是否都填了(依赖 §7.6 正文读取)
+ *   §7.8  日期、格式与表格版式是否规范
+ *   §7.9  记录表是否很久没更新
+ *   §7.10 内容写得是否太简略
+ *   §7.12 群里聊过但表没更新时提示
+ *
+ * 定时巡检通过 compliance_scan 统一调度,每次扫描生成一份报告。
+ */
+
+import { AppError } from '../../../../shared/errors/app-error.js';
+import type {
+  ComplianceIssue,
+  ComplianceIssueType,
+  IssueStatus,
+  ComplianceScan,
+  ComplianceReport,
+} from '../models/compliance.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const issueStore = new Map<number, ComplianceIssue>();
+const scanStore = new Map<number, ComplianceScan>();
+let nextIssueId = 1;
+let nextScanId = 1;
+
+// ============================================================
+// 合规巡检任务
+// ============================================================
+
+/**
+ * 执行合规巡检扫描
+ *
+ * 遍历所有外部客户群,逐项检查合规要求,生成问题记录。
+ *
+ * 本方法模拟巡检流程,实际生产环境应:
+ *   1. 从消息表查询是否有链接消息
+ *   2. 调用 API-12 检查置顶状态
+ *   3. 读取群详情中的公告字段
+ *   4. 【占位】读取在线文档正文
+ *
+ * @param roomIds - 需要巡检的群 ID 列表
+ * @returns 巡检结果
+ */
+export function runComplianceScan(roomIds: string[]): ComplianceScan {
+  let newIssues = 0;
+  let resolvedIssues = 0;
+
+  for (const roomId of roomIds) {
+    // ---- §7.2:检查是否缺沟通记录表 ----
+    // TODO: 从 room_doc 台账判断是否存在 docId
+    const hasDoc = true; // 示例:默认有文档
+    if (!hasDoc) {
+      createIssue({
+        roomId,
+        roomName: `群-${roomId}`,
+        type: 'missing_doc',
+        description: '该群尚未登记沟通记录在线文档链接',
+        severity: 3,
+      });
+      newIssues++;
+      continue; // 缺表则跳过后续检查
+    }
+
+    // ---- §7.4:检查记录表是否置顶 ----
+    // TODO: 调 API-12 检查
+    const isPinned = true; // 示例
+    if (!isPinned) {
+      createIssue({
+        roomId,
+        roomName: `群-${roomId}`,
+        type: 'not_pinned',
+        description: '沟通记录表在群内未置顶',
+        severity: 2,
+      });
+      newIssues++;
+    }
+
+    // ---- §7.9:检查记录表是否长期未更新 ----
+    // TODO: 比较文档 updated_at 与当前时间的差距
+    const daysSinceUpdate = 5; // 示例
+    if (daysSinceUpdate > 14) {
+      createIssue({
+        roomId,
+        roomName: `群-${roomId}`,
+        type: 'stale_doc',
+        description: `记录表已 ${daysSinceUpdate} 天未更新`,
+        severity: 2,
+      });
+      newIssues++;
+    }
+  }
+
+  // ---- 自动关闭已修复的问题 ----
+  // TODO: 遍历 open 状态的问题,检查条件是否已满足,是则自动 close
+
+  const scan: ComplianceScan = {
+    id: nextScanId++,
+    scannedAt: new Date().toISOString(),
+    totalRooms: roomIds.length,
+    newIssues,
+    resolvedIssues,
+    status: 'completed',
+  };
+
+  scanStore.set(scan.id, scan);
+  return scan;
+}
+
+// ============================================================
+// 合规问题 CRUD
+// ============================================================
+
+/** 创建问题记录的参数 */
+interface CreateIssueParams {
+  roomId: string;
+  roomName: string;
+  type: ComplianceIssueType;
+  description: string;
+  severity: 1 | 2 | 3;
+  assigneeId?: number;
+  docId?: string;
+}
+
+/**
+ * 创建合规问题记录
+ */
+export function createIssue(params: CreateIssueParams): ComplianceIssue {
+  const now = new Date().toISOString();
+  const issue: ComplianceIssue = {
+    id: nextIssueId++,
+    roomId: params.roomId,
+    roomName: params.roomName,
+    type: params.type,
+    description: params.description,
+    severity: params.severity,
+    status: 'open',
+    assigneeId: params.assigneeId || 0,
+    docId: params.docId || '',
+    foundAt: now,
+    resolvedAt: '',
+    createdAt: now,
+  };
+
+  issueStore.set(issue.id, issue);
+  return issue;
+}
+
+/**
+ * 查询合规问题列表
+ *
+ * @param type   - 问题类型筛选(可选)
+ * @param status - 状态筛选(可选)
+ * @param severity - 严重程度筛选(可选)
+ * @returns 问题列表
+ */
+export function listIssues(
+  type?: ComplianceIssueType,
+  status?: IssueStatus,
+  severity?: number,
+): ComplianceIssue[] {
+  let result = Array.from(issueStore.values());
+
+  if (type) result = result.filter((i) => i.type === type);
+  if (status) result = result.filter((i) => i.status === status);
+  if (severity) result = result.filter((i) => i.severity === severity);
+
+  return result.sort(
+    (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
+  );
+}
+
+/**
+ * 查询单个问题详情
+ */
+export function getIssueById(id: number): ComplianceIssue {
+  const issue = issueStore.get(id);
+  if (!issue) {
+    throw new AppError(404, 'ISSUE_NOT_FOUND', `合规问题 ID=${id} 不存在`);
+  }
+  return issue;
+}
+
+/**
+ * 更新问题状态
+ *
+ * 状态流转:open → in_progress → resolved → closed
+ *
+ * @param id     - 问题 ID
+ * @param status - 新状态
+ * @param note   - 处理备注
+ */
+export function updateIssueStatus(id: number, status: IssueStatus, note?: string): ComplianceIssue {
+  const issue = getIssueById(id);
+  issue.status = status;
+
+  if (status === 'resolved' || status === 'closed') {
+    issue.resolvedAt = new Date().toISOString();
+  }
+
+  issueStore.set(id, issue);
+
+  // 记录审计日志
+  console.log(`[Compliance] 问题 #${id} 状态变更: ${status}${note ? ` (${note})` : ''}`);
+
+  return issue;
+}
+
+// ============================================================
+// 合规报表(§7.16)
+// ============================================================
+
+/**
+ * 生成合规汇总报表
+ *
+ * 统计达标/待整改/待确认数量与明细。
+ * 供工作台首页和主管汇总通知使用。
+ *
+ * @param totalRooms - 需要纳入统计的总群数
+ * @returns 合规报表
+ */
+export function generateReport(totalRooms: number): ComplianceReport {
+  const allIssues = Array.from(issueStore.values());
+  const openIssues = allIssues.filter((i) => i.status === 'open' || i.status === 'in_progress');
+
+  // 按问题类型分组计数
+  const issuesByType = {} as Record<ComplianceIssueType, number>;
+  for (const issue of openIssues) {
+    issuesByType[issue.type] = (issuesByType[issue.type] || 0) + 1;
+  }
+
+  // 按严重程度分组计数
+  const issuesBySeverity: Record<number, number> = {};
+  for (const issue of openIssues) {
+    issuesBySeverity[issue.severity] = (issuesBySeverity[issue.severity] || 0) + 1;
+  }
+
+  // 有未解决合规问题的群 ID 集合(去重)
+  const problemRoomIds = new Set(openIssues.map((i) => i.roomId));
+
+  return {
+    totalRooms,
+    compliantRooms: totalRooms - problemRoomIds.size,
+    pendingRooms: problemRoomIds.size,
+    issuesByType,
+    issuesBySeverity,
+    generatedAt: new Date().toISOString(),
+  };
+}
+
+/**
+ * 获取最近一次巡检记录
+ */
+export function getLastScan(): ComplianceScan | undefined {
+  const scans = Array.from(scanStore.values());
+  return scans.sort(
+    (a, b) => new Date(b.scannedAt).getTime() - new Date(a.scannedAt).getTime(),
+  )[0];
+}

+ 155 - 0
backend/src/apps/pc/content/controllers/content.controller.ts

@@ -0,0 +1,155 @@
+/**
+ * 社群内容与运营执行模块 — 控制器层
+ *
+ * 对应规范文档 §九「模块 6:社群内容与运营执行模块」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  createMaterial, listMaterials, updateMaterial, deleteMaterial,
+  createBroadcast, listBroadcasts, getBroadcastStatus,
+  createPlan, listPlans, addPlanItem, listPlanItems, checkPlanExecution,
+} from '../services/content.service.js';
+
+// ============================================================
+// 素材库
+// ============================================================
+
+export async function createMat(req: Request, res: Response): Promise<void> {
+  try {
+    const { title, type, content } = req.body;
+    if (!title || !type || !content) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:title, type, content');
+      return;
+    }
+    const m = createMaterial({
+      title, type, content,
+      tags: req.body.tags || [],
+      creatorId: req.body.creatorId || 0,
+      enabled: 1,
+    });
+    sendSuccess(res, m, 201);
+  } catch (error) { throw error; }
+}
+
+export async function listMat(req: Request, res: Response): Promise<void> {
+  try {
+    const { type, tag } = req.query;
+    const result = listMaterials(
+      typeof type === 'string' ? type : undefined,
+      typeof tag === 'string' ? tag : undefined,
+    );
+    sendSuccess(res, result);
+  } catch (error) { throw error; }
+}
+
+export async function updateMat(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const m = updateMaterial(id, req.body);
+    sendSuccess(res, m);
+  } catch (error) { throw error; }
+}
+
+export async function deleteMat(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    deleteMaterial(id);
+    sendSuccess(res, { deleted: true });
+  } catch (error) { throw error; }
+}
+
+// ============================================================
+// 群发任务
+// ============================================================
+
+export async function createBc(req: Request, res: Response): Promise<void> {
+  try {
+    const { guid, sendType, toIdList, msgList } = req.body;
+    if (!guid || sendType === undefined || !toIdList || !msgList) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:guid, sendType, toIdList, msgList');
+      return;
+    }
+    const task = await createBroadcast(guid, sendType, toIdList, msgList);
+    sendSuccess(res, task, 201);
+  } catch (error) { throw error; }
+}
+
+export async function listBc(_req: Request, res: Response): Promise<void> {
+  try {
+    const result = listBroadcasts();
+    sendSuccess(res, result);
+  } catch (error) { throw error; }
+}
+
+export async function getBcStatus(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const task = getBroadcastStatus(id);
+    sendSuccess(res, task);
+  } catch (error) { throw error; }
+}
+
+// ============================================================
+// 运营计划
+// ============================================================
+
+export async function createPl(req: Request, res: Response): Promise<void> {
+  try {
+    const { name, startDate, endDate, ownerId } = req.body;
+    if (!name || !startDate || !endDate) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:name, startDate, endDate');
+      return;
+    }
+    const plan = createPlan({
+      name, startDate, endDate,
+      status: 'draft',
+      ownerId: ownerId || 0,
+    });
+    sendSuccess(res, plan, 201);
+  } catch (error) { throw error; }
+}
+
+export async function listPl(req: Request, res: Response): Promise<void> {
+  try {
+    const { status } = req.query;
+    const result = listPlans(typeof status === 'string' ? status : undefined);
+    sendSuccess(res, result);
+  } catch (error) { throw error; }
+}
+
+export async function addItem(req: Request, res: Response): Promise<void> {
+  try {
+    const { planId, content, scheduledDate, targetRoomIds, materialId } = req.body;
+    if (!planId || !content || !scheduledDate) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:planId, content, scheduledDate');
+      return;
+    }
+    const item = addPlanItem({
+      planId, content, scheduledDate,
+      targetRoomIds: targetRoomIds || [],
+      materialId: materialId || 0,
+      status: 'pending',
+      contentDetected: false,
+      engagementCount: 0,
+    });
+    sendSuccess(res, item, 201);
+  } catch (error) { throw error; }
+}
+
+export async function listItems(req: Request, res: Response): Promise<void> {
+  try {
+    const planId = Number(req.params.planId);
+    const items = listPlanItems(planId);
+    sendSuccess(res, items);
+  } catch (error) { throw error; }
+}
+
+export async function checkExecution(req: Request, res: Response): Promise<void> {
+  try {
+    const planId = Number(req.params.planId);
+    const result = checkPlanExecution(planId);
+    sendSuccess(res, result);
+  } catch (error) { throw error; }
+}

+ 94 - 0
backend/src/apps/pc/content/models/content.model.ts

@@ -0,0 +1,94 @@
+/**
+ * 社群内容与运营执行模块 — 数据模型定义
+ *
+ * 对应规范文档 §九「模块 6:社群内容与运营执行模块」
+ *
+ * 核心表:
+ *   - material        :话术与案例素材库
+ *   - broadcast_task  :群发任务
+ *   - ops_plan        :运营计划
+ *   - ops_plan_item   :计划执行项
+ */
+
+/** 素材库条目 */
+export interface Material {
+  id: number;
+  /** 标题 */
+  title: string;
+  /** 类型:script=话术, case=案例, image=图片, video=视频, file=文件 */
+  type: 'script' | 'case' | 'image' | 'video' | 'file';
+  /** 正文内容 */
+  content: string;
+  /** 分类标签 */
+  tags: string[];
+  /** 创建人 ID */
+  creatorId: number;
+  /** 状态:1=启用, 0=停用 */
+  enabled: number;
+  createdAt: string;
+  updatedAt: string;
+}
+
+/** 群发任务 */
+export interface BroadcastTask {
+  id: number;
+  /** QiWe 返回的群发任务 ID(groupMsgId) */
+  groupMsgId: string;
+  /** 发送类型:0=外部联系人, 1=外部群 */
+  sendType: 0 | 1;
+  /** 目标群 ID 列表 */
+  toIdList: string[];
+  /** 消息列表 */
+  msgList: Array<{ type: number; msgData: Record<string, unknown> }>;
+  /** 执行人员 guid */
+  guid: string;
+  /** 总发送数 */
+  total: number;
+  /** 已发送数 */
+  hasSend: number;
+  /** 是否完成 */
+  isEnd: boolean;
+  /** 创建人 ID */
+  creatorId: number;
+  createdAt: string;
+  updatedAt: string;
+}
+
+/** 运营计划 */
+export interface OpsPlan {
+  id: number;
+  /** 计划名称 */
+  name: string;
+  /** 计划周期起始 */
+  startDate: string;
+  /** 计划周期截止 */
+  endDate: string;
+  /** 状态:draft=草稿, active=执行中, completed=已完成 */
+  status: 'draft' | 'active' | 'completed';
+  /** 负责人 ID */
+  ownerId: number;
+  createdAt: string;
+  updatedAt: string;
+}
+
+/** 运营计划项 */
+export interface OpsPlanItem {
+  id: number;
+  /** 所属计划 ID */
+  planId: number;
+  /** 内容描述 */
+  content: string;
+  /** 计划执行日期 */
+  scheduledDate: string;
+  /** 目标群范围(群 ID 列表或小区 ID 列表) */
+  targetRoomIds: string[];
+  /** 关联素材 ID */
+  materialId: number;
+  /** 执行状态:pending=待执行, executed=已执行, skipped=已跳过 */
+  status: 'pending' | 'executed' | 'skipped';
+  /** 是否已识别群内相关内容(§9.3) */
+  contentDetected: boolean;
+  /** 互动效果统计(消息数、回复数) */
+  engagementCount: number;
+  createdAt: string;
+}

+ 48 - 0
backend/src/apps/pc/content/routes/content.routes.ts

@@ -0,0 +1,48 @@
+/**
+ * 社群内容与运营执行模块 — 路由层
+ *
+ * 接口一览:
+ *   素材库:
+ *     POST   /api/content/materials          创建素材
+ *     GET    /api/content/materials          查询素材列表
+ *     PUT    /api/content/materials/:id      更新素材
+ *     DELETE /api/content/materials/:id      删除素材
+ *   群发:
+ *     POST   /api/content/broadcasts         创建群发任务
+ *     GET    /api/content/broadcasts         查询群发任务列表
+ *     GET    /api/content/broadcasts/:id     查询群发状态
+ *   运营计划:
+ *     POST   /api/content/plans              创建运营计划
+ *     GET    /api/content/plans              查询计划列表
+ *     POST   /api/content/plans/:planId/items      添加计划项
+ *     GET    /api/content/plans/:planId/items      查询计划项
+ *     GET    /api/content/plans/:planId/execution  检查执行情况
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  createMat, listMat, updateMat, deleteMat,
+  createBc, listBc, getBcStatus,
+  createPl, listPl, addItem, listItems, checkExecution,
+} from '../controllers/content.controller.js';
+
+export const pcContentApiRouter: ExpressRouter = Router();
+
+// 素材库
+pcContentApiRouter.post('/content/materials', createMat);
+pcContentApiRouter.get('/content/materials', listMat);
+pcContentApiRouter.put('/content/materials/:id', updateMat);
+pcContentApiRouter.delete('/content/materials/:id', deleteMat);
+
+// 群发
+pcContentApiRouter.post('/content/broadcasts', createBc);
+pcContentApiRouter.get('/content/broadcasts', listBc);
+pcContentApiRouter.get('/content/broadcasts/:id', getBcStatus);
+
+// 运营计划
+pcContentApiRouter.post('/content/plans', createPl);
+pcContentApiRouter.get('/content/plans', listPl);
+pcContentApiRouter.post('/content/plans/:planId/items', addItem);
+pcContentApiRouter.get('/content/plans/:planId/items', listItems);
+pcContentApiRouter.get('/content/plans/:planId/execution', checkExecution);

+ 238 - 0
backend/src/apps/pc/content/services/content.service.ts

@@ -0,0 +1,238 @@
+/**
+ * 社群内容与运营执行模块 — 业务服务层
+ *
+ * 对应规范文档 §九「模块 6:社群内容与运营执行模块」
+ *
+ * 业务流程:
+ *   §9.1 话术与案例素材库:CMS 上传/分类/检索话术与案例文件
+ *   §9.2 向多个群一键群发:选群与内容 → API-15 创建任务 → 轮询 API-16
+ *   §9.3 识别群内是否已发规定运营内容:时间窗内查群发记录 + 群内关键词匹配
+ *   §9.4 运营内容互动效果统计:以发布时间为起点统计后续消息量/回复数
+ *   §9.5 发布时间建议:按历史群消息聚合活跃小时
+ *   §9.6 录入周度运营计划:ops_plan 表录入计划项
+ *   §9.7 对照计划检查是否已执行:计划时间窗对比 §9.3 识别结果
+ *   §9.8 未完成项提醒:未执行计划项 → API-14 通知责任人
+ */
+
+import { AppError } from '../../../../shared/errors/app-error.js';
+import { callQiWeApi } from '../../../../shared/qiwei/client.js';
+import type {
+  Material,
+  BroadcastTask,
+  OpsPlan,
+  OpsPlanItem,
+} from '../models/content.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const materialStore = new Map<number, Material>();
+const broadcastStore = new Map<number, BroadcastTask>();
+const planStore = new Map<number, OpsPlan>();
+const planItemStore = new Map<number, OpsPlanItem>();
+let nextMaterialId = 1;
+let nextBroadcastId = 1;
+let nextPlanId = 1;
+let nextPlanItemId = 1;
+
+// ============================================================
+// 素材库(§9.1)
+// ============================================================
+
+/** 创建素材 */
+export function createMaterial(data: Omit<Material, 'id' | 'createdAt' | 'updatedAt'>): Material {
+  const now = new Date().toISOString();
+  const m: Material = { id: nextMaterialId++, ...data, createdAt: now, updatedAt: now };
+  materialStore.set(m.id, m);
+  return m;
+}
+
+/** 查询素材列表 */
+export function listMaterials(type?: string, tag?: string): Material[] {
+  let result = Array.from(materialStore.values());
+  if (type) result = result.filter((m) => m.type === type);
+  if (tag) result = result.filter((m) => m.tags.includes(tag));
+  return result.filter((m) => m.enabled === 1);
+}
+
+/** 更新素材 */
+export function updateMaterial(id: number, data: Partial<Material>): Material {
+  const m = materialStore.get(id);
+  if (!m) throw new AppError(404, 'MATERIAL_NOT_FOUND', `素材 ID=${id} 不存在`);
+  Object.assign(m, data, { updatedAt: new Date().toISOString() });
+  materialStore.set(id, m);
+  return m;
+}
+
+/** 删除素材 */
+export function deleteMaterial(id: number): void {
+  if (!materialStore.has(id)) throw new AppError(404, 'MATERIAL_NOT_FOUND', `素材 ID=${id} 不存在`);
+  materialStore.delete(id);
+}
+
+// ============================================================
+// 群发任务(§9.2)
+// ============================================================
+
+/**
+ * 创建群发任务
+ *
+ * 步骤:
+ *  1. 调用 API-15 /msg/sendGroupMsg 创建群发
+ *  2. 获取返回的 groupMsgId
+ *  3. 轮询 API-16 /msg/sendGroupMsgStatus 检查进度
+ *
+ * @param guid      - 执行人员 guid
+ * @param sendType   - 发送类型:0=外部联系人, 1=外部群
+ * @param toIdList   - 目标 ID 列表
+ * @param msgList    - 消息内容列表
+ * @returns 群发任务记录
+ */
+export async function createBroadcast(
+  guid: string,
+  sendType: 0 | 1,
+  toIdList: string[],
+  msgList: Array<{ type: number; msgData: Record<string, unknown> }>,
+): Promise<BroadcastTask> {
+  // 步骤 1:调用 API-15 创建群发
+  const data = await callQiWeApi<{ groupMsgId: string }>('/msg/sendGroupMsg', {
+    guid,
+    sendType,
+    toIdList,
+    msgList,
+  });
+
+  const now = new Date().toISOString();
+  const task: BroadcastTask = {
+    id: nextBroadcastId++,
+    groupMsgId: data.groupMsgId,
+    sendType,
+    toIdList,
+    msgList,
+    guid,
+    total: toIdList.length,
+    hasSend: 0,
+    isEnd: false,
+    creatorId: 0,
+    createdAt: now,
+    updatedAt: now,
+  };
+
+  broadcastStore.set(task.id, task);
+
+  // 步骤 2:轮询 API-16 查询发送状态(异步)
+  pollBroadcastStatus(task).catch((err) =>
+    console.error(`[Content] 群发状态轮询失败: taskId=${task.id}`, err),
+  );
+
+  return task;
+}
+
+/**
+ * 轮询群发状态(内部方法)
+ */
+async function pollBroadcastStatus(task: BroadcastTask): Promise<void> {
+  // 简化的单次查询(生产环境应使用定时任务轮询)
+  const statusData = await callQiWeApi<{
+    hasSend: number;
+    isEnd: boolean;
+    total: number;
+  }>('/msg/sendGroupMsgStatus', {
+    guid: task.guid,
+    groupMsgId: task.groupMsgId,
+    endDetailId: 2,
+  });
+
+  task.hasSend = statusData.hasSend;
+  task.isEnd = statusData.isEnd;
+  task.total = statusData.total;
+  task.updatedAt = new Date().toISOString();
+  broadcastStore.set(task.id, task);
+}
+
+/** 查询群发任务列表 */
+export function listBroadcasts(): BroadcastTask[] {
+  return Array.from(broadcastStore.values()).sort(
+    (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),
+  );
+}
+
+/** 查询群发任务状态 */
+export function getBroadcastStatus(id: number): BroadcastTask {
+  const task = broadcastStore.get(id);
+  if (!task) throw new AppError(404, 'BROADCAST_NOT_FOUND', `群发任务 ID=${id} 不存在`);
+  return task;
+}
+
+// ============================================================
+// 运营计划(§9.6 ~ §9.7)
+// ============================================================
+
+/** 创建运营计划 */
+export function createPlan(data: Omit<OpsPlan, 'id' | 'createdAt' | 'updatedAt'>): OpsPlan {
+  const now = new Date().toISOString();
+  const plan: OpsPlan = { id: nextPlanId++, ...data, createdAt: now, updatedAt: now };
+  planStore.set(plan.id, plan);
+  return plan;
+}
+
+/** 查询运营计划列表 */
+export function listPlans(status?: string): OpsPlan[] {
+  let result = Array.from(planStore.values());
+  if (status) result = result.filter((p) => p.status === status);
+  return result.sort((a, b) => new Date(b.startDate).getTime() - new Date(a.startDate).getTime());
+}
+
+/** 添加计划项 */
+export function addPlanItem(data: Omit<OpsPlanItem, 'id' | 'createdAt'>): OpsPlanItem {
+  const plan = planStore.get(data.planId);
+  if (!plan) throw new AppError(404, 'PLAN_NOT_FOUND', `计划 ID=${data.planId} 不存在`);
+
+  const item: OpsPlanItem = {
+    id: nextPlanItemId++,
+    ...data,
+    createdAt: new Date().toISOString(),
+  };
+  planItemStore.set(item.id, item);
+  return item;
+}
+
+/** 查询计划项列表 */
+export function listPlanItems(planId: number): OpsPlanItem[] {
+  return Array.from(planItemStore.values())
+    .filter((item) => item.planId === planId)
+    .sort((a, b) => a.scheduledDate.localeCompare(b.scheduledDate));
+}
+
+/**
+ * 检查计划执行情况(§9.7)
+ *
+ * 对计划项的时间窗和群发记录做对比,更新执行状态。
+ *
+ * @param planId - 计划 ID
+ * @returns 未执行的项目列表(供 §9.8 提醒使用)
+ */
+export function checkPlanExecution(planId: number): { unexecuted: OpsPlanItem[]; executed: OpsPlanItem[] } {
+  const items = listPlanItems(planId);
+  const now = new Date();
+
+  const unexecuted: OpsPlanItem[] = [];
+  const executed: OpsPlanItem[] = [];
+
+  for (const item of items) {
+    if (item.status === 'skipped') continue;
+
+    // 判断是否已过计划日期
+    const scheduled = new Date(item.scheduledDate);
+    if (scheduled < now && item.status === 'pending') {
+      // 检查是否有群发记录(TODO: 实际查询 broadcast 记录)
+      if (item.contentDetected) {
+        item.status = 'executed';
+        planItemStore.set(item.id, item);
+        executed.push(item);
+      } else {
+        unexecuted.push(item);
+      }
+    }
+  }
+
+  return { unexecuted, executed };
+}

+ 90 - 0
backend/src/apps/pc/dashboard/controllers/dashboard.controller.ts

@@ -0,0 +1,90 @@
+/**
+ * 数据看板与经营复盘模块 — 控制器层
+ *
+ * 对应规范文档 §十一「模块 8:数据看板与经营复盘模块」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess } from '../../../../shared/http/response.js';
+import {
+  getOverviewDashboard,
+  getCommunityDashboard,
+  getStoreDashboard,
+  getActivityIndex,
+  getActivityRanking,
+  generatePeriodicReport,
+} from '../services/dashboard.service.js';
+
+/** GET /api/dashboard/overview — 总览看板(§11.1) */
+export async function overview(_req: Request, res: Response): Promise<void> {
+  try {
+    const data = getOverviewDashboard();
+    sendSuccess(res, data);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/dashboard/community/:communityId — 小区看板(§11.2) */
+export async function communityDashboard(req: Request, res: Response): Promise<void> {
+  try {
+    const communityId = Number(req.params.communityId);
+    const data = getCommunityDashboard(communityId);
+    sendSuccess(res, data);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/dashboard/store/:storeId — 门店看板(§11.3) */
+export async function storeDashboard(req: Request, res: Response): Promise<void> {
+  try {
+    const storeId = Number(req.params.storeId);
+    const data = getStoreDashboard(storeId);
+    sendSuccess(res, data);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/dashboard/activity/:roomId — 群活跃度指数(§11.4) */
+export async function activityIndex(req: Request, res: Response): Promise<void> {
+  try {
+    const roomId = String(req.params.roomId);
+    const data = getActivityIndex(roomId);
+    sendSuccess(res, data);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/dashboard/activity-ranking — 群活跃度排行榜 */
+export async function activityRanking(req: Request, res: Response): Promise<void> {
+  try {
+    const limit = typeof req.query.limit === 'string' ? Number(req.query.limit) : 20;
+    const data = getActivityRanking(limit);
+    sendSuccess(res, data);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/dashboard/reports/weekly — 周报(§11.9) */
+export async function weeklyReport(_req: Request, res: Response): Promise<void> {
+  try {
+    const data = generatePeriodicReport('weekly');
+    sendSuccess(res, data);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/dashboard/reports/monthly — 月报(§11.9) */
+export async function monthlyReport(_req: Request, res: Response): Promise<void> {
+  try {
+    const data = generatePeriodicReport('monthly');
+    sendSuccess(res, data);
+  } catch (error) {
+    throw error;
+  }
+}

+ 34 - 0
backend/src/apps/pc/dashboard/routes/dashboard.routes.ts

@@ -0,0 +1,34 @@
+/**
+ * 数据看板模块 — 路由层
+ *
+ * 接口一览:
+ *   GET /api/dashboard/overview                  总览看板
+ *   GET /api/dashboard/community/:communityId    小区看板
+ *   GET /api/dashboard/store/:storeId           门店看板
+ *   GET /api/dashboard/activity/:roomId         群活跃度
+ *   GET /api/dashboard/activity-ranking         活跃度排行榜
+ *   GET /api/dashboard/reports/weekly           周报
+ *   GET /api/dashboard/reports/monthly          月报
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  overview,
+  communityDashboard,
+  storeDashboard,
+  activityIndex,
+  activityRanking,
+  weeklyReport,
+  monthlyReport,
+} from '../controllers/dashboard.controller.js';
+
+export const pcDashboardApiRouter: ExpressRouter = Router();
+
+pcDashboardApiRouter.get('/dashboard/overview', overview);
+pcDashboardApiRouter.get('/dashboard/community/:communityId', communityDashboard);
+pcDashboardApiRouter.get('/dashboard/store/:storeId', storeDashboard);
+pcDashboardApiRouter.get('/dashboard/activity/:roomId', activityIndex);
+pcDashboardApiRouter.get('/dashboard/activity-ranking', activityRanking);
+pcDashboardApiRouter.get('/dashboard/reports/weekly', weeklyReport);
+pcDashboardApiRouter.get('/dashboard/reports/monthly', monthlyReport);

+ 229 - 0
backend/src/apps/pc/dashboard/services/dashboard.service.ts

@@ -0,0 +1,229 @@
+/**
+ * 数据看板与经营复盘模块 — 业务服务层
+ *
+ * 对应规范文档 §十一「模块 8:数据看板与经营复盘模块」
+ *
+ * 说明:无新增 QiWe 接口,所有数据来源于已同步的群、消息、合规、风控等模块聚合。
+ *
+ * 包含的看板:
+ *   §11.1 总览看板:群数、人数、消息活跃、合规/预警计数
+ *   §11.2 小区看板:按小区聚合各指标
+ *   §11.3 门店看板:按门店聚合多小区指标、排名
+ *   §11.4 群活跃度指数:消息量、UV 公式计算
+ *   §11.5 小区触达率:群人数 / 小区总户数
+ *   §11.6 图表下钻:支持 communityId → roomId → staff 参数
+ *   §11.7 添加微信与链接率:依赖 §12.1 填报数据
+ *   §11.8 签单与转化率:【占位】CRM 对接
+ *   §11.9 周月报自动汇总
+ */
+
+import type { PageResult } from '../../../../shared/types/page.js';
+import { makePageResult } from '../../../../shared/types/page.js';
+
+/** 总览看板数据 */
+export interface OverviewDashboard {
+  /** 总群数 */
+  totalRooms: number;
+  /** 总群成员数 */
+  totalMembers: number;
+  /** 近 7 天消息量 */
+  messageCount7d: number;
+  /** 活跃群数(7 天内有消息的群) */
+  activeRooms: number;
+  /** 合规达标率 */
+  complianceRate: number;
+  /** 未处理预警数 */
+  openAlerts: number;
+  /** 未处理工单数 */
+  openWorkOrders: number;
+  /** 生成时间 */
+  generatedAt: string;
+}
+
+/** 小区看板数据 */
+export interface CommunityDashboard {
+  communityId: number;
+  communityName: string;
+  totalHouseholds: number;
+  /** 群人数之和 */
+  groupMemberCount: number;
+  /** 触达率 = groupMemberCount / totalHouseholds */
+  reachRate: number;
+  /** 消息活跃度 */
+  messageCount7d: number;
+  /** 合规问题数 */
+  complianceIssues: number;
+}
+
+/** 门店看板数据 */
+export interface StoreDashboard {
+  storeId: number;
+  storeName: string;
+  /** 下属小区数 */
+  communityCount: number;
+  /** 下属群数 */
+  roomCount: number;
+  /** 总触达率 */
+  reachRate: number;
+  /** 合规排名 */
+  complianceRank: number;
+}
+
+/** 群活跃度指数 */
+export interface ActivityIndex {
+  roomId: string;
+  roomName: string;
+  /** 活跃度指数(0-100) */
+  score: number;
+  /** 消息量 */
+  messageCount: number;
+  /** 参与人数(UV) */
+  uniqueUsers: number;
+  period: string;
+}
+
+/** 周/月报 */
+export interface PeriodicReport {
+  title: string;
+  period: string;
+  /** 群与活跃概览 */
+  overview: OverviewDashboard;
+  /** 合规概况 */
+  complianceSummary: {
+    total: number;
+    resolved: number;
+    pending: number;
+  };
+  /** 风控概况 */
+  riskSummary: {
+    totalAlerts: number;
+    handledAlerts: number;
+  };
+  /** 转化数据(依赖填报) */
+  conversionSummary: {
+    newLeads: number;
+    orders: number;
+    note: string; // 缺失数据标注
+  };
+  generatedAt: string;
+}
+
+/**
+ * 生成总览看板(§11.1)
+ *
+ * 聚合群数、人数、消息活跃度、合规/预警计数。
+ */
+export function getOverviewDashboard(): OverviewDashboard {
+  // TODO: 从各模块聚合真实数据
+  return {
+    totalRooms: 156,
+    totalMembers: 2340,
+    messageCount7d: 8920,
+    activeRooms: 142,
+    complianceRate: 0.85,
+    openAlerts: 3,
+    openWorkOrders: 2,
+    generatedAt: new Date().toISOString(),
+  };
+}
+
+/**
+ * 查询小区看板(§11.2)
+ *
+ * 按 communityId 聚合群数据、触达率、合规情况。
+ */
+export function getCommunityDashboard(communityId: number): CommunityDashboard {
+  // TODO: 从 community + room + compliance 模块聚合
+  return {
+    communityId,
+    communityName: `小区-${communityId}`,
+    totalHouseholds: 1200,
+    groupMemberCount: 380,
+    reachRate: 0.32,
+    messageCount7d: 560,
+    complianceIssues: 1,
+  };
+}
+
+/**
+ * 查询门店看板(§11.3)
+ *
+ * 按门店聚合多小区指标、排名。
+ */
+export function getStoreDashboard(storeId: number): StoreDashboard {
+  // TODO: 按门店聚合社区看板数据
+  return {
+    storeId,
+    storeName: `门店-${storeId}`,
+    communityCount: 5,
+    roomCount: 12,
+    reachRate: 0.35,
+    complianceRank: 2,
+  };
+}
+
+/**
+ * 计算群活跃度指数(§11.4)
+ *
+ * 基于消息量 + UV 综合加权计算(公式可调)。
+ * score = min(100, messageCount/100 * 0.6 + uniqueUsers/5 * 0.4)
+ */
+export function getActivityIndex(roomId: string): ActivityIndex {
+  // TODO: 从 message 表统计实际数据
+  const messageCount = Math.floor(Math.random() * 200);
+  const uniqueUsers = Math.floor(Math.random() * 30);
+  const score = Math.min(100, (messageCount / 100) * 60 + (uniqueUsers / 5) * 40);
+
+  return {
+    roomId,
+    roomName: `群-${roomId}`,
+    score: Math.round(score),
+    messageCount,
+    uniqueUsers,
+    period: '7d',
+  };
+}
+
+/**
+ * 批量查询群活跃度排行榜
+ */
+export function getActivityRanking(limit = 20): ActivityIndex[] {
+  // TODO: 从 room 模块获取所有 roomId,逐个计算活跃度
+  // 这里返回示例数据
+  const mockRoomIds = ['room-001', 'room-002', 'room-003', 'room-004', 'room-005'];
+  return mockRoomIds
+    .map((roomId) => getActivityIndex(roomId))
+    .sort((a, b) => b.score - a.score)
+    .slice(0, limit);
+}
+
+/**
+ * 生成周报/月报(§11.9)
+ *
+ * 自动汇总群/活跃/合规/预警块。
+ * 转化数据依赖手工填报(§12.2),缺失则标注「未录入」。
+ */
+export function generatePeriodicReport(period: 'weekly' | 'monthly'): PeriodicReport {
+  const overview = getOverviewDashboard();
+
+  return {
+    title: period === 'weekly' ? '周报' : '月报',
+    period: new Date().toISOString().slice(0, 7),
+    overview,
+    complianceSummary: {
+      total: 12,
+      resolved: 10,
+      pending: 2,
+    },
+    riskSummary: {
+      totalAlerts: 5,
+      handledAlerts: 4,
+    },
+    conversionSummary: {
+      newLeads: 0,
+      orders: 0,
+      note: '转化数据待填报(§12.2),当前未录入',
+    },
+    generatedAt: new Date().toISOString(),
+  };
+}

+ 0 - 16
backend/src/apps/pc/health/app.ts

@@ -1,16 +0,0 @@
-import express from 'express';
-import cors from 'cors';
-import type { Express } from 'express';
-import { pcHealthApiRouter } from './routes/health.routes.js';
-
-export function createPcHealthApp(): Express {
-  const app = express();
-
-  app.use(cors());
-  app.use(express.json());
-
-  app.use('/api', pcHealthApiRouter);
-
-  return app;
-}
-

+ 24 - 3
backend/src/apps/pc/health/controllers/health.controller.ts

@@ -1,6 +1,27 @@
 import type { Request, Response } from 'express';
 
-export function getHealth(_req: Request, res: Response) {
-  res.json({ status: 'ok', timestamp: new Date().toISOString(), platform: 'pc' });
+/**
+ * GET /api/health — 健康检查
+ *
+ * 返回服务运行状态和已加载的模块列表,供监控和前端探活使用。
+ */
+export function getHealth(_req: Request, res: Response): void {
+  res.json({
+    status: 'ok',
+    platform: 'pc',
+    timestamp: new Date().toISOString(),
+    modules: [
+      'qiwei',        // 企微 API 代理 [模块1]
+      'staff',        // 人员管理 [模块1]
+      'community',    // 小区管理 [模块2]
+      'room',         // 群管理 [模块2]
+      'compliance',   // 合规检查 [模块4]
+      'risk',         // 群风控 [模块5]
+      'content',      // 内容运营 [模块6]
+      'koc',          // KOC与意向 [模块7]
+      'dashboard',    // 数据看板 [模块8]
+      'sales',        // 经营数据 [模块9]
+      'workbench',    // 工作台 [模块10]
+    ],
+  });
 }
-

+ 26 - 5
backend/src/apps/pc/health/server.ts

@@ -1,12 +1,33 @@
-import { createPcHealthApp } from './app.js';
+/**
+ * PC 端统一入口 — 端口监听层
+ *
+ * 创建唯一的 PC Express App(包含所有模块路由),监听单端口。
+ * 当前阶段所有 PC 模块共用一个进程,独立部署时可将模块 server.ts 拆出去。
+ */
+
+import { createPcApp } from '../app.js';
 import { getNumberEnv } from '../../../shared/config/env.js';
 
-export function startPcServer() {
-  const app = createPcHealthApp();
+export function startPcServer(): void {
+  const app = createPcApp();
   const port = getNumberEnv('PC_PORT', 3101);
 
   app.listen(port, () => {
-    console.log(`pc server running on http://localhost:${port}`);
+    console.log('──────────────────────────────────────────');
+    console.log(`  PC 端服务已启动 → http://localhost:${port}`);
+    console.log('  已加载模块:');
+    console.log('    /api/health            健康检查');
+    console.log('    /api/qiwei             企微 API 代理 [模块1]');
+    console.log('    /api/staff             人员管理 [模块1]');
+    console.log('    /api/communities       小区管理 [模块2]');
+    console.log('    /api/rooms             群管理 [模块2]');
+    console.log('    /api/compliance        合规检查 [模块4]');
+    console.log('    /api/risk              群风控 [模块5]');
+    console.log('    /api/content           内容运营 [模块6]');
+    console.log('    /api/koc               KOC与意向 [模块7]');
+    console.log('    /api/dashboard         数据看板 [模块8]');
+    console.log('    /api/sales             经营数据 [模块9]');
+    console.log('    /api/workbench         工作台 [模块10]');
+    console.log('──────────────────────────────────────────');
   });
 }
-

+ 132 - 0
backend/src/apps/pc/koc/controllers/koc.controller.ts

@@ -0,0 +1,132 @@
+/**
+ * 拉群、KOC 与意向客户模块 — 控制器层
+ *
+ * 对应规范文档 §十「模块 7:拉群、KOC 与意向客户模块」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  createChannel, listChannels, updateChannel, deleteChannel,
+  syncContacts, listContacts, getContact,
+  findKocCandidates, labelKoc,
+  detectIntent, listLeads, updateLead, listTasks,
+} from '../services/koc.service.js';
+
+// ============================================================
+// 渠道管理
+// ============================================================
+
+export async function createCh(req: Request, res: Response): Promise<void> {
+  try {
+    const { name, code, type } = req.body;
+    if (!name || !code || !type) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:name, code, type');
+      return;
+    }
+    const ch = createChannel({ name, code, type, remark: req.body.remark || '' });
+    sendSuccess(res, ch, 201);
+  } catch (error) { throw error; }
+}
+
+export async function listCh(_req: Request, res: Response): Promise<void> {
+  try { sendSuccess(res, listChannels()); } catch (error) { throw error; }
+}
+
+export async function updateCh(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    sendSuccess(res, updateChannel(id, req.body));
+  } catch (error) { throw error; }
+}
+
+export async function deleteCh(req: Request, res: Response): Promise<void> {
+  try {
+    deleteChannel(Number(req.params.id));
+    sendSuccess(res, { deleted: true });
+  } catch (error) { throw error; }
+}
+
+// ============================================================
+// 外部联系人
+// ============================================================
+
+export async function syncCt(req: Request, res: Response): Promise<void> {
+  try {
+    const { guid, currentSeq, limit } = req.body;
+    if (!guid) { sendError(res, 400, 'VALIDATION_ERROR', '缺少 guid 参数'); return; }
+    const result = await syncContacts(guid, currentSeq || 0, limit || 50);
+    sendSuccess(res, result);
+  } catch (error) { throw error; }
+}
+
+export async function listCt(_req: Request, res: Response): Promise<void> {
+  try { sendSuccess(res, listContacts()); } catch (error) { throw error; }
+}
+
+export async function getCt(req: Request, res: Response): Promise<void> {
+  try { sendSuccess(res, getContact(String(req.params.userId))); } catch (error) { throw error; }
+}
+
+// ============================================================
+// KOC
+// ============================================================
+
+export async function kocCandidates(_req: Request, res: Response): Promise<void> {
+  try { sendSuccess(res, findKocCandidates()); } catch (error) { throw error; }
+}
+
+export async function labelKocUser(req: Request, res: Response): Promise<void> {
+  try {
+    const { userId, guid, labelId } = req.body;
+    if (!userId || !guid || !labelId) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:userId, guid, labelId');
+      return;
+    }
+    const result = await labelKoc(userId, guid, labelId);
+    sendSuccess(res, result);
+  } catch (error) { throw error; }
+}
+
+// ============================================================
+// 意向客户
+// ============================================================
+
+export async function detectIntentMsg(req: Request, res: Response): Promise<void> {
+  try {
+    const { userId, roomId, content } = req.body;
+    if (!userId || !roomId || !content) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:userId, roomId, content');
+      return;
+    }
+    const lead = detectIntent(userId, roomId, content);
+    if (!lead) {
+      sendSuccess(res, { matched: false, lead: null });
+      return;
+    }
+    sendSuccess(res, { matched: true, lead });
+  } catch (error) { throw error; }
+}
+
+export async function listLd(req: Request, res: Response): Promise<void> {
+  try {
+    const { intentLevel, status } = req.query;
+    sendSuccess(res, listLeads(
+      typeof intentLevel === 'string' ? intentLevel : undefined,
+      typeof status === 'string' ? status : undefined,
+    ));
+  } catch (error) { throw error; }
+}
+
+export async function updateLd(req: Request, res: Response): Promise<void> {
+  try {
+    sendSuccess(res, updateLead(Number(req.params.id), req.body));
+  } catch (error) { throw error; }
+}
+
+export async function listTk(req: Request, res: Response): Promise<void> {
+  try {
+    const { assigneeId } = req.query;
+    sendSuccess(res, listTasks(typeof assigneeId === 'string' ? Number(assigneeId) : undefined));
+  } catch (error) { throw error; }
+}

+ 88 - 0
backend/src/apps/pc/koc/models/koc.model.ts

@@ -0,0 +1,88 @@
+/**
+ * 拉群、KOC 与意向客户模块 — 数据模型定义
+ *
+ * 对应规范文档 §十「模块 7:拉群、KOC 与意向客户模块」
+ *
+ * 核心表:
+ *   - channel         :拉群渠道
+ *   - external_contact:外部联系人
+ *   - koc_candidate   :KOC 候选人
+ *   - intent_lead     :意向客户
+ *   - intent_task     :跟进待办
+ */
+
+/** 拉群渠道 */
+export interface Channel {
+  id: number;
+  name: string;
+  code: string;
+  /** 渠道类型:online=线上, offline=线下, referral=转介绍 */
+  type: 'online' | 'offline' | 'referral';
+  remark: string;
+  createdAt: string;
+}
+
+/** 外部联系人 */
+export interface ExternalContact {
+  userId: string;
+  nickname: string;
+  remark: string;
+  mobile: string;
+  avatarUrl: string;
+  /** KOC 标签 ID 列表 */
+  labelIds: string[];
+  /** 所属群 ID */
+  roomId: string;
+  /** 添加时间 */
+  addTime: string;
+}
+
+/** KOC 候选人 */
+export interface KocCandidate {
+  userId: string;
+  nickname: string;
+  /** 发言次数 */
+  messageCount: number;
+  /** 互动指数 */
+  engagementScore: number;
+  /** 推荐理由 */
+  reason: string;
+  /** 状态:candidate=候选, confirmed=已确认, labelled=已打标 */
+  status: 'candidate' | 'confirmed' | 'labelled';
+  evaluatedAt: string;
+}
+
+/** 意向客户 */
+export interface IntentLead {
+  id: number;
+  /** 用户 ID */
+  userId: string;
+  /** 所属群 ID */
+  roomId: string;
+  /** 意向等级:high=高, medium=中, low=低 */
+  intentLevel: 'high' | 'medium' | 'low';
+  /** 匹配关键词 */
+  matchedKeywords: string[];
+  /** 匹配的消息内容摘要 */
+  messageSummary: string;
+  /** 状态 */
+  status: 'new' | 'assigned' | 'contacted' | 'converted' | 'closed';
+  /** 指定跟进人 ID */
+  assigneeId: number;
+  /** 跟进待办 ID */
+  taskId: number;
+  createdAt: string;
+  updatedAt: string;
+}
+
+/** 跟进待办 */
+export interface IntentTask {
+  id: number;
+  leadId: number;
+  title: string;
+  description: string;
+  assigneeId: number;
+  deadline: string;
+  status: 'pending' | 'completed';
+  createdAt: string;
+}

+ 54 - 0
backend/src/apps/pc/koc/routes/koc.routes.ts

@@ -0,0 +1,54 @@
+/**
+ * 拉群、KOC 与意向客户模块 — 路由层
+ *
+ * 接口一览:
+ *   渠道:
+ *     POST   /api/channels              创建渠道
+ *     GET    /api/channels              查询渠道列表
+ *     PUT    /api/channels/:id          更新渠道
+ *     DELETE /api/channels/:id          删除渠道
+ *   联系人:
+ *     POST   /api/contacts/sync         同步外部联系人
+ *     GET    /api/contacts              查询联系人列表
+ *     GET    /api/contacts/:userId      查询联系人详情
+ *   KOC:
+ *     GET    /api/koc/candidates        KOC 候选人列表
+ *     POST   /api/koc/label             打 KOC 标签
+ *   意向客户:
+ *     POST   /api/intent-leads/detect   识别意向话术
+ *     GET    /api/intent-leads          查询意向客户列表
+ *     PUT    /api/intent-leads/:id      更新意向客户
+ *     GET    /api/intent-tasks          查询跟进待办
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  createCh, listCh, updateCh, deleteCh,
+  syncCt, listCt, getCt,
+  kocCandidates, labelKocUser,
+  detectIntentMsg, listLd, updateLd, listTk,
+} from '../controllers/koc.controller.js';
+
+export const pcKocApiRouter: ExpressRouter = Router();
+
+// 渠道
+pcKocApiRouter.post('/channels', createCh);
+pcKocApiRouter.get('/channels', listCh);
+pcKocApiRouter.put('/channels/:id', updateCh);
+pcKocApiRouter.delete('/channels/:id', deleteCh);
+
+// 联系人
+pcKocApiRouter.post('/contacts/sync', syncCt);
+pcKocApiRouter.get('/contacts', listCt);
+pcKocApiRouter.get('/contacts/:userId', getCt);
+
+// KOC
+pcKocApiRouter.get('/koc/candidates', kocCandidates);
+pcKocApiRouter.post('/koc/label', labelKocUser);
+
+// 意向客户
+pcKocApiRouter.post('/intent-leads/detect', detectIntentMsg);
+pcKocApiRouter.get('/intent-leads', listLd);
+pcKocApiRouter.put('/intent-leads/:id', updateLd);
+pcKocApiRouter.get('/intent-tasks', listTk);

+ 306 - 0
backend/src/apps/pc/koc/services/koc.service.ts

@@ -0,0 +1,306 @@
+/**
+ * 拉群、KOC 与意向客户模块 — 业务服务层
+ *
+ * 对应规范文档 §十「模块 7:拉群、KOC 与意向客户模块」
+ *
+ * 业务流程:
+ *   §10.1 拉群渠道登记:channel 表 CRUD
+ *   §10.2 各渠道拉群效果统计:进群事件结合 channelId 聚合
+ *   §10.3 自动筛选 KOC 候选人:按发言次数/互动规则出候选名单
+ *   §10.4 在企微给客户打 KOC 标签:确认 KOC 后调 API-19 打标签
+ *   §10.5 查看外部联系人档案:API-17 分页 + API-18 批量详情
+ *   §10.7 识别群内咨询类话术:关键词匹配群消息
+ *   §10.8 意向高/中/低分级:规则匹配 + 人工确认高意向
+ *   §10.9 生成跟进待办并通知销售:高意向写 intent_task → API-14 通知
+ */
+
+import { AppError } from '../../../../shared/errors/app-error.js';
+import { callQiWeApi } from '../../../../shared/qiwei/client.js';
+import type {
+  Channel,
+  ExternalContact,
+  KocCandidate,
+  IntentLead,
+  IntentTask,
+} from '../models/koc.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const channelStore = new Map<number, Channel>();
+const contactStore = new Map<string, ExternalContact>();
+const kocCandidateStore = new Map<string, KocCandidate>();
+const intentLeadStore = new Map<number, IntentLead>();
+const intentTaskStore = new Map<number, IntentTask>();
+let nextChannelId = 1;
+let nextLeadId = 1;
+let nextTaskId = 1;
+
+// ============================================================
+// 渠道管理(§10.1)
+// ============================================================
+
+export function createChannel(data: Omit<Channel, 'id' | 'createdAt'>): Channel {
+  const ch: Channel = { id: nextChannelId++, ...data, createdAt: new Date().toISOString() };
+  channelStore.set(ch.id, ch);
+  return ch;
+}
+
+export function listChannels(): Channel[] {
+  return Array.from(channelStore.values());
+}
+
+export function updateChannel(id: number, data: Partial<Channel>): Channel {
+  const ch = channelStore.get(id);
+  if (!ch) throw new AppError(404, 'CHANNEL_NOT_FOUND', `渠道 ID=${id} 不存在`);
+  Object.assign(ch, data);
+  channelStore.set(id, ch);
+  return ch;
+}
+
+export function deleteChannel(id: number): void {
+  if (!channelStore.has(id)) throw new AppError(404, 'CHANNEL_NOT_FOUND', `渠道 ID=${id} 不存在`);
+  channelStore.delete(id);
+}
+
+// ============================================================
+// 外部联系人(§10.5)
+// ============================================================
+
+/**
+ * 分页获取外部联系人列表(API-17 + API-18)
+ *
+ * 步骤:
+ *  1. 调 API-17 /contact/getWxContactList 分页拉联系人 userId
+ *  2. 调 API-18 /contact/batchGetUserinfo 批量获取详情
+ */
+export async function syncContacts(guid: string, currentSeq: number, limit: number): Promise<{
+  contacts: ExternalContact[];
+  hasMore: number;
+  nextSeq: number;
+}> {
+  // 步骤 1:分页拉外部联系人(API-17)
+  const listData = await callQiWeApi<{
+    hasMore: number;
+    currentSeq: number;
+    contactList: Array<{
+      userId: string;
+      nickname: string;
+      remark: string;
+    }>;
+  }>('/contact/getWxContactList', { guid, currentSeq, limit, bizType: 1 });
+
+  if (!listData.contactList || listData.contactList.length === 0) {
+    return { contacts: [], hasMore: listData.hasMore, nextSeq: listData.currentSeq };
+  }
+
+  const userIds = listData.contactList.map((c) => c.userId);
+
+  // 步骤 2:批量查详情(API-18)
+  const detailData = await callQiWeApi<{
+    contactList: Array<{
+      userId: string;
+      nickname: string;
+      mobile: string;
+      avatarUrl: string;
+    }>;
+  }>('/contact/batchGetUserinfo', { guid, userIdList: userIds });
+
+  const contacts: ExternalContact[] = [];
+  for (const detail of detailData.contactList || []) {
+    const contact: ExternalContact = {
+      userId: detail.userId,
+      nickname: detail.nickname,
+      remark: '',
+      mobile: detail.mobile,
+      avatarUrl: detail.avatarUrl,
+      labelIds: [],
+      roomId: '',
+      addTime: new Date().toISOString(),
+    };
+    contactStore.set(contact.userId, contact);
+    contacts.push(contact);
+  }
+
+  return { contacts, hasMore: listData.hasMore, nextSeq: listData.currentSeq };
+}
+
+/** 查询已存储的外部联系人 */
+export function listContacts(): ExternalContact[] {
+  return Array.from(contactStore.values());
+}
+
+/** 查询单个联系人详情 */
+export function getContact(userId: string): ExternalContact {
+  const contact = contactStore.get(userId);
+  if (!contact) throw new AppError(404, 'CONTACT_NOT_FOUND', `联系人 ${userId} 不存在`);
+  return contact;
+}
+
+// ============================================================
+// KOC 筛选与打标签(§10.3 ~ §10.4)
+// ============================================================
+
+/**
+ * 自动筛选 KOC 候选人
+ *
+ * 规则:
+ *   - 近 30 天发言次数 > 10
+ *   - 互动指数(发言+被回复)前 20%
+ *
+ * 产出候选名单,供人工确认后打标签。
+ */
+export function findKocCandidates(): KocCandidate[] {
+  const candidates: KocCandidate[] = [];
+
+  for (const contact of contactStore.values()) {
+    // TODO: 实际应从 message 表统计发言次数和互动指数
+    const messageCount = Math.floor(Math.random() * 20); // 示例
+    const engagementScore = Math.floor(Math.random() * 100);
+
+    if (messageCount > 10) {
+      const candidate: KocCandidate = {
+        userId: contact.userId,
+        nickname: contact.nickname,
+        messageCount,
+        engagementScore,
+        reason: `近30天发言${messageCount}次,互动指数${engagementScore}`,
+        status: 'candidate',
+        evaluatedAt: new Date().toISOString(),
+      };
+      kocCandidateStore.set(contact.userId, candidate);
+      candidates.push(candidate);
+    }
+  }
+
+  return candidates.sort((a, b) => b.engagementScore - a.engagementScore);
+}
+
+/**
+ * 确认 KOC 并调用 API-19 打标签
+ *
+ * @param userId  - 目标用户 ID
+ * @param guid    - 操作人员 guid
+ * @param labelId - 标签 ID
+ */
+export async function labelKoc(userId: string, guid: string, labelId: string): Promise<KocCandidate> {
+  const candidate = kocCandidateStore.get(userId);
+  if (!candidate) throw new AppError(404, 'KOC_CANDIDATE_NOT_FOUND', `KOC 候选人 ${userId} 未找到`);
+
+  // 调用 API-19 打标签
+  await callQiWeApi('/label/contactEditLabel', {
+    guid,
+    opType: 1, // 1=增加标签
+    paramList: [{
+      userId,
+      labelIdList: [labelId],
+      labelSuperIdList: [labelId],
+      labelOwnerList: [guid],
+    }],
+  });
+
+  candidate.status = 'labelled';
+  kocCandidateStore.set(userId, candidate);
+  return candidate;
+}
+
+// ============================================================
+// 意向客户(§10.7 ~ §10.9)
+// ============================================================
+
+/**
+ * 识别群内咨询类话术,生成意向客户线索
+ *
+ * 匹配关键词:价格、量房、方案、预算、装修风格等
+ *
+ * @param userId  - 用户 ID
+ * @param roomId  - 群 ID
+ * @param content - 消息内容
+ * @returns 创建的意向线索(若无匹配则返回 null)
+ */
+export function detectIntent(userId: string, roomId: string, content: string): IntentLead | null {
+  const interestKeywords = [
+    '价格', '多少钱', '预算', '报价',
+    '量房', '尺寸', '面积',
+    '方案', '设计', '风格',
+    '优惠', '活动', '折扣',
+    '装修', '全屋', '定制',
+    '样板间', '预约', '看房',
+  ];
+
+  const matched: string[] = [];
+  for (const kw of interestKeywords) {
+    if (content.includes(kw)) matched.push(kw);
+  }
+
+  if (matched.length === 0) return null;
+
+  // 意向分级(§10.8)
+  let intentLevel: IntentLead['intentLevel'] = 'low';
+  if (matched.length >= 3) {
+    intentLevel = 'high';
+  } else if (matched.length >= 2) {
+    intentLevel = 'medium';
+  }
+
+  const now = new Date().toISOString();
+  const lead: IntentLead = {
+    id: nextLeadId++,
+    userId,
+    roomId,
+    intentLevel,
+    matchedKeywords: matched,
+    messageSummary: content.slice(0, 100),
+    status: 'new',
+    assigneeId: 0,
+    taskId: 0,
+    createdAt: now,
+    updatedAt: now,
+  };
+
+  intentLeadStore.set(lead.id, lead);
+
+  // 高意向自动生成跟进待办(§10.9)
+  if (intentLevel === 'high') {
+    const task: IntentTask = {
+      id: nextTaskId++,
+      leadId: lead.id,
+      title: `高意向客户跟进:${userId}`,
+      description: `用户在群 ${roomId} 中提及了 ${matched.join('、')},建议及时跟进`,
+      assigneeId: 0, // 待分配
+      deadline: new Date(Date.now() + 2 * 60 * 60 * 1000).toISOString(), // 2h 内
+      status: 'pending',
+      createdAt: now,
+    };
+    intentTaskStore.set(task.id, task);
+    lead.taskId = task.id;
+    intentLeadStore.set(lead.id, lead);
+  }
+
+  return lead;
+}
+
+/** 查询意向客户列表 */
+export function listLeads(
+  intentLevel?: string,
+  status?: string,
+): IntentLead[] {
+  let result = Array.from(intentLeadStore.values());
+  if (intentLevel) result = result.filter((l) => l.intentLevel === intentLevel);
+  if (status) result = result.filter((l) => l.status === status);
+  return result.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
+}
+
+/** 更新意向客户(分配跟进人等) */
+export function updateLead(id: number, data: Partial<IntentLead>): IntentLead {
+  const lead = intentLeadStore.get(id);
+  if (!lead) throw new AppError(404, 'LEAD_NOT_FOUND', `意向客户 ID=${id} 不存在`);
+  Object.assign(lead, data, { updatedAt: new Date().toISOString() });
+  intentLeadStore.set(id, lead);
+  return lead;
+}
+
+/** 查询跟进待办列表 */
+export function listTasks(assigneeId?: number): IntentTask[] {
+  let result = Array.from(intentTaskStore.values());
+  if (assigneeId !== undefined) result = result.filter((t) => t.assigneeId === assigneeId);
+  return result;
+}

+ 301 - 0
backend/src/apps/pc/qiwei/controllers/qiwei.controller.ts

@@ -0,0 +1,301 @@
+/**
+ * QiWe 模块 — 控制器层
+ *
+ * 职责:
+ *   - 解析 HTTP 请求参数(query / body / path)
+ *   - 调用 service 层执行业务逻辑
+ *   - 使用统一响应格式返回数据
+ *
+ * 不直接操作数据库、不直接调用第三方 API(这些在 service 层完成)。
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  proxyQiWeCall,
+  checkStaffOnline,
+  batchCheckOnline,
+  syncMessages,
+  processWebhook,
+  getRoomDocs,
+  getRoomDocByRoomId,
+  getRoomDocAnomalies,
+  resolveRoomDocAnomaly,
+  getMessages,
+} from '../services/qiwei.service.js';
+
+// ============================================================
+// QiWe 通用代理
+// ============================================================
+
+/**
+ * POST /api/qiwei/proxy
+ *
+ * 通用 QiWe API 代理:前端传入 method + params,后端转发到 QiWe 开放平台。
+ * 适用于开发调试或临时调用官方接口。
+ *
+ * Body:
+ *   { "method": "/room/getRoomList", "params": { "guid": "xxx" } }
+ */
+export async function proxyApi(req: Request, res: Response): Promise<void> {
+  try {
+    const { method, params } = req.body as { method?: string; params?: Record<string, unknown> };
+
+    // 参数校验
+    if (!method) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少 method 参数(QiWe 接口路径)');
+      return;
+    }
+
+    const data = await proxyQiWeCall(method, params || {});
+    sendSuccess(res, data);
+  } catch (error) {
+    // 错误由 error-handler 中间件统一处理
+    throw error;
+  }
+}
+
+// ============================================================
+// 人员在线状态
+// ============================================================
+
+/**
+ * GET /api/qiwei/staff/:guid/status
+ *
+ * 查询指定人员企微在线状态(API-05 /login/checkLogin)。
+ *
+ * Path params:
+ *   guid - 人员设备 GUID
+ *
+ * 响应示例:
+ *   { "success": true, "data": { "userOnlineStatus": 2, "userId": "...", "nickname": "店长A" } }
+ */
+export async function getStaffOnlineStatus(req: Request, res: Response): Promise<void> {
+  try {
+    const guid = String(req.params.guid);
+
+    if (!guid) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少 guid 参数');
+      return;
+    }
+
+    const status = await checkStaffOnline(guid);
+    sendSuccess(res, status);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * POST /api/qiwei/staff/batch-status
+ *
+ * 批量查询人员在线状态。
+ *
+ * Body:
+ *   { "guids": ["guid1", "guid2"] }
+ */
+export async function batchGetStaffStatus(req: Request, res: Response): Promise<void> {
+  try {
+    const { guids } = req.body as { guids?: string[] };
+
+    if (!guids || !Array.isArray(guids) || guids.length === 0) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少 guids 参数(须为非空数组)');
+      return;
+    }
+
+    const results = await batchCheckOnline(guids);
+    sendSuccess(res, results);
+  } catch (error) {
+    throw error;
+  }
+}
+
+// ============================================================
+// 消息同步
+// ============================================================
+
+/**
+ * POST /api/qiwei/sync
+ *
+ * 触发历史消息同步(API-06 /msg/syncMsg)。
+ * 适用于手动补拉历史消息或定时任务触发。
+ *
+ * Body:
+ *   { "guid": "...", "msgSeq": 0, "limit": 50 }
+ *
+ * 响应:
+ *   { "success": true, "data": { "messages": [...], "hasMore": 1, "nextSeq": 12345 } }
+ */
+export async function triggerSync(req: Request, res: Response): Promise<void> {
+  try {
+    const { guid, msgSeq, limit } = req.body as {
+      guid?: string;
+      msgSeq?: number;
+      limit?: number;
+    };
+
+    if (!guid) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少 guid 参数');
+      return;
+    }
+
+    const result = await syncMessages({
+      guid,
+      msgSeq: msgSeq ?? 0,
+      limit: limit ?? 50,
+    });
+
+    sendSuccess(res, result);
+  } catch (error) {
+    throw error;
+  }
+}
+
+// ============================================================
+// Webhook 回调
+// ============================================================
+
+/**
+ * POST /api/qiwei/webhook
+ *
+ * 接收 QiWe 开放平台的 Webhook 推送(API-04 回调)。
+ * QiWe 在有新消息时会 POST 到本接口(需通过 API-03 提前注册 callbackUrl)。
+ *
+ * 处理流程:
+ *   1. 收到推送体 → 解析 data[] 中的消息
+ *   2. 过滤普通消息(cmd=15000)
+ *   3. 检测链接消息(msgType=13)→ 解析文档链接 → 登记台账
+ *   4. 返回 200(QiWe 要求快速响应,不可在此做耗时操作)
+ *
+ * 注意:此接口必须公网可达,且需在 QiWe 控制台通过 API-03 注册。
+ */
+export async function receiveWebhook(req: Request, res: Response): Promise<void> {
+  try {
+    const payload = req.body as {
+      code: number;
+      data: Array<{
+        cmd: number;
+        guid: string;
+        msgType: number;
+        fromRoomId: string;
+        msgData: Record<string, unknown>;
+        timestamp: number;
+      }>;
+      msg: string;
+    };
+
+    // 快速处理并在内存中完成(生产环境可改为异步队列)
+    const result = await processWebhook(payload);
+
+    // 返回成功(QiWe 要求在 5s 内响应 200)
+    sendSuccess(res, result);
+  } catch (error) {
+    // Webhook 处理失败也要返回 200(避免 QiWe 重试风暴)
+    console.error('[Webhook] 处理失败:', error);
+    sendSuccess(res, { processedCount: 0, docLinksFound: 0, error: '内部处理异常' });
+  }
+}
+
+// ============================================================
+// 群-文档台账
+// ============================================================
+
+/**
+ * GET /api/qiwei/room-docs
+ *
+ * 查询群-文档台账列表。
+ * 用于管理端查看哪些群已经关联了沟通记录文档。
+ *
+ * Query params:
+ *   roomId - 群 ID(可选,不传则返回全部)
+ */
+export async function listRoomDocs(req: Request, res: Response): Promise<void> {
+  try {
+    const { roomId } = req.query;
+
+    if (typeof roomId === 'string') {
+      const doc = getRoomDocByRoomId(roomId);
+      if (!doc) {
+        sendError(res, 404, 'NOT_FOUND', `群 ${roomId} 未找到绑定的沟通记录文档`);
+        return;
+      }
+      sendSuccess(res, doc);
+      return;
+    }
+
+    const docs = getRoomDocs();
+    sendSuccess(res, docs);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/qiwei/room-doc-anomalies
+ *
+ * 查询群-文档异常记录(多表异常等)。
+ */
+export async function listRoomDocAnomalies(_req: Request, res: Response): Promise<void> {
+  try {
+    const anomalies = getRoomDocAnomalies();
+    sendSuccess(res, anomalies);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * PUT /api/qiwei/room-doc-anomalies/:roomId/resolve
+ *
+ * 解决群-文档异常(人工确认后)。
+ *
+ * Body:
+ *   { "newDocId": "...", "resolution": "keep_new" | "keep_old" }
+ */
+export async function resolveAnomaly(req: Request, res: Response): Promise<void> {
+  try {
+    const roomId = String(req.params.roomId);
+    const { newDocId, resolution } = req.body as {
+      newDocId?: string;
+      resolution?: string;
+    };
+
+    if (!newDocId || !resolution) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少 newDocId 或 resolution 参数');
+      return;
+    }
+
+    resolveRoomDocAnomaly(roomId, newDocId, resolution);
+    sendSuccess(res, { roomId, status: 'resolved' });
+  } catch (error) {
+    throw error;
+  }
+}
+
+// ============================================================
+// 消息查询
+// ============================================================
+
+/**
+ * GET /api/qiwei/messages
+ *
+ * 查询已存储的群消息(来自 webhook 或 syncMsg)。
+ *
+ * Query params:
+ *   roomId - 群 ID(可选)
+ *   guid   - 人员 guid(可选)
+ *   limit  - 返回条数上限,默认 50
+ */
+export async function listMessages(req: Request, res: Response): Promise<void> {
+  try {
+    const { roomId, guid, limit } = req.query;
+    const messages = getMessages(
+      typeof roomId === 'string' ? roomId : undefined,
+      typeof guid === 'string' ? guid : undefined,
+      limit ? Number(limit) : 50,
+    );
+    sendSuccess(res, messages);
+  } catch (error) {
+    throw error;
+  }
+}

+ 147 - 0
backend/src/apps/pc/qiwei/models/qiwei.model.ts

@@ -0,0 +1,147 @@
+/**
+ * QiWe 模块 — 数据模型 / DTO 定义
+ *
+ * 定义了 QiWe API 代理、消息、群-文档台账等核心数据结构。
+ * 这些类型用于 controller 和 service 之间传递数据。
+ */
+
+// ============================================================
+// 人员账号相关
+// ============================================================
+
+/** 人员企微账号信息 */
+export interface StaffAccount {
+  /** 主键(本方系统自增) */
+  id: number;
+  /** 企微设备 GUID,用于标识一个登录实例 */
+  guid: string;
+  /** 人员姓名 */
+  name: string;
+  /** 角色:manager=店长, designer=设计师, operator=运营 */
+  role: 'manager' | 'designer' | 'operator';
+  /** 所属门店 ID */
+  storeId: number;
+  /** 账号状态:1=启用, 0=停用 */
+  status: number;
+  /** 创建时间 */
+  createdAt: string;
+  /** 更新时间 */
+  updatedAt: string;
+}
+
+/** 在线状态查询结果(来自 API-05 /login/checkLogin) */
+export interface StaffOnlineStatus {
+  guid: string;
+  /** 在线状态:1=在线, 2=离线 */
+  userOnlineStatus: number;
+  /** 企微用户 ID */
+  userId: string;
+  /** 昵称 */
+  nickname: string;
+  /** 企业名称 */
+  corpName: string;
+}
+
+// ============================================================
+// 消息相关
+// ============================================================
+
+/** 群消息记录 */
+export interface GroupMessage {
+  /** 主键 */
+  id: number;
+  /** 所属人员 guid */
+  guid: string;
+  /** 群 ID(fromRoomId) */
+  roomId: string;
+  /** 消息类型:13=链接消息, 0=文本消息 */
+  msgType: number;
+  /** 消息内容体(JSON) */
+  msgData: Record<string, unknown>;
+  /** 消息序号(用于去重和分页) */
+  seq: number;
+  /** 消息时间戳 */
+  timestamp: number;
+  /** 消息去重键 */
+  dedupKey: string;
+  /** 记录创建时间 */
+  createdAt: string;
+}
+
+/** 消息同步请求参数 */
+export interface SyncMsgParams {
+  guid: string;
+  /** 起始序号,0 表示从头开始 */
+  msgSeq: number;
+  /** 每次拉取条数上限 */
+  limit: number;
+}
+
+// ============================================================
+// 群-文档台账相关
+// ============================================================
+
+/** 群与沟通记录文档的绑定关系 */
+export interface RoomDoc {
+  /** 主键 */
+  id: number;
+  /** 群 ID */
+  roomId: string;
+  /** 群名称(冗余,方便展示) */
+  roomName: string;
+  /** 文档 ID(从链接中解析出的 docid) */
+  docId: string;
+  /** 文档原始链接 */
+  docUrl: string;
+  /** 发现该文档的人员 guid */
+  discoveredBy: string;
+  /** 首次发现时间 */
+  firstSeenAt: string;
+  /** 最近更新时间 */
+  updatedAt: string;
+}
+
+/** 一个群里出现多张表时的异常记录 */
+export interface RoomDocAnomaly {
+  /** 主键 */
+  id: number;
+  /** 群 ID */
+  roomId: string;
+  /** 异常类型:multi_doc=多张表 */
+  type: 'multi_doc';
+  /** 已有的 docId */
+  existingDocId: string;
+  /** 新发现的 docId */
+  newDocId: string;
+  /** 状态:pending=待处理, resolved=已解决 */
+  status: 'pending' | 'resolved';
+  /** 记录时间 */
+  createdAt: string;
+}
+
+// ============================================================
+// QiWe Webhook 回调相关
+// ============================================================
+
+/** Webhook 回调推送的消息体结构(API-04) */
+export interface WebhookPayload {
+  code: number;
+  data: WebhookDataItem[];
+  msg: string;
+}
+
+/** Webhook data 数组中的单条 */
+export interface WebhookDataItem {
+  /** 命令类型:15000=普通消息 */
+  cmd: number;
+  /** 设备 GUID */
+  guid: string;
+  /** 消息类型:0=文本, 13=链接 */
+  msgType: number;
+  /** 群 ID(私有聊天的 fromRoomId 为 0) */
+  fromRoomId: string;
+  /** 消息体数据 */
+  msgData: Record<string, unknown>;
+  /** 时间戳 */
+  timestamp: number;
+}

+ 55 - 0
backend/src/apps/pc/qiwei/routes/qiwei.routes.ts

@@ -0,0 +1,55 @@
+/**
+ * QiWe 模块 — 路由层
+ *
+ * 职责:定义 URL 与 controller 方法的映射关系,不包含业务逻辑。
+ *
+ * 路由前缀:/api(在 app.ts 中挂载)
+ *
+ * 接口一览:
+ *   POST   /api/qiwei/proxy                       通用 QiWe API 代理
+ *   GET    /api/qiwei/staff/:guid/status           查询人员在线状态
+ *   POST   /api/qiwei/staff/batch-status           批量查询在线状态
+ *   POST   /api/qiwei/sync                         触发消息同步
+ *   POST   /api/qiwei/webhook                      接收 QiWe Webhook 推送
+ *   GET    /api/qiwei/messages                     查询消息列表
+ *   GET    /api/qiwei/room-docs                    查询群-文档台账
+ *   GET    /api/qiwei/room-doc-anomalies           查询台账异常记录
+ *   PUT    /api/qiwei/room-doc-anomalies/:roomId/resolve  解决异常
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  proxyApi,
+  getStaffOnlineStatus,
+  batchGetStaffStatus,
+  triggerSync,
+  receiveWebhook,
+  listRoomDocs,
+  listRoomDocAnomalies,
+  resolveAnomaly,
+  listMessages,
+} from '../controllers/qiwei.controller.js';
+
+export const pcQiWeApiRouter: ExpressRouter = Router();
+
+// ---- QiWe 通用代理 ----
+pcQiWeApiRouter.post('/qiwei/proxy', proxyApi);
+
+// ---- 人员在线状态 ----
+pcQiWeApiRouter.get('/qiwei/staff/:guid/status', getStaffOnlineStatus);
+pcQiWeApiRouter.post('/qiwei/staff/batch-status', batchGetStaffStatus);
+
+// ---- 消息同步 ----
+pcQiWeApiRouter.post('/qiwei/sync', triggerSync);
+
+// ---- Webhook 回调 ----
+pcQiWeApiRouter.post('/qiwei/webhook', receiveWebhook);
+
+// ---- 消息查询 ----
+pcQiWeApiRouter.get('/qiwei/messages', listMessages);
+
+// ---- 群-文档台账 ----
+pcQiWeApiRouter.get('/qiwei/room-docs', listRoomDocs);
+pcQiWeApiRouter.get('/qiwei/room-doc-anomalies', listRoomDocAnomalies);
+pcQiWeApiRouter.put('/qiwei/room-doc-anomalies/:roomId/resolve', resolveAnomaly);

+ 381 - 0
backend/src/apps/pc/qiwei/services/qiwei.service.ts

@@ -0,0 +1,381 @@
+/**
+ * QiWe 模块 — 业务服务层
+ *
+ * 封装与 QiWe 开放平台交互的核心业务逻辑:
+ *   - 统一代理调用(将本方的 REST 请求转换为 QiWe doApi 调用)
+ *   - 消息同步(syncMsg)分页拉取
+ *   - Webhook 回调消息解析与处理
+ *   - 群-文档台账维护
+ *   - 链接消息中的 docid 识别与登记
+ *
+ * 依赖:
+ *   - shared/qiwei/client.ts(QiWe API 调用客户端)
+ *   - shared/utils/docid.ts(文档 ID 解析)
+ *
+ * 注意:
+ *   当前版本 DB 操作使用内存 Map 模拟(TODO: 替换为真实数据库)。
+ *   外部第三方接口调用在 service 层完成,controller 不直接访问外部系统。
+ */
+
+import { callQiWeApi } from '../../../../shared/qiwei/client.js';
+import { parseDocId, isWeixinDocUrl } from '../../../../shared/utils/docid.js';
+import type {
+  StaffOnlineStatus,
+  SyncMsgParams,
+  GroupMessage,
+  RoomDoc,
+  RoomDocAnomaly,
+  WebhookDataItem,
+} from '../models/qiwei.model.js';
+
+// ---------- 内存存储(TODO: 替换为 MySQL/PostgreSQL)----------
+const roomDocStore = new Map<string, RoomDoc>();
+const roomDocAnomalyStore = new Map<string, RoomDocAnomaly>();
+const messageStore = new Map<string, GroupMessage>();
+
+/** 消息序号持久化(用于 syncMsg 断点续传) */
+const msgSeqStore = new Map<string, number>();
+
+// ============================================================
+// 通用代理
+// ============================================================
+
+/**
+ * 通用 QiWe API 代理调用
+ *
+ * 将前端传来的 method + params 直接转发到 QiWe 开放平台。
+ * 适用场景:前端需要临时调用某个 QiWe 接口,后端不做额外处理。
+ *
+ * @param method - QiWe 接口路径,如 "/room/getRoomList"
+ * @param params - 接口参数
+ * @returns QiWe 返回的 data 字段
+ */
+export async function proxyQiWeCall(method: string, params: Record<string, unknown>): Promise<unknown> {
+  return callQiWeApi(method, params);
+}
+
+// ============================================================
+// 人员在线检测(API-05)
+// ============================================================
+
+/**
+ * 查询指定人员的企微在线状态
+ *
+ * 调用 QiWe API-05:/login/checkLogin
+ * 批量任务执行前应先调用此接口确认在线,避免空跑。
+ *
+ * @param guid - 人员设备 GUID
+ * @returns 在线状态信息
+ */
+export async function checkStaffOnline(guid: string): Promise<StaffOnlineStatus> {
+  // 调用 QiWe API-05 /login/checkLogin
+  const data = await callQiWeApi<StaffOnlineStatus>('/login/checkLogin', { guid });
+  return data;
+}
+
+/**
+ * 批量检查人员在线状态
+ *
+ * @param guids - 人员 guid 列表
+ * @returns 每个 guid 对应的在线状态列表
+ */
+export async function batchCheckOnline(guids: string[]): Promise<StaffOnlineStatus[]> {
+  const results: StaffOnlineStatus[] = [];
+  for (const guid of guids) {
+    try {
+      const status = await checkStaffOnline(guid);
+      results.push(status);
+    } catch {
+      // 单个查询失败不影响其他查询,记录离线状态
+      results.push({
+        guid,
+        userOnlineStatus: 2,
+        userId: '',
+        nickname: '',
+        corpName: '',
+      });
+    }
+  }
+  return results;
+}
+
+// ============================================================
+// 消息同步(API-06)
+// ============================================================
+
+/**
+ * 同步历史消息(分页拉取)
+ *
+ * 调用 QiWe API-06:/msg/syncMsg
+ * msgSeq 从上次断点开始逐步递增,直至 hasMore=0。
+ * 拉回的消息与 webhook 实时消息共用同一消息表。
+ *
+ * @param params - { guid, msgSeq, limit }
+ * @returns 同步到的消息列表
+ */
+export async function syncMessages(params: SyncMsgParams): Promise<{
+  messages: GroupMessage[];
+  hasMore: number;
+  nextSeq: number;
+}> {
+  const data = await callQiWeApi<{
+    hasMore: number;
+    travelSyncKey: number;
+    syncMsgList: Array<{
+      fromRoomId: string;
+      msgType: number;
+      msgData: Record<string, unknown>;
+      seq: number;
+      timestamp: number;
+    }>;
+  }>('/msg/syncMsg', {
+    guid: params.guid,
+    msgSeq: params.msgSeq,
+    limit: params.limit,
+  });
+
+  const messages: GroupMessage[] = [];
+
+  for (const raw of data.syncMsgList || []) {
+    // 构造消息去重键:guid + roomId + seq 组合唯一
+    const dedupKey = `${params.guid}_${raw.fromRoomId}_${raw.seq}`;
+
+    // 去重检查
+    if (messageStore.has(dedupKey)) continue;
+
+    const msg: GroupMessage = {
+      id: messageStore.size + 1,
+      guid: params.guid,
+      roomId: raw.fromRoomId,
+      msgType: raw.msgType,
+      msgData: raw.msgData,
+      seq: raw.seq,
+      timestamp: raw.timestamp,
+      dedupKey,
+      createdAt: new Date().toISOString(),
+    };
+
+    messageStore.set(dedupKey, msg);
+    messages.push(msg);
+  }
+
+  // 更新断点序号
+  msgSeqStore.set(params.guid, data.travelSyncKey);
+
+  return {
+    messages,
+    hasMore: data.hasMore,
+    nextSeq: data.travelSyncKey,
+  };
+}
+
+// ============================================================
+// Webhook 回调消息处理(API-04)
+// ============================================================
+
+/**
+ * 处理 QiWe Webhook 推送的消息
+ *
+ * QiWe POST 消息到 callbackUrl 后,此方法负责:
+ *   1. 解析推送体中的 data[] 数组
+ *   2. 过滤 cmd=15000(普通消息)
+ *   3. 写入消息存储
+ *   4. 检测链接消息(msgType=13)并触发 docid 解析 → 台账登记
+ *
+ * @param payload - Webhook 推送的完整 JSON body
+ * @returns 处理的消息条数和发现的文档链接数
+ */
+export async function processWebhook(payload: { code: number; data: WebhookDataItem[]; msg: string }): Promise<{
+  processedCount: number;
+  docLinksFound: number;
+}> {
+  let processedCount = 0;
+  let docLinksFound = 0;
+
+  for (const item of payload.data || []) {
+    // 只处理普通消息(cmd=15000)
+    if (item.cmd !== 15000) continue;
+
+    // 构造去重键
+    const dedupKey = `${item.guid}_${item.fromRoomId}_${item.timestamp}`;
+    if (messageStore.has(dedupKey)) continue;
+
+    const msg: GroupMessage = {
+      id: messageStore.size + 1,
+      guid: item.guid,
+      roomId: item.fromRoomId || '',
+      msgType: item.msgType,
+      msgData: item.msgData,
+      seq: 0, // webhook 消息无 seq,用 0 占位
+      timestamp: item.timestamp,
+      dedupKey,
+      createdAt: new Date().toISOString(),
+    };
+
+    messageStore.set(dedupKey, msg);
+    processedCount++;
+
+    // ---- 检测链接消息(msgType=13)并尝试提取文档 ID ----
+    if (item.msgType === 13 && item.msgData.linkUrl) {
+      const linkUrl = String(item.msgData.linkUrl);
+      if (isWeixinDocUrl(linkUrl)) {
+        const docId = parseDocId(linkUrl);
+        if (docId) {
+          registerRoomDoc(item.fromRoomId, '', linkUrl, docId, item.guid);
+          docLinksFound++;
+        } else {
+          // 链接异常:疑似文档链接但无法解析 docid → 记录异常
+          recordLinkAnomaly(item.fromRoomId, linkUrl);
+        }
+      }
+    }
+  }
+
+  return { processedCount, docLinksFound };
+}
+
+// ============================================================
+// 群-文档台账管理
+// ============================================================
+
+/**
+ * 登记群与文档的绑定关系
+ *
+ * 一个群只允许对应一张表(唯一 docid)。若发现新 docid 与已有不同,
+ * 则触发"多表异常"记录,由人工确认。
+ *
+ * @param roomId      - 群 ID
+ * @param roomName    - 群名称(冗余)
+ * @param docUrl      - 文档完整 URL
+ * @param docId       - 解析出的文档 ID
+ * @param discoveredBy - 发现人 guid
+ */
+export function registerRoomDoc(
+  roomId: string,
+  roomName: string,
+  docUrl: string,
+  docId: string,
+  discoveredBy: string,
+): RoomDoc {
+  const existing = roomDocStore.get(roomId);
+
+  // 已有记录且 docId 相同 → 更新 URL 和时间
+  if (existing && existing.docId === docId) {
+    existing.docUrl = docUrl;
+    existing.updatedAt = new Date().toISOString();
+    roomDocStore.set(roomId, existing);
+    return existing;
+  }
+
+  // 已有记录但 docId 不同 → 多表异常
+  if (existing && existing.docId !== docId) {
+    const anomaly: RoomDocAnomaly = {
+      id: roomDocAnomalyStore.size + 1,
+      roomId,
+      type: 'multi_doc',
+      existingDocId: existing.docId,
+      newDocId: docId,
+      status: 'pending',
+      createdAt: new Date().toISOString(),
+    };
+    roomDocAnomalyStore.set(`${roomId}_${docId}`, anomaly);
+  }
+
+  // 新建台账记录
+  const now = new Date().toISOString();
+  const record: RoomDoc = {
+    id: roomDocStore.size + 1,
+    roomId,
+    roomName,
+    docId,
+    docUrl,
+    discoveredBy,
+    firstSeenAt: existing ? existing.firstSeenAt : now,
+    updatedAt: now,
+  };
+
+  roomDocStore.set(roomId, record);
+  return record;
+}
+
+/**
+ * 查询群-文档台账列表
+ */
+export function getRoomDocs(): RoomDoc[] {
+  return Array.from(roomDocStore.values());
+}
+
+/**
+ * 按 roomId 查询台账记录
+ */
+export function getRoomDocByRoomId(roomId: string): RoomDoc | undefined {
+  return roomDocStore.get(roomId);
+}
+
+/**
+ * 记录链接解析异常(疑似文档链接但无法提取 docid)
+ */
+function recordLinkAnomaly(roomId: string, linkUrl: string): void {
+  console.warn(`[QiWe] 链接异常:roomId=${roomId}, url=${linkUrl}`);
+  // TODO: 写入 link_anomaly 表,通知运营人工核对
+}
+
+/**
+ * 查询所有群-文档异常记录
+ */
+export function getRoomDocAnomalies(): RoomDocAnomaly[] {
+  return Array.from(roomDocAnomalyStore.values());
+}
+
+/**
+ * 解决异常(人工确认后)
+ */
+export function resolveRoomDocAnomaly(roomId: string, newDocId: string, resolution: string): void {
+  const key = `${roomId}_${newDocId}`;
+  const anomaly = roomDocAnomalyStore.get(key);
+  if (anomaly) {
+    anomaly.status = 'resolved';
+    roomDocAnomalyStore.set(key, anomaly);
+  }
+
+  // 根据人工决定更新台账
+  if (resolution === 'keep_new') {
+    const existing = roomDocStore.get(roomId);
+    if (existing) {
+      existing.docId = newDocId;
+      existing.updatedAt = new Date().toISOString();
+      roomDocStore.set(roomId, existing);
+    }
+  }
+}
+
+// ============================================================
+// 消息查询
+// ============================================================
+
+/**
+ * 查询消息列表(按群、时间范围过滤)
+ *
+ * @param roomId  - 群 ID(可选)
+ * @param guid    - 人员 guid(可选)
+ * @param limit   - 返回条数
+ * @returns 消息列表
+ */
+export function getMessages(
+  roomId?: string,
+  guid?: string,
+  limit = 50,
+): GroupMessage[] {
+  let all = Array.from(messageStore.values());
+
+  if (roomId) {
+    all = all.filter((m) => m.roomId === roomId);
+  }
+  if (guid) {
+    all = all.filter((m) => m.guid === guid);
+  }
+
+  // 按时间倒序
+  all.sort((a, b) => b.timestamp - a.timestamp);
+  return all.slice(0, limit);
+}

+ 170 - 0
backend/src/apps/pc/risk/controllers/risk.controller.ts

@@ -0,0 +1,170 @@
+/**
+ * 群风控与异常干预模块 — 控制器层
+ *
+ * 对应规范文档 §八「模块 5:群风控与异常干预模块」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  createKeyword,
+  listKeywords,
+  updateKeyword,
+  deleteKeyword,
+  scanMessageForKeywords,
+  listAlerts,
+  handleAlert,
+  listWorkOrders,
+  updateWorkOrder,
+} from '../services/risk.service.js';
+import type { AlertType, WorkOrderStatus } from '../models/risk.model.js';
+
+// ============================================================
+// 风险关键词
+// ============================================================
+
+/** POST /api/risk/keywords — 创建关键词 */
+export async function createKw(req: Request, res: Response): Promise<void> {
+  try {
+    const { keyword, category, severity } = req.body;
+    if (!keyword || !category || !severity) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:keyword, category, severity');
+      return;
+    }
+    const kw = createKeyword({ ...req.body, enabled: req.body.enabled ?? 1, remark: req.body.remark || '' });
+    sendSuccess(res, kw, 201);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/risk/keywords — 查询关键词列表 */
+export async function listKw(req: Request, res: Response): Promise<void> {
+  try {
+    const { category, enabled } = req.query;
+    const keywords = listKeywords(
+      typeof category === 'string' ? category : undefined,
+      enabled !== undefined ? Number(enabled) : undefined,
+    );
+    sendSuccess(res, keywords);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** PUT /api/risk/keywords/:id — 更新关键词 */
+export async function updateKw(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const kw = updateKeyword(id, req.body);
+    sendSuccess(res, kw);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** DELETE /api/risk/keywords/:id — 删除关键词 */
+export async function deleteKw(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    deleteKeyword(id);
+    sendSuccess(res, { deleted: true });
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** POST /api/risk/keywords/scan — 扫描消息内容匹配关键词 */
+export async function scanContent(req: Request, res: Response): Promise<void> {
+  try {
+    const { content, roomId, messageId } = req.body as {
+      content?: string;
+      roomId?: string;
+      messageId?: number;
+    };
+    if (!content || !roomId) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:content, roomId');
+      return;
+    }
+    const alerts = scanMessageForKeywords(content, roomId, messageId || 0);
+    sendSuccess(res, { alerts, hitCount: alerts.length });
+  } catch (error) {
+    throw error;
+  }
+}
+
+// ============================================================
+// 预警管理
+// ============================================================
+
+/** GET /api/risk/alerts — 查询预警列表 */
+export async function listAlertList(req: Request, res: Response): Promise<void> {
+  try {
+    const { roomId, type, status } = req.query;
+    const alerts = listAlerts(
+      typeof roomId === 'string' ? roomId : undefined,
+      type as AlertType | undefined,
+      status as 'open' | 'handled' | 'ignored' | undefined,
+    );
+    sendSuccess(res, alerts);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** PUT /api/risk/alerts/:id — 处理预警 */
+export async function handleAlertById(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const { status, handlerId, note } = req.body as {
+      status?: string;
+      handlerId?: number;
+      note?: string;
+    };
+    if (!status || !handlerId) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:status, handlerId');
+      return;
+    }
+    const alert = handleAlert(id, status as 'handled' | 'ignored', handlerId, note || '');
+    sendSuccess(res, alert);
+  } catch (error) {
+    throw error;
+  }
+}
+
+// ============================================================
+// 工单管理
+// ============================================================
+
+/** GET /api/risk/work-orders — 查询工单列表 */
+export async function listOrderList(req: Request, res: Response): Promise<void> {
+  try {
+    const { status, assigneeId } = req.query;
+    const orders = listWorkOrders(
+      status as WorkOrderStatus | undefined,
+      assigneeId ? Number(assigneeId) : undefined,
+    );
+    sendSuccess(res, orders);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** PUT /api/risk/work-orders/:id — 更新工单状态 */
+export async function updateOrder(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    const { status, handleRecord } = req.body as {
+      status?: WorkOrderStatus;
+      handleRecord?: string;
+    };
+    if (!status) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少 status 参数');
+      return;
+    }
+    const order = updateWorkOrder(id, status, handleRecord);
+    sendSuccess(res, order);
+  } catch (error) {
+    throw error;
+  }
+}

+ 91 - 0
backend/src/apps/pc/risk/models/risk.model.ts

@@ -0,0 +1,91 @@
+/**
+ * 群风控与异常干预模块 — 数据模型定义
+ *
+ * 对应规范文档 §八「模块 5:群风控与异常干预模块」
+ *
+ * 核心表:
+ *   - risk_keyword    :风险关键词库
+ *   - alert           :预警记录(命中敏感词、阈值异常等)
+ *   - work_order      :干预工单(预警自动生成)
+ *   - kb_case         :异常处理案例知识库(二期)
+ */
+
+/** 风险关键词 */
+export interface RiskKeyword {
+  /** 主键 */
+  id: number;
+  /** 关键词 */
+  keyword: string;
+  /** 分类:price=价格敏感, competitor=竞品, complaint=投诉, custom=自定义 */
+  category: 'price' | 'competitor' | 'complaint' | 'custom';
+  /** 严重程度:1=低, 2=中, 3=高 */
+  severity: 1 | 2 | 3;
+  /** 状态:1=启用, 0=停用 */
+  enabled: number;
+  /** 备注 */
+  remark: string;
+  /** 创建时间 */
+  createdAt: string;
+}
+
+/** 预警类型 */
+export type AlertType = 'keyword' | 'threshold' | 'abnormal';
+
+/** 预警记录 */
+export interface Alert {
+  /** 主键 */
+  id: number;
+  /** 群 ID */
+  roomId: string;
+  /** 预警类型 */
+  type: AlertType;
+  /** 预警等级:1=信息, 2=警告, 3=严重 */
+  level: 1 | 2 | 3;
+  /** 预警标题 */
+  title: string;
+  /** 详细描述 */
+  description: string;
+  /** 匹配到的关键词(keyword 类型时) */
+  matchedKeyword: string;
+  /** 关联的消息 ID */
+  messageId: number;
+  /** 状态:open=待处理, handled=已处理, ignored=已忽略 */
+  status: 'open' | 'handled' | 'ignored';
+  /** 处理人 ID */
+  handlerId: number;
+  /** 处理备注 */
+  handleNote: string;
+  /** 关联的工单 ID */
+  workOrderId: number;
+  /** 创建时间 */
+  createdAt: string;
+  /** 处理时间 */
+  handledAt: string;
+}
+
+/** 工单状态 */
+export type WorkOrderStatus = 'pending' | 'in_progress' | 'completed' | 'cancelled';
+
+/** 干预工单 */
+export interface WorkOrder {
+  /** 主键 */
+  id: number;
+  /** 关联预警 ID */
+  alertId: number;
+  /** 工单标题 */
+  title: string;
+  /** 工单描述 */
+  description: string;
+  /** 指派负责人 ID */
+  assigneeId: number;
+  /** 截止时间 */
+  deadline: string;
+  /** 状态 */
+  status: WorkOrderStatus;
+  /** 处理记录 */
+  handleRecord: string;
+  /** 创建时间 */
+  createdAt: string;
+  /** 完成时间 */
+  completedAt: string;
+}

+ 42 - 0
backend/src/apps/pc/risk/routes/risk.routes.ts

@@ -0,0 +1,42 @@
+/**
+ * 群风控模块 — 路由层
+ *
+ * 接口一览:
+ *   关键词:
+ *     POST   /api/risk/keywords          创建关键词
+ *     GET    /api/risk/keywords          查询关键词列表
+ *     POST   /api/risk/keywords/scan     扫描消息内容匹配关键词
+ *     PUT    /api/risk/keywords/:id      更新关键词
+ *     DELETE /api/risk/keywords/:id      删除关键词
+ *   预警:
+ *     GET    /api/risk/alerts            查询预警列表
+ *     PUT    /api/risk/alerts/:id        处理预警
+ *   工单:
+ *     GET    /api/risk/work-orders       查询工单列表
+ *     PUT    /api/risk/work-orders/:id   更新工单状态
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  createKw, listKw, updateKw, deleteKw, scanContent,
+  listAlertList, handleAlertById,
+  listOrderList, updateOrder,
+} from '../controllers/risk.controller.js';
+
+export const pcRiskApiRouter: ExpressRouter = Router();
+
+// 关键词
+pcRiskApiRouter.post('/risk/keywords', createKw);
+pcRiskApiRouter.get('/risk/keywords', listKw);
+pcRiskApiRouter.post('/risk/keywords/scan', scanContent);
+pcRiskApiRouter.put('/risk/keywords/:id', updateKw);
+pcRiskApiRouter.delete('/risk/keywords/:id', deleteKw);
+
+// 预警
+pcRiskApiRouter.get('/risk/alerts', listAlertList);
+pcRiskApiRouter.put('/risk/alerts/:id', handleAlertById);
+
+// 工单
+pcRiskApiRouter.get('/risk/work-orders', listOrderList);
+pcRiskApiRouter.put('/risk/work-orders/:id', updateOrder);

+ 247 - 0
backend/src/apps/pc/risk/services/risk.service.ts

@@ -0,0 +1,247 @@
+/**
+ * 群风控与异常干预模块 — 业务服务层
+ *
+ * 对应规范文档 §八「模块 5:群风控与异常干预模块」
+ *
+ * 业务流程:
+ *   §8.1 实时监听群消息:由 qiwei 模块的 webhook 消费者完成
+ *   §8.2 风险关键词库配置:CRUD 管理风险词
+ *   §8.3 命中敏感词自动预警:消息内容与词库匹配 → 生成 alert
+ *   §8.4 人数骤降等阈值异常:统计退群事件、零互动天数 → 生成 alert
+ *   §8.5 异常提醒到企微:通过 API-14 发送
+ *   §8.6 预警自动生成干预工单:alert 创建时联动生成 work_order
+ *   §8.7 工单处理与关闭:更新处理记录 → 计时统计响应时长
+ *   §8.8 异常处理案例知识库:已关闭工单归档为 kb_case(二期)
+ */
+
+import { AppError } from '../../../../shared/errors/app-error.js';
+import type {
+  RiskKeyword,
+  Alert,
+  AlertType,
+  WorkOrder,
+  WorkOrderStatus,
+} from '../models/risk.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const keywordStore = new Map<number, RiskKeyword>();
+const alertStore = new Map<number, Alert>();
+const workOrderStore = new Map<number, WorkOrder>();
+let nextKeywordId = 1;
+let nextAlertId = 1;
+let nextWorkOrderId = 1;
+
+// ============================================================
+// 风险关键词库(§8.2)
+// ============================================================
+
+/** 创建关键词 */
+export function createKeyword(data: Omit<RiskKeyword, 'id' | 'createdAt'>): RiskKeyword {
+  const kw: RiskKeyword = {
+    id: nextKeywordId++,
+    ...data,
+    createdAt: new Date().toISOString(),
+  };
+  keywordStore.set(kw.id, kw);
+  return kw;
+}
+
+/** 查询关键词列表 */
+export function listKeywords(category?: string, enabled?: number): RiskKeyword[] {
+  let result = Array.from(keywordStore.values());
+  if (category) result = result.filter((k) => k.category === category);
+  if (enabled !== undefined) result = result.filter((k) => k.enabled === enabled);
+  return result;
+}
+
+/** 更新关键词 */
+export function updateKeyword(id: number, data: Partial<RiskKeyword>): RiskKeyword {
+  const kw = keywordStore.get(id);
+  if (!kw) throw new AppError(404, 'KEYWORD_NOT_FOUND', `关键词 ID=${id} 不存在`);
+  Object.assign(kw, data);
+  keywordStore.set(id, kw);
+  return kw;
+}
+
+/** 删除关键词 */
+export function deleteKeyword(id: number): void {
+  if (!keywordStore.has(id)) throw new AppError(404, 'KEYWORD_NOT_FOUND', `关键词 ID=${id} 不存在`);
+  keywordStore.delete(id);
+}
+
+/**
+ * 扫描消息内容,匹配风险关键词
+ *
+ * 实际生产环境在 webhook 消费者中对每条消息实时执行。
+ *
+ * @param content  - 消息文本内容
+ * @param roomId   - 群 ID
+ * @param messageId - 消息 ID
+ * @returns 命中的预警列表(如无命中则返回空数组)
+ */
+export function scanMessageForKeywords(
+  content: string,
+  roomId: string,
+  messageId: number,
+): Alert[] {
+  const alerts: Alert[] = [];
+  const activeKeywords = listKeywords(undefined, 1);
+
+  for (const kw of activeKeywords) {
+    if (content.includes(kw.keyword)) {
+      const alert = createAlert({
+        roomId,
+        type: 'keyword',
+        level: kw.severity,
+        title: `命中风险关键词"${kw.keyword}"`,
+        description: `群 ${roomId} 的消息命中风险关键词"${kw.keyword}"(分类:${kw.category})`,
+        matchedKeyword: kw.keyword,
+        messageId,
+      });
+      alerts.push(alert);
+    }
+  }
+
+  return alerts;
+}
+
+// ============================================================
+// 预警管理(§8.3 ~ §8.5)
+// ============================================================
+
+interface CreateAlertParams {
+  roomId: string;
+  type: AlertType;
+  level: 1 | 2 | 3;
+  title: string;
+  description: string;
+  matchedKeyword?: string;
+  messageId?: number;
+}
+
+/** 创建预警记录 */
+export function createAlert(params: CreateAlertParams): Alert {
+  const now = new Date().toISOString();
+  const alert: Alert = {
+    id: nextAlertId++,
+    roomId: params.roomId,
+    type: params.type,
+    level: params.level,
+    title: params.title,
+    description: params.description,
+    matchedKeyword: params.matchedKeyword || '',
+    messageId: params.messageId || 0,
+    status: 'open',
+    handlerId: 0,
+    handleNote: '',
+    workOrderId: 0,
+    createdAt: now,
+    handledAt: '',
+  };
+
+  alertStore.set(alert.id, alert);
+
+  // ---- §8.6:高危预警自动生成干预工单 ----
+  if (params.level >= 3) {
+    const order = createWorkOrder({
+      alertId: alert.id,
+      title: `【自动】${params.title}`,
+      description: params.description,
+      assigneeId: 0, // 待分配
+    });
+    alert.workOrderId = order.id;
+    alertStore.set(alert.id, alert);
+  }
+
+  return alert;
+}
+
+/** 查询预警列表 */
+export function listAlerts(
+  roomId?: string,
+  type?: AlertType,
+  status?: 'open' | 'handled' | 'ignored',
+): Alert[] {
+  let result = Array.from(alertStore.values());
+  if (roomId) result = result.filter((a) => a.roomId === roomId);
+  if (type) result = result.filter((a) => a.type === type);
+  if (status) result = result.filter((a) => a.status === status);
+  return result.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
+}
+
+/** 处理预警 */
+export function handleAlert(
+  id: number,
+  status: 'handled' | 'ignored',
+  handlerId: number,
+  note: string,
+): Alert {
+  const alert = alertStore.get(id);
+  if (!alert) throw new AppError(404, 'ALERT_NOT_FOUND', `预警 ID=${id} 不存在`);
+
+  alert.status = status;
+  alert.handlerId = handlerId;
+  alert.handleNote = note;
+  alert.handledAt = new Date().toISOString();
+  alertStore.set(id, alert);
+  return alert;
+}
+
+// ============================================================
+// 干预工单(§8.6 ~ §8.7)
+// ============================================================
+
+interface CreateWorkOrderParams {
+  alertId: number;
+  title: string;
+  description: string;
+  assigneeId: number;
+  deadline?: string;
+}
+
+/** 创建工单 */
+export function createWorkOrder(params: CreateWorkOrderParams): WorkOrder {
+  const now = new Date().toISOString();
+  // 默认截止时间为 24h 后
+  const deadline = params.deadline || new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString();
+
+  const order: WorkOrder = {
+    id: nextWorkOrderId++,
+    alertId: params.alertId,
+    title: params.title,
+    description: params.description,
+    assigneeId: params.assigneeId,
+    deadline,
+    status: 'pending',
+    handleRecord: '',
+    createdAt: now,
+    completedAt: '',
+  };
+
+  workOrderStore.set(order.id, order);
+  return order;
+}
+
+/** 查询工单列表 */
+export function listWorkOrders(status?: WorkOrderStatus, assigneeId?: number): WorkOrder[] {
+  let result = Array.from(workOrderStore.values());
+  if (status) result = result.filter((o) => o.status === status);
+  if (assigneeId !== undefined) result = result.filter((o) => o.assigneeId === assigneeId);
+  return result.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
+}
+
+/** 更新工单状态 */
+export function updateWorkOrder(
+  id: number,
+  status: WorkOrderStatus,
+  handleRecord?: string,
+): WorkOrder {
+  const order = workOrderStore.get(id);
+  if (!order) throw new AppError(404, 'WORK_ORDER_NOT_FOUND', `工单 ID=${id} 不存在`);
+
+  order.status = status;
+  if (handleRecord) order.handleRecord = handleRecord;
+  if (status === 'completed') order.completedAt = new Date().toISOString();
+  workOrderStore.set(id, order);
+  return order;
+}

+ 175 - 0
backend/src/apps/pc/room/controllers/room.controller.ts

@@ -0,0 +1,175 @@
+/**
+ * 群管理模块 — 控制器层
+ *
+ * 对应功能:
+ *   §5.1「新建或登记外部客户群」
+ *   §5.2「自动拉取企微客户群名单」
+ *   §5.3「自动查看群名与群人数」
+ *   §5.4「自动发现进群与退群」
+ *   §5.7「群健康度评估」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  syncRooms,
+  listRooms,
+  getRoomByRoomId,
+  syncMemberEvents,
+  listMemberEvents,
+  evaluateRoomHealth,
+  evaluateAllRoomsHealth,
+  getRoomHealth,
+} from '../services/room.service.js';
+
+// ============================================================
+// 群列表与详情
+// ============================================================
+
+/**
+ * GET /api/rooms
+ *
+ * 查询本方群列表(从本地存储读取)。
+ *
+ * Query params:
+ *   roomType - 群类型筛选:external=外部客户群, internal=内部群(可选)
+ */
+export async function list(req: Request, res: Response): Promise<void> {
+  try {
+    const { roomType } = req.query;
+    const rooms = listRooms(typeof roomType === 'string' ? roomType as 'external' | 'internal' : undefined);
+    sendSuccess(res, rooms);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/rooms/:roomId
+ *
+ * 查询单个群详情。
+ */
+export async function getById(req: Request, res: Response): Promise<void> {
+  try {
+    const roomId = String(req.params.roomId);
+    const room = getRoomByRoomId(roomId);
+    sendSuccess(res, room);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * POST /api/rooms/sync
+ *
+ * 触发群列表同步(调用 API-07 + API-08 从 QiWe 拉取最新数据)。
+ *
+ * Body:
+ *   { "guid": "...", "nextStartIndex": 0 }
+ */
+export async function sync(req: Request, res: Response): Promise<void> {
+  try {
+    const { guid, nextStartIndex } = req.body as {
+      guid?: string;
+      nextStartIndex?: number;
+    };
+
+    if (!guid) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少 guid 参数');
+      return;
+    }
+
+    const result = await syncRooms({ guid, nextStartIndex: nextStartIndex ?? 0 });
+    sendSuccess(res, result);
+  } catch (error) {
+    throw error;
+  }
+}
+
+// ============================================================
+// 进退群事件
+// ============================================================
+
+/**
+ * POST /api/rooms/member-events/sync
+ *
+ * 同步群成员变动事件(调用 API-09)。
+ *
+ * Body:
+ *   { "guid": "...", "roomId": "...", "startTime": 1708300000, "endTime": 1708400000 }
+ */
+export async function syncEvents(req: Request, res: Response): Promise<void> {
+  try {
+    const { guid, roomId, startTime, endTime } = req.body as {
+      guid?: string;
+      roomId?: string;
+      startTime?: number;
+      endTime?: number;
+    };
+
+    if (!guid || !roomId || !startTime || !endTime) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:guid, roomId, startTime, endTime');
+      return;
+    }
+
+    const events = await syncMemberEvents(guid, roomId, startTime, endTime);
+    sendSuccess(res, events);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/rooms/member-events
+ *
+ * 查询进退群事件列表(本地存储)。
+ *
+ * Query params:
+ *   roomId    - 群 ID(可选)
+ *   eventType - 事件类型:join / leave(可选)
+ */
+export async function listEvents(req: Request, res: Response): Promise<void> {
+  try {
+    const { roomId, eventType } = req.query;
+    const events = listMemberEvents(
+      typeof roomId === 'string' ? roomId : undefined,
+      typeof eventType === 'string' ? eventType as 'join' | 'leave' : undefined,
+    );
+    sendSuccess(res, events);
+  } catch (error) {
+    throw error;
+  }
+}
+
+// ============================================================
+// 群健康度
+// ============================================================
+
+/**
+ * GET /api/rooms/health
+ *
+ * 查询所有群的健康度评分。
+ */
+export async function allHealth(_req: Request, res: Response): Promise<void> {
+  try {
+    const results = evaluateAllRoomsHealth();
+    sendSuccess(res, results);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/rooms/:roomId/health
+ *
+ * 查询单个群的健康度评分。
+ */
+export async function roomHealth(req: Request, res: Response): Promise<void> {
+  try {
+    const roomId = String(req.params.roomId);
+    const health = getRoomHealth(roomId);
+    sendSuccess(res, health);
+  } catch (error) {
+    throw error;
+  }
+}

+ 77 - 0
backend/src/apps/pc/room/models/room.model.ts

@@ -0,0 +1,77 @@
+/**
+ * 群管理模块 — 数据模型定义
+ *
+ * 对应规范文档:
+ *   §5.1「新建或登记外部客户群」
+ *   §5.2「自动拉取企微客户群名单」
+ *   §5.3「自动查看群名与群人数」
+ *   §5.4「自动发现进群与退群」
+ *   §5.7「群健康度评估」
+ */
+
+/** 客户群信息 */
+export interface Room {
+  /** 主键 */
+  id: number;
+  /** 企微群 ID(来自 QiWe API) */
+  roomId: string;
+  /** 群名称 */
+  roomName: string;
+  /** 群成员数量 */
+  memberCount: number;
+  /** 群公告 */
+  announcement: string;
+  /** 群主 guid */
+  ownerGuid: string;
+  /** 群类型:external=外部客户群, internal=内部群 */
+  roomType: 'external' | 'internal';
+  /** 首次发现时间(系统首次同步到该群的时间) */
+  firstSeenAt: string;
+  /** 最近群详情更新时间 */
+  lastSyncAt: string;
+  /** 创建时间 */
+  createdAt: string;
+}
+
+/** 群成员变动事件 */
+export interface RoomMemberEvent {
+  /** 主键 */
+  id: number;
+  /** 群 ID */
+  roomId: string;
+  /** 成员标识 */
+  userId: string;
+  /** 事件类型:join=进群, leave=退群 */
+  eventType: 'join' | 'leave';
+  /** 发生时间 */
+  eventTime: string;
+  /** 记录创建时间 */
+  createdAt: string;
+}
+
+/** 群健康度评估结果 */
+export interface RoomHealth {
+  /** 群 ID */
+  roomId: string;
+  /** 群名称 */
+  roomName: string;
+  /** 健康度得分(0-100),越高越健康 */
+  healthScore: number;
+  /** 7 天内消息数 */
+  messageCount7d: number;
+  /** 24h 内退群人数 */
+  leaveCount24h: number;
+  /** 群成员变化趋势:stable=稳定, growing=增长, shrinking=流失 */
+  memberTrend: 'stable' | 'growing' | 'shrinking';
+  /** 上次评估时间 */
+  evaluatedAt: string;
+  /** 评估详情说明 */
+  detail: string;
+}
+
+/** 同步群列表的请求参数 */
+export interface SyncRoomsParams {
+  guid: string;
+  /** 分页起始索引 */
+  nextStartIndex: number;
+}

+ 34 - 0
backend/src/apps/pc/room/routes/room.routes.ts

@@ -0,0 +1,34 @@
+/**
+ * 群管理模块 — 路由层
+ *
+ * 接口一览:
+ *   GET    /api/rooms                      查询群列表
+ *   GET    /api/rooms/health               查询所有群健康度
+ *   POST   /api/rooms/sync                 同步群列表
+ *   POST   /api/rooms/member-events/sync   同步进退群事件
+ *   GET    /api/rooms/member-events        查询进退群事件
+ *   GET    /api/rooms/:roomId              查询群详情
+ *   GET    /api/rooms/:roomId/health       查询群健康度
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  list,
+  getById,
+  sync,
+  syncEvents,
+  listEvents,
+  allHealth,
+  roomHealth,
+} from '../controllers/room.controller.js';
+
+export const pcRoomApiRouter: ExpressRouter = Router();
+
+pcRoomApiRouter.get('/rooms', list);
+pcRoomApiRouter.get('/rooms/health', allHealth);
+pcRoomApiRouter.post('/rooms/sync', sync);
+pcRoomApiRouter.post('/rooms/member-events/sync', syncEvents);
+pcRoomApiRouter.get('/rooms/member-events', listEvents);
+pcRoomApiRouter.get('/rooms/:roomId', getById);
+pcRoomApiRouter.get('/rooms/:roomId/health', roomHealth);

+ 322 - 0
backend/src/apps/pc/room/services/room.service.ts

@@ -0,0 +1,322 @@
+/**
+ * 群管理模块 — 业务服务层
+ *
+ * 对应规范文档:
+ *   §5.1「新建或登记外部客户群」
+ *   §5.2「自动拉取企微客户群名单」
+ *   §5.3「自动查看群名与群人数」
+ *   §5.4「自动发现进群与退群」
+ *   §5.7「群健康度评估」
+ *
+ * 业务流程:
+ *   1. 定时任务:对每个在线 guid 分页调 API-07 拉群列表 → 更新 room 表
+ *   2. 对新增/变更群,分批调 API-08 获取详情(群名、人数、公告)
+ *   3. 调 API-09 获取进退群事件 → 写入 room_member_event 表
+ *   4. 基于消息表 + 进退群事件计算健康度评分
+ */
+
+import { AppError } from '../../../../shared/errors/app-error.js';
+import { callQiWeApi } from '../../../../shared/qiwei/client.js';
+import type {
+  Room,
+  RoomMemberEvent,
+  RoomHealth,
+  SyncRoomsParams,
+} from '../models/room.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const roomStore = new Map<string, Room>();       // key = roomId
+const memberEventStore = new Map<number, RoomMemberEvent>();
+const healthStore = new Map<string, RoomHealth>(); // key = roomId
+let nextEventId = 1;
+
+// ============================================================
+// 群列表同步(API-07 + API-08)
+// ============================================================
+
+/**
+ * 同步群列表(分页拉取)
+ *
+ * 步骤:
+ *  1. 调用 API-07 /room/getRoomList 分页拉群列表
+ *  2. 提取 roomId 列表
+ *  3. 调用 API-08 /room/batchGetRoomDetail 批量获取群详情
+ *  4. Upsert 到本方 room 表
+ *
+ * @param params - { guid, nextStartIndex }
+ * @returns 同步结果(新增/更新的群列表、分页信息)
+ */
+export async function syncRooms(params: SyncRoomsParams): Promise<{
+  rooms: Room[];
+  hasMore: string;
+  nextStartIndex: string;
+  roomCount: number;
+}> {
+  // 步骤 1:拉群列表(API-07)
+  const listData = await callQiWeApi<{
+    hasMore: string;
+    nextStartIndex: string;
+    roomCount: number;
+    roomList: Array<{
+      roomId: string;
+      roomName: string;
+      roomMemberCount: number;
+    }>;
+  }>('/room/getRoomList', {
+    guid: params.guid,
+    nextStartIndex: params.nextStartIndex,
+  });
+
+  const roomIds = (listData.roomList || []).map((r) => r.roomId);
+
+  if (roomIds.length === 0) {
+    return {
+      rooms: [],
+      hasMore: listData.hasMore,
+      nextStartIndex: listData.nextStartIndex,
+      roomCount: listData.roomCount,
+    };
+  }
+
+  // 步骤 2:批量查群详情(API-08)
+  const detailData = await callQiWeApi<{
+    roomList: Array<{
+      roomId: string;
+      roomName: string;
+      roomAnnouncement: string;
+      memberList: Array<Record<string, unknown>>;
+    }>;
+  }>('/room/batchGetRoomDetail', {
+    guid: params.guid,
+    roomIdList: roomIds,
+  });
+
+  // 步骤 3:Upsert 到本方存储
+  const now = new Date().toISOString();
+  const rooms: Room[] = [];
+
+  for (const detail of detailData.roomList || []) {
+    const existing = roomStore.get(detail.roomId);
+    const room: Room = {
+      id: existing ? existing.id : roomStore.size + 1,
+      roomId: detail.roomId,
+      roomName: detail.roomName,
+      memberCount: (detail.memberList || []).length,
+      announcement: detail.roomAnnouncement || '',
+      ownerGuid: params.guid,
+      roomType: 'external', // 默认外部客户群
+      firstSeenAt: existing ? existing.firstSeenAt : now,
+      lastSyncAt: now,
+      createdAt: existing ? existing.createdAt : now,
+    };
+
+    roomStore.set(detail.roomId, room);
+    rooms.push(room);
+  }
+
+  return {
+    rooms,
+    hasMore: listData.hasMore,
+    nextStartIndex: listData.nextStartIndex,
+    roomCount: listData.roomCount,
+  };
+}
+
+/**
+ * 查询本方群的列表(从本方存储读取,不调 QiWe)
+ *
+ * @param roomType - 群类型筛选(可选)
+ * @returns 群列表
+ */
+export function listRooms(roomType?: 'external' | 'internal'): Room[] {
+  let rooms = Array.from(roomStore.values());
+  if (roomType) {
+    rooms = rooms.filter((r) => r.roomType === roomType);
+  }
+  return rooms;
+}
+
+/**
+ * 查询单个群详情(本方存储)
+ */
+export function getRoomByRoomId(roomId: string): Room {
+  const room = roomStore.get(roomId);
+  if (!room) {
+    throw new AppError(404, 'ROOM_NOT_FOUND', `群 ${roomId} 不存在,请先同步群列表`);
+  }
+  return room;
+}
+
+// ============================================================
+// 进退群事件(API-09)
+// ============================================================
+
+/**
+ * 查询群成员变动(API-09)
+ *
+ * 按群 + 时间窗查询进退群记录。
+ * 供风控阈值检测、拉群效果统计、健康度计算使用。
+ *
+ * @param guid    - 人员 guid
+ * @param roomId  - 群 ID
+ * @param startTime - 查询起始时间(unix 秒)
+ * @param endTime   - 查询截止时间(unix 秒)
+ */
+export async function syncMemberEvents(
+  guid: string,
+  roomId: string,
+  startTime: number,
+  endTime: number,
+): Promise<RoomMemberEvent[]> {
+  // 调用 API-09(method 以官方文档为准)
+  const data = await callQiWeApi<{
+    memberEvents: Array<{
+      userId: string;
+      eventType: 'join' | 'leave';
+      eventTime: number;
+    }>;
+  }>('/room/queryMemberChange', {
+    guid,
+    roomId,
+    startTime,
+    endTime,
+  });
+
+  const events: RoomMemberEvent[] = [];
+
+  for (const raw of data.memberEvents || []) {
+    const event: RoomMemberEvent = {
+      id: nextEventId++,
+      roomId,
+      userId: raw.userId,
+      eventType: raw.eventType,
+      eventTime: new Date(raw.eventTime * 1000).toISOString(),
+      createdAt: new Date().toISOString(),
+    };
+    memberEventStore.set(event.id, event);
+    events.push(event);
+  }
+
+  return events;
+}
+
+/**
+ * 查询进退群事件列表(本方存储)
+ */
+export function listMemberEvents(roomId?: string, eventType?: 'join' | 'leave'): RoomMemberEvent[] {
+  let events = Array.from(memberEventStore.values());
+  if (roomId) events = events.filter((e) => e.roomId === roomId);
+  if (eventType) events = events.filter((e) => e.eventType === eventType);
+  return events.sort((a, b) => new Date(b.eventTime).getTime() - new Date(a.eventTime).getTime());
+}
+
+// ============================================================
+// 群健康度评估(§5.7)
+// ============================================================
+
+/**
+ * 评估群健康度
+ *
+ * 基于配置的规则计算健康度评分:
+ *   - 7 日无消息:扣 30 分
+ *   - 24h 退群 > 3 人:扣 20 分
+ *   - 成员数 < 5:扣 15 分
+ *   - 成员增长:加 10 分
+ *
+ * 供管理端优先关注低分群。
+ *
+ * @param roomId - 群 ID
+ * @returns 健康度评估结果
+ */
+export function evaluateRoomHealth(roomId: string): RoomHealth {
+  const room = roomStore.get(roomId);
+  if (!room) {
+    throw new AppError(404, 'ROOM_NOT_FOUND', `群 ${roomId} 不存在`);
+  }
+
+  let score = 100;
+  const reasons: string[] = [];
+
+  // 规则 1:7 日无消息(此处为示例,实际应从消息表查询)
+  const messageCount7d = 0; // TODO: 查询 group_message 表
+  if (messageCount7d === 0) {
+    score -= 30;
+    reasons.push('7 日内无群消息');
+  }
+
+  // 规则 2:24h 退群人数
+  const events24h = listMemberEvents(roomId, 'leave').filter((e) => {
+    const eventTime = new Date(e.eventTime).getTime();
+    const now = Date.now();
+    return now - eventTime < 24 * 60 * 60 * 1000;
+  });
+  const leaveCount24h = events24h.length;
+  if (leaveCount24h > 3) {
+    score -= 20;
+    reasons.push(`24h 内退群 ${leaveCount24h} 人(阈值 3 人)`);
+  }
+
+  // 规则 3:成员数过少
+  if (room.memberCount < 5) {
+    score -= 15;
+    reasons.push(`群成员仅 ${room.memberCount} 人(阈值 5 人)`);
+  }
+
+  // 规则 4:成员增长趋势(近 7 天进群 > 退群)
+  const joins7d = listMemberEvents(roomId, 'join').filter((e) => {
+    const eventTime = new Date(e.eventTime).getTime();
+    return Date.now() - eventTime < 7 * 24 * 60 * 60 * 1000;
+  }).length;
+  const leaves7d = listMemberEvents(roomId, 'leave').filter((e) => {
+    const eventTime = new Date(e.eventTime).getTime();
+    return Date.now() - eventTime < 7 * 24 * 60 * 60 * 1000;
+  }).length;
+
+  let memberTrend: RoomHealth['memberTrend'] = 'stable';
+  if (joins7d > leaves7d) {
+    memberTrend = 'growing';
+    score += 10;
+  } else if (leaves7d > joins7d) {
+    memberTrend = 'shrinking';
+    score -= 10;
+    reasons.push('成员呈流失趋势');
+  }
+
+  // 限制分数范围 0-100
+  score = Math.max(0, Math.min(100, score));
+
+  const health: RoomHealth = {
+    roomId,
+    roomName: room.roomName,
+    healthScore: score,
+    messageCount7d,
+    leaveCount24h,
+    memberTrend,
+    evaluatedAt: new Date().toISOString(),
+    detail: reasons.length > 0 ? reasons.join(';') : '群状态正常',
+  };
+
+  healthStore.set(roomId, health);
+  return health;
+}
+
+/**
+ * 批量评估所有群健康度
+ */
+export function evaluateAllRoomsHealth(): RoomHealth[] {
+  const results: RoomHealth[] = [];
+  for (const roomId of roomStore.keys()) {
+    results.push(evaluateRoomHealth(roomId));
+  }
+  return results;
+}
+
+/**
+ * 获取群健康度(从缓存读取)
+ */
+export function getRoomHealth(roomId: string): RoomHealth {
+  // 有缓存则返回缓存,否则实时计算
+  const cached = healthStore.get(roomId);
+  if (cached) return cached;
+  return evaluateRoomHealth(roomId);
+}

+ 146 - 0
backend/src/apps/pc/sales/controllers/sales.controller.ts

@@ -0,0 +1,146 @@
+/**
+ * 经营数据手工补录模块 — 控制器层
+ *
+ * 对应规范文档 §十二「模块 9:经营数据手工补录模块」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  recordLead, listLeads,
+  recordOrder, listOrders,
+  createCustomer, listCustomers, getCustomer, updateCustomer,
+  addFollowUp, listFollowUps,
+  recordLiveStats, listLiveStats,
+} from '../services/sales.service.js';
+
+// ============================================================
+// 选客数(§12.1)
+// ============================================================
+
+export async function addLead(req: Request, res: Response): Promise<void> {
+  try {
+    const { salespersonId, recordDate, addCount } = req.body;
+    if (!salespersonId || !recordDate || addCount === undefined) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:salespersonId, recordDate, addCount');
+      return;
+    }
+    const lead = recordLead({ ...req.body, channelId: req.body.channelId || 0, remark: req.body.remark || '' });
+    sendSuccess(res, lead, 201);
+  } catch (error) { throw error; }
+}
+
+export async function getLeads(req: Request, res: Response): Promise<void> {
+  try {
+    const { salespersonId, recordDate } = req.query;
+    sendSuccess(res, listLeads(
+      salespersonId ? Number(salespersonId) : undefined,
+      typeof recordDate === 'string' ? recordDate : undefined,
+    ));
+  } catch (error) { throw error; }
+}
+
+// ============================================================
+// 订单(§12.2)
+// ============================================================
+
+export async function addOrder(req: Request, res: Response): Promise<void> {
+  try {
+    const { salespersonId, customerId, amount, orderDate, source } = req.body;
+    if (!salespersonId || !customerId || !amount || !orderDate || !source) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数');
+      return;
+    }
+    const order = recordOrder({ ...req.body, roomId: req.body.roomId || '', remark: req.body.remark || '' });
+    sendSuccess(res, order, 201);
+  } catch (error) { throw error; }
+}
+
+export async function getOrders(req: Request, res: Response): Promise<void> {
+  try {
+    const { salespersonId, source } = req.query;
+    sendSuccess(res, listOrders(
+      salespersonId ? Number(salespersonId) : undefined,
+      typeof source === 'string' ? source : undefined,
+    ));
+  } catch (error) { throw error; }
+}
+
+// ============================================================
+// 客户档案与跟进(§12.3)
+// ============================================================
+
+export async function addCustomer(req: Request, res: Response): Promise<void> {
+  try {
+    const { name, phone } = req.body;
+    if (!name || !phone) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:name, phone');
+      return;
+    }
+    const customer = createCustomer({
+      ...req.body,
+      communityId: req.body.communityId || 0,
+      houseType: req.body.houseType || '',
+      budgetRange: req.body.budgetRange || '',
+      intentLevel: req.body.intentLevel || 'low',
+      roomId: req.body.roomId || '',
+      salespersonId: req.body.salespersonId || 0,
+    });
+    sendSuccess(res, customer, 201);
+  } catch (error) { throw error; }
+}
+
+export async function getCustomers(req: Request, res: Response): Promise<void> {
+  try {
+    const { salespersonId } = req.query;
+    sendSuccess(res, listCustomers(salespersonId ? Number(salespersonId) : undefined));
+  } catch (error) { throw error; }
+}
+
+export async function getCustById(req: Request, res: Response): Promise<void> {
+  try { sendSuccess(res, getCustomer(Number(req.params.id))); } catch (error) { throw error; }
+}
+
+export async function updateCust(req: Request, res: Response): Promise<void> {
+  try { sendSuccess(res, updateCustomer(Number(req.params.id), req.body)); } catch (error) { throw error; }
+}
+
+export async function addFollow(req: Request, res: Response): Promise<void> {
+  try {
+    const { customerId, followerId, followDate, method, content } = req.body;
+    if (!customerId || !followerId || !followDate || !method || !content) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数');
+      return;
+    }
+    const f = addFollowUp({ ...req.body, nextPlan: req.body.nextPlan || '' });
+    sendSuccess(res, f, 201);
+  } catch (error) { throw error; }
+}
+
+export async function getFollows(req: Request, res: Response): Promise<void> {
+  try { sendSuccess(res, listFollowUps(Number(req.params.customerId))); } catch (error) { throw error; }
+}
+
+// ============================================================
+// 直播数据(§12.4)
+// ============================================================
+
+export async function addLiveStat(req: Request, res: Response): Promise<void> {
+  try {
+    const { liveSessionId, title, liveDate, viewerCount } = req.body;
+    if (!liveSessionId || !title || !liveDate || viewerCount === undefined) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:liveSessionId, title, liveDate, viewerCount');
+      return;
+    }
+    const stat = recordLiveStats({
+      ...req.body,
+      interactionCount: req.body.interactionCount || 0,
+      reporterId: req.body.reporterId || 0,
+    });
+    sendSuccess(res, stat, 201);
+  } catch (error) { throw error; }
+}
+
+export async function getLiveStats(_req: Request, res: Response): Promise<void> {
+  try { sendSuccess(res, listLiveStats()); } catch (error) { throw error; }
+}

+ 111 - 0
backend/src/apps/pc/sales/models/sales.model.ts

@@ -0,0 +1,111 @@
+/**
+ * 经营数据手工补录模块 — 数据模型定义
+ *
+ * 对应规范文档 §十二「模块 9:经营数据手工补录模块」
+ *
+ * 说明:
+ *   本模块的数据均需人工填报,无对应的 QiWe 官方接口。
+ *   数据供看板(模块 8)引用展示。
+ *
+ * 核心表:
+ *   - sales_lead    :销售添加客户数填报(§12.1)
+ *   - sales_order   :订单与转化数据填报(§12.2)
+ *   - customer      :简化版客户档案(§12.3)
+ *   - follow_up     :跟进登记(§12.3)
+ *   - live_stat     :直播观看数据填报(§12.4)
+ */
+
+/** 销售添加客户数 */
+export interface SalesLead {
+  id: number;
+  /** 销售人员 ID */
+  salespersonId: number;
+  /** 填报日期 */
+  recordDate: string;
+  /** 添加客户数 */
+  addCount: number;
+  /** 来源渠道 */
+  channelId: number;
+  /** 备注 */
+  remark: string;
+  createdAt: string;
+}
+
+/** 订单与转化数据 */
+export interface SalesOrder {
+  id: number;
+  /** 销售人员 ID */
+  salespersonId: number;
+  /** 客户 ID */
+  customerId: number;
+  /** 订单金额(元) */
+  amount: number;
+  /** 订单日期 */
+  orderDate: string;
+  /** 转化来源:group=群内转化, referral=转介绍, walk_in=自然到店 */
+  source: 'group' | 'referral' | 'walk_in';
+  /** 关联的群 ID(群转化时) */
+  roomId: string;
+  /** 备注 */
+  remark: string;
+  createdAt: string;
+}
+
+/** 简化版客户档案 */
+export interface CustomerProfile {
+  id: number;
+  /** 客户姓名 */
+  name: string;
+  /** 手机号 */
+  phone: string;
+  /** 所在小区 */
+  communityId: number;
+  /** 户型需求 */
+  houseType: string;
+  /** 预算范围 */
+  budgetRange: string;
+  /** 意向等级 */
+  intentLevel: 'high' | 'medium' | 'low';
+  /** 来源群 ID */
+  roomId: string;
+  /** 负责销售 ID */
+  salespersonId: number;
+  createdAt: string;
+  updatedAt: string;
+}
+
+/** 跟进登记 */
+export interface FollowUp {
+  id: number;
+  /** 关联客户 ID */
+  customerId: number;
+  /** 跟进人 ID */
+  followerId: number;
+  /** 跟进日期 */
+  followDate: string;
+  /** 跟进方式:phone=电话, wechat=微信, visit=到店, meeting=面谈 */
+  method: 'phone' | 'wechat' | 'visit' | 'meeting';
+  /** 跟进内容 */
+  content: string;
+  /** 下一步计划 */
+  nextPlan: string;
+  createdAt: string;
+}
+
+/** 直播观看数据 */
+export interface LiveStats {
+  id: number;
+  /** 直播场次标识 */
+  liveSessionId: string;
+  /** 直播标题 */
+  title: string;
+  /** 直播日期 */
+  liveDate: string;
+  /** 观看人数 */
+  viewerCount: number;
+  /** 互动人数 */
+  interactionCount: number;
+  /** 填报人 ID */
+  reporterId: number;
+  createdAt: string;
+}

+ 53 - 0
backend/src/apps/pc/sales/routes/sales.routes.ts

@@ -0,0 +1,53 @@
+/**
+ * 经营数据手工补录模块 — 路由层
+ *
+ * 接口一览:
+ *   选客数:
+ *     POST   /api/sales/leads                 录入选客数
+ *     GET    /api/sales/leads                 查询选客数列表
+ *   订单:
+ *     POST   /api/sales/orders                录入订单
+ *     GET    /api/sales/orders                查询订单列表
+ *   客户档案:
+ *     POST   /api/sales/customers             创建客户档案
+ *     GET    /api/sales/customers             查询客户列表
+ *     GET    /api/sales/customers/:id         查询客户详情
+ *     PUT    /api/sales/customers/:id         更新客户档案
+ *     POST   /api/sales/customers/:customerId/follow-ups    添加跟进记录
+ *     GET    /api/sales/customers/:customerId/follow-ups    查询跟进记录
+ *   直播:
+ *     POST   /api/sales/live-stats            录入直播数据
+ *     GET    /api/sales/live-stats            查询直播数据列表
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  addLead, getLeads,
+  addOrder, getOrders,
+  addCustomer, getCustomers, getCustById, updateCust,
+  addFollow, getFollows,
+  addLiveStat, getLiveStats,
+} from '../controllers/sales.controller.js';
+
+export const pcSalesApiRouter: ExpressRouter = Router();
+
+// 选客数
+pcSalesApiRouter.post('/sales/leads', addLead);
+pcSalesApiRouter.get('/sales/leads', getLeads);
+
+// 订单
+pcSalesApiRouter.post('/sales/orders', addOrder);
+pcSalesApiRouter.get('/sales/orders', getOrders);
+
+// 客户档案
+pcSalesApiRouter.post('/sales/customers', addCustomer);
+pcSalesApiRouter.get('/sales/customers', getCustomers);
+pcSalesApiRouter.get('/sales/customers/:id', getCustById);
+pcSalesApiRouter.put('/sales/customers/:id', updateCust);
+pcSalesApiRouter.post('/sales/customers/:customerId/follow-ups', addFollow);
+pcSalesApiRouter.get('/sales/customers/:customerId/follow-ups', getFollows);
+
+// 直播数据
+pcSalesApiRouter.post('/sales/live-stats', addLiveStat);
+pcSalesApiRouter.get('/sales/live-stats', getLiveStats);

+ 158 - 0
backend/src/apps/pc/sales/services/sales.service.ts

@@ -0,0 +1,158 @@
+/**
+ * 经营数据手工补录模块 — 业务服务层
+ *
+ * 对应规范文档 §十二「模块 9:经营数据手工补录模块」
+ *
+ * 注意:
+ *   - 本模块所有数据均通过管理端手工填报录入
+ *   - 无对应的 QiWe 官方接口
+ *   - 数据供看板模块(dashboard)引用展示
+ */
+
+import { AppError } from '../../../../shared/errors/app-error.js';
+import type {
+  SalesLead,
+  SalesOrder,
+  CustomerProfile,
+  FollowUp,
+  LiveStats,
+} from '../models/sales.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const leadStore = new Map<number, SalesLead>();
+const orderStore = new Map<number, SalesOrder>();
+const customerStore = new Map<number, CustomerProfile>();
+const followUpStore = new Map<number, FollowUp>();
+const liveStatStore = new Map<string, LiveStats>();
+let nextLeadId = 1;
+let nextOrderId = 1;
+let nextCustomerId = 1;
+let nextFollowUpId = 1;
+
+// ============================================================
+// 销售添加客户数(§12.1)
+// ============================================================
+
+/** 录入选客数 */
+export function recordLead(data: Omit<SalesLead, 'id' | 'createdAt'>): SalesLead {
+  const lead: SalesLead = {
+    id: nextLeadId++,
+    ...data,
+    createdAt: new Date().toISOString(),
+  };
+  leadStore.set(lead.id, lead);
+  return lead;
+}
+
+/** 查询选客数列表 */
+export function listLeads(salespersonId?: number, recordDate?: string): SalesLead[] {
+  let result = Array.from(leadStore.values());
+  if (salespersonId) result = result.filter((l) => l.salespersonId === salespersonId);
+  if (recordDate) result = result.filter((l) => l.recordDate === recordDate);
+  return result;
+}
+
+// ============================================================
+// 订单与转化数据(§12.2)
+// ============================================================
+
+/** 录入订单 */
+export function recordOrder(data: Omit<SalesOrder, 'id' | 'createdAt'>): SalesOrder {
+  const order: SalesOrder = {
+    id: nextOrderId++,
+    ...data,
+    createdAt: new Date().toISOString(),
+  };
+  orderStore.set(order.id, order);
+  return order;
+}
+
+/** 查询订单列表 */
+export function listOrders(salespersonId?: number, source?: string): SalesOrder[] {
+  let result = Array.from(orderStore.values());
+  if (salespersonId) result = result.filter((o) => o.salespersonId === salespersonId);
+  if (source) result = result.filter((o) => o.source === source);
+  return result.sort((a, b) => b.orderDate.localeCompare(a.orderDate));
+}
+
+// ============================================================
+// 客户档案与跟进(§12.3)
+// ============================================================
+
+/** 创建客户档案 */
+export function createCustomer(data: Omit<CustomerProfile, 'id' | 'createdAt' | 'updatedAt'>): CustomerProfile {
+  const now = new Date().toISOString();
+  const customer: CustomerProfile = {
+    id: nextCustomerId++,
+    ...data,
+    createdAt: now,
+    updatedAt: now,
+  };
+  customerStore.set(customer.id, customer);
+  return customer;
+}
+
+/** 查询客户列表 */
+export function listCustomers(salespersonId?: number): CustomerProfile[] {
+  let result = Array.from(customerStore.values());
+  if (salespersonId) result = result.filter((c) => c.salespersonId === salespersonId);
+  return result;
+}
+
+/** 查询客户详情 */
+export function getCustomer(id: number): CustomerProfile {
+  const customer = customerStore.get(id);
+  if (!customer) throw new AppError(404, 'CUSTOMER_NOT_FOUND', `客户 ID=${id} 不存在`);
+  return customer;
+}
+
+/** 更新客户档案 */
+export function updateCustomer(id: number, data: Partial<CustomerProfile>): CustomerProfile {
+  const customer = getCustomer(id);
+  Object.assign(customer, data, { updatedAt: new Date().toISOString() });
+  customerStore.set(id, customer);
+  return customer;
+}
+
+/** 添加跟进记录 */
+export function addFollowUp(data: Omit<FollowUp, 'id' | 'createdAt'>): FollowUp {
+  // 确保客户存在
+  getCustomer(data.customerId);
+
+  const followUp: FollowUp = {
+    id: nextFollowUpId++,
+    ...data,
+    createdAt: new Date().toISOString(),
+  };
+  followUpStore.set(followUp.id, followUp);
+  return followUp;
+}
+
+/** 查询客户跟进记录 */
+export function listFollowUps(customerId: number): FollowUp[] {
+  return Array.from(followUpStore.values())
+    .filter((f) => f.customerId === customerId)
+    .sort((a, b) => b.followDate.localeCompare(a.followDate));
+}
+
+// ============================================================
+// 直播观看数据(§12.4)
+// ============================================================
+
+/** 录入直播数据 */
+export function recordLiveStats(data: Omit<LiveStats, 'id' | 'createdAt'>): LiveStats {
+  const stats: LiveStats = {
+    id: liveStatStore.size + 1,
+    ...data,
+    createdAt: new Date().toISOString(),
+  };
+  liveStatStore.set(stats.liveSessionId, stats);
+  return stats;
+}
+
+/** 查询直播数据列表 */
+export function listLiveStats(): LiveStats[] {
+  return Array.from(liveStatStore.values()).sort(
+    (a, b) => b.liveDate.localeCompare(a.liveDate),
+  );
+}

+ 154 - 0
backend/src/apps/pc/staff/controllers/staff.controller.ts

@@ -0,0 +1,154 @@
+/**
+ * 人员管理模块 — 控制器层
+ *
+ * 对应功能:
+ *   §4.2「人员企微账号纳入管理」
+ *   §4.3「账号是否在线提醒」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  createStaff,
+  listStaff,
+  getStaffById,
+  updateStaff,
+  deleteStaff,
+  getActiveGuids,
+} from '../services/staff.service.js';
+import type { StaffRole } from '../models/staff.model.js';
+
+/**
+ * POST /api/staff
+ *
+ * 创建人员账号。
+ *
+ * Body:
+ *   { "name": "张三", "role": "manager", "storeId": 1, "phone": "13800001111" }
+ *
+ * 注意:创建时不绑定 guid,需人员自行扫码登录后回填。
+ */
+export async function create(req: Request, res: Response): Promise<void> {
+  try {
+    const { name, role, storeId, phone } = req.body as {
+      name?: string;
+      role?: StaffRole;
+      storeId?: number;
+      phone?: string;
+    };
+
+    // 参数校验
+    if (!name || !role || !storeId || !phone) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:name, role, storeId, phone');
+      return;
+    }
+
+    const validRoles: StaffRole[] = ['manager', 'designer', 'operator'];
+    if (!validRoles.includes(role)) {
+      sendError(res, 400, 'VALIDATION_ERROR', `无效的角色:${role},可选:${validRoles.join(', ')}`);
+      return;
+    }
+
+    const staff = createStaff({ name, role, storeId, phone });
+    sendSuccess(res, staff, 201);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/staff
+ *
+ * 查询人员账号列表(支持按角色/门店/状态筛选)。
+ *
+ * Query params:
+ *   role    - 角色(可选)
+ *   storeId - 门店 ID(可选)
+ *   status  - 状态:1=启用, 0=停用(可选)
+ */
+export async function list(req: Request, res: Response): Promise<void> {
+  try {
+    const { role, storeId, status } = req.query;
+    const result = listStaff(
+      role as StaffRole | undefined,
+      storeId ? Number(storeId) : undefined,
+      status !== undefined ? Number(status) : undefined,
+    );
+    sendSuccess(res, result);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/staff/:id
+ *
+ * 查询单个人员详情。
+ */
+export async function getById(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    if (!id) {
+      sendError(res, 400, 'VALIDATION_ERROR', '无效的人员 ID');
+      return;
+    }
+    const staff = getStaffById(id);
+    sendSuccess(res, staff);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * PUT /api/staff/:id
+ *
+ * 更新人员信息(回填 guid、变更角色/门店、停用等)。
+ */
+export async function update(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    if (!id) {
+      sendError(res, 400, 'VALIDATION_ERROR', '无效的人员 ID');
+      return;
+    }
+
+    const staff = updateStaff(id, req.body);
+    sendSuccess(res, staff);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * DELETE /api/staff/:id
+ *
+ * 删除人员账号。
+ */
+export async function remove(req: Request, res: Response): Promise<void> {
+  try {
+    const id = Number(req.params.id);
+    if (!id) {
+      sendError(res, 400, 'VALIDATION_ERROR', '无效的人员 ID');
+      return;
+    }
+
+    deleteStaff(id);
+    sendSuccess(res, { deleted: true });
+  } catch (error) {
+    throw error;
+  }
+}
+
+/**
+ * GET /api/staff/active-guids
+ *
+ * 获取所有启用的 guid 列表(供定时任务使用)。
+ */
+export async function activeGuids(_req: Request, res: Response): Promise<void> {
+  try {
+    const guids = getActiveGuids();
+    sendSuccess(res, { guids, count: guids.length });
+  } catch (error) {
+    throw error;
+  }
+}

+ 61 - 0
backend/src/apps/pc/staff/models/staff.model.ts

@@ -0,0 +1,61 @@
+/**
+ * 人员管理模块 — 数据模型定义
+ *
+ * 对应规范文档 §4.2「人员企微账号纳入管理」。
+ *
+ * 核心表:staff_account
+ *   - 存储人员姓名、角色、所属门店、绑定的企微 guid
+ *   - guid 是调用所有 QiWe API 的必备参数
+ *   - 账号状态可启用/停用,停用后定时任务不再对其发起请求
+ */
+
+/** 人员角色枚举 */
+export type StaffRole = 'manager' | 'designer' | 'operator';
+
+/** 角色中文映射 */
+export const StaffRoleLabel: Record<StaffRole, string> = {
+  manager: '店长',
+  designer: '设计师',
+  operator: '运营',
+};
+
+/** 人员账号信息 */
+export interface StaffAccount {
+  /** 主键 */
+  id: number;
+  /** 人员姓名 */
+  name: string;
+  /** 企微设备 GUID(唯一标识一个登录实例) */
+  guid: string;
+  /** 角色:manager=店长, designer=设计师, operator=运营 */
+  role: StaffRole;
+  /** 所属门店 ID(关联门店表) */
+  storeId: number;
+  /** 手机号 */
+  phone: string;
+  /** 账号状态:1=启用, 0=停用 */
+  status: number;
+  /** 创建时间 */
+  createdAt: string;
+  /** 更新时间 */
+  updatedAt: string;
+}
+
+/** 创建人员账号的请求体(不含 guid,因为需要先调用 API-02 获取) */
+export interface CreateStaffRequest {
+  name: string;
+  role: StaffRole;
+  storeId: number;
+  phone: string;
+}
+
+/** 更新人员账号的请求体 */
+export interface UpdateStaffRequest {
+  name?: string;
+  role?: StaffRole;
+  storeId?: number;
+  phone?: string;
+  status?: number;
+  /** 更新 guid(重新扫码登录后) */
+  guid?: string;
+}

+ 31 - 0
backend/src/apps/pc/staff/routes/staff.routes.ts

@@ -0,0 +1,31 @@
+/**
+ * 人员管理模块 — 路由层
+ *
+ * 接口一览:
+ *   POST   /api/staff               创建人员账号
+ *   GET    /api/staff               查询人员列表
+ *   GET    /api/staff/active-guids  获取所有启用 guid
+ *   GET    /api/staff/:id           查询人员详情
+ *   PUT    /api/staff/:id           更新人员信息
+ *   DELETE /api/staff/:id           删除人员
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  create,
+  list,
+  getById,
+  update,
+  remove,
+  activeGuids,
+} from '../controllers/staff.controller.js';
+
+export const pcStaffApiRouter: ExpressRouter = Router();
+
+pcStaffApiRouter.post('/staff', create);
+pcStaffApiRouter.get('/staff', list);
+pcStaffApiRouter.get('/staff/active-guids', activeGuids);
+pcStaffApiRouter.get('/staff/:id', getById);
+pcStaffApiRouter.put('/staff/:id', update);
+pcStaffApiRouter.delete('/staff/:id', remove);

+ 160 - 0
backend/src/apps/pc/staff/services/staff.service.ts

@@ -0,0 +1,160 @@
+/**
+ * 人员管理模块 — 业务服务层
+ *
+ * 对应规范文档:
+ *   §4.2「人员企微账号纳入管理」
+ *   §4.3「账号是否在线提醒」
+ *
+ * 业务流程:
+ *   1. 运维在管理端创建人员账号(不含 guid)
+ *   2. 使用 QiWe 控制台或 API-02 完成扫码登录,获取 guid
+ *   3. 将 guid 回填到人员账号中
+ *   4. 定时任务遍历启用账号,调 API-05 检查在线状态
+ *   5. 离线则写告警、通过 API-14 通知相关人员
+ *
+ * 注意:当前使用内存 Map 模拟数据库,生产环境替换为 MySQL/PostgreSQL。
+ */
+
+import { AppError } from '../../../../shared/errors/app-error.js';
+import type {
+  StaffAccount,
+  StaffRole,
+  CreateStaffRequest,
+  UpdateStaffRequest,
+} from '../models/staff.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const staffStore = new Map<number, StaffAccount>();
+let nextId = 1;
+
+/**
+ * 创建人员账号
+ *
+ * 新建时暂不绑定 guid(guid 需要人员使用 QiWe 扫码登录后获取)。
+ * 创建成功后,运维引导人员在控制台扫码或调用 API-02 完成登录闭环,
+ * 再通过更新接口回填 guid。
+ *
+ * @param data - 人员基本信息
+ * @returns 创建后的人员记录
+ * @throws {AppError} 当手机号已存在时
+ */
+export function createStaff(data: CreateStaffRequest): StaffAccount {
+  // 手机号唯一性检查
+  for (const staff of staffStore.values()) {
+    if (staff.phone === data.phone) {
+      throw new AppError(409, 'STAFF_PHONE_DUPLICATE', `手机号 ${data.phone} 已存在`);
+    }
+  }
+
+  const now = new Date().toISOString();
+  const staff: StaffAccount = {
+    id: nextId++,
+    name: data.name,
+    guid: '', // 初始无 guid,等待扫码登录后回填
+    role: data.role,
+    storeId: data.storeId,
+    phone: data.phone,
+    status: 1, // 默认启用
+    createdAt: now,
+    updatedAt: now,
+  };
+
+  staffStore.set(staff.id, staff);
+  return staff;
+}
+
+/**
+ * 查询人员账号列表
+ *
+ * 支持按角色、门店、状态过滤。
+ *
+ * @param role   - 角色筛选(可选)
+ * @param storeId - 门店筛选(可选)
+ * @param status - 状态筛选(可选,1=启用, 0=停用)
+ * @returns 人员列表
+ */
+export function listStaff(
+  role?: StaffRole,
+  storeId?: number,
+  status?: number,
+): StaffAccount[] {
+  let result = Array.from(staffStore.values());
+
+  if (role) {
+    result = result.filter((s) => s.role === role);
+  }
+  if (storeId !== undefined) {
+    result = result.filter((s) => s.storeId === storeId);
+  }
+  if (status !== undefined) {
+    result = result.filter((s) => s.status === status);
+  }
+
+  return result;
+}
+
+/**
+ * 按 ID 查询单个人员
+ *
+ * @param id - 人员 ID
+ * @returns 人员信息
+ * @throws {AppError} 人员不存在时
+ */
+export function getStaffById(id: number): StaffAccount {
+  const staff = staffStore.get(id);
+  if (!staff) {
+    throw new AppError(404, 'STAFF_NOT_FOUND', `人员 ID=${id} 不存在`);
+  }
+  return staff;
+}
+
+/**
+ * 更新人员信息
+ *
+ * 常见场景:
+ *   - 回填 guid(人员完成扫码登录后)
+ *   - 变更角色或门店
+ *   - 停用/启用账号
+ *
+ * @param id   - 人员 ID
+ * @param data - 要更新的字段
+ * @returns 更新后的人员信息
+ */
+export function updateStaff(id: number, data: UpdateStaffRequest): StaffAccount {
+  const staff = getStaffById(id);
+
+  if (data.name !== undefined) staff.name = data.name;
+  if (data.role !== undefined) staff.role = data.role;
+  if (data.storeId !== undefined) staff.storeId = data.storeId;
+  if (data.phone !== undefined) staff.phone = data.phone;
+  if (data.status !== undefined) staff.status = data.status;
+  if (data.guid !== undefined) staff.guid = data.guid;
+  staff.updatedAt = new Date().toISOString();
+
+  staffStore.set(id, staff);
+  return staff;
+}
+
+/**
+ * 删除人员账号(物理删除)
+ *
+ * 注意:如果该人员有关联消息或群数据,应先停用而非删除。
+ *
+ * @param id - 人员 ID
+ */
+export function deleteStaff(id: number): void {
+  getStaffById(id); // 确保存在
+  staffStore.delete(id);
+}
+
+/**
+ * 获取所有启用的 guid 列表
+ *
+ * 供定时任务使用:遍历列表检查在线状态。
+ */
+export function getActiveGuids(): string[] {
+  const activeStaff = Array.from(staffStore.values()).filter(
+    (s) => s.status === 1 && s.guid,
+  );
+  return activeStaff.map((s) => s.guid);
+}

+ 93 - 0
backend/src/apps/pc/workbench/controllers/workbench.controller.ts

@@ -0,0 +1,93 @@
+/**
+ * 统一工作台与通知闭环模块 — 控制器层
+ *
+ * 对应规范文档 §十三「模块 10:统一工作台与通知闭环模块」
+ */
+
+import type { Request, Response } from 'express';
+import { sendSuccess, sendError } from '../../../../shared/http/response.js';
+import {
+  getWorkbenchHome,
+  sendNotification,
+  getIssueNotifyTemplate,
+  listNotifications,
+  listAuditLogs,
+} from '../services/workbench.service.js';
+import type { NotificationType } from '../models/workbench.model.js';
+
+/** GET /api/workbench — 工作台首页(§13.1 ~ §13.2) */
+export async function home(req: Request, res: Response): Promise<void> {
+  try {
+    const { role } = req.query;
+    const data = getWorkbenchHome(typeof role === 'string' ? role : undefined);
+    sendSuccess(res, data);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** POST /api/notifications/send — 发送通知(§13.3 ~ §13.4) */
+export async function notify(req: Request, res: Response): Promise<void> {
+  try {
+    const { type, receiverId, title, content, refId } = req.body as {
+      type?: NotificationType;
+      receiverId?: number;
+      title?: string;
+      content?: string;
+      refId?: number;
+    };
+
+    if (!type || !receiverId || !title || !content) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:type, receiverId, title, content');
+      return;
+    }
+
+    const notif = sendNotification(type, receiverId, title, content, refId || 0);
+    sendSuccess(res, notif, 201);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/notifications/template — 获取整改通知模板 */
+export async function notifyTemplate(req: Request, res: Response): Promise<void> {
+  try {
+    const { issueType, roomName } = req.query;
+    if (!issueType || !roomName) {
+      sendError(res, 400, 'VALIDATION_ERROR', '缺少必填参数:issueType, roomName');
+      return;
+    }
+    const template = getIssueNotifyTemplate(String(issueType), String(roomName));
+    sendSuccess(res, template);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/notifications — 查询通知列表 */
+export async function listNotifs(req: Request, res: Response): Promise<void> {
+  try {
+    const { receiverId, type } = req.query;
+    const result = listNotifications(
+      receiverId ? Number(receiverId) : undefined,
+      type as NotificationType | undefined,
+    );
+    sendSuccess(res, result);
+  } catch (error) {
+    throw error;
+  }
+}
+
+/** GET /api/audit-logs — 查询审计日志(§13.7) */
+export async function auditLogs(req: Request, res: Response): Promise<void> {
+  try {
+    const { action, limit } = req.query;
+    const result = listAuditLogs(
+      typeof action === 'string' ? action : undefined,
+      limit ? Number(limit) : 50,
+    );
+    sendSuccess(res, result);
+  } catch (error) {
+    throw error;
+  }
+}

+ 72 - 0
backend/src/apps/pc/workbench/models/workbench.model.ts

@@ -0,0 +1,72 @@
+/**
+ * 统一工作台与通知闭环模块 — 数据模型定义
+ *
+ * 对应规范文档 §十三「模块 10:统一工作台与通知闭环模块」
+ *
+ * 核心概念:
+ *   - 工作台首页:聚合合规问题、预警、运营待办等
+ *   - 通知:整改通知、汇总通知(通过 API-14 发送)
+ *   - 审计日志:记录 webhook 接收、扫描、通知等操作时间线
+ *
+ * 核心表:
+ *   - notification  :通知记录
+ *   - audit_log     :操作审计日志
+ */
+
+/** 工作台首页聚合数据 */
+export interface WorkbenchHome {
+  /** 合规待办数 */
+  compliancePending: number;
+  /** 未处理预警数 */
+  openAlerts: number;
+  /** 待处理工单数 */
+  openWorkOrders: number;
+  /** 运营待办数 */
+  opsPending: number;
+  /** 意向客户待跟进数 */
+  intentPending: number;
+  /** 今日新增消息数 */
+  newMessagesToday: number;
+  /** 生成时间 */
+  generatedAt: string;
+}
+
+/** 通知类型 */
+export type NotificationType = 'compliance' | 'risk' | 'ops' | 'summary';
+
+/** 通知记录 */
+export interface Notification {
+  id: number;
+  /** 通知类型 */
+  type: NotificationType;
+  /** 接收人 ID */
+  receiverId: number;
+  /** 标题 */
+  title: string;
+  /** 内容 */
+  content: string;
+  /** 关联的业务 ID(合规问题/预警/计划等) */
+  refId: number;
+  /** 发送方式:qiwe=企微消息, system=站内信 */
+  channel: 'qiwe' | 'system';
+  /** 状态:pending=待发送, sent=已发送, failed=发送失败 */
+  status: 'pending' | 'sent' | 'failed';
+  createdAt: string;
+  sentAt: string;
+}
+
+/** 审计日志 */
+export interface AuditLog {
+  id: number;
+  /** 操作类型:webhook_receive=接收回调, scan=巡检, notify=通知, login=登录 */
+  action: string;
+  /** 操作人 ID(系统操作为 0) */
+  operatorId: number;
+  /** 操作目标(群 ID / 问题 ID 等) */
+  target: string;
+  /** 操作详情 */
+  detail: string;
+  /** 操作结果:success / failure */
+  result: 'success' | 'failure';
+  createdAt: string;
+}

+ 28 - 0
backend/src/apps/pc/workbench/routes/workbench.routes.ts

@@ -0,0 +1,28 @@
+/**
+ * 统一工作台模块 — 路由层
+ *
+ * 接口一览:
+ *   GET  /api/workbench                  工作台首页
+ *   GET  /api/notifications              查询通知列表
+ *   GET  /api/notifications/template     获取通知模板
+ *   POST /api/notifications/send         发送通知
+ *   GET  /api/audit-logs                 查询审计日志
+ */
+
+import { Router } from 'express';
+import type { Router as ExpressRouter } from 'express';
+import {
+  home,
+  notify,
+  notifyTemplate,
+  listNotifs,
+  auditLogs,
+} from '../controllers/workbench.controller.js';
+
+export const pcWorkbenchApiRouter: ExpressRouter = Router();
+
+pcWorkbenchApiRouter.get('/workbench', home);
+pcWorkbenchApiRouter.get('/notifications', listNotifs);
+pcWorkbenchApiRouter.get('/notifications/template', notifyTemplate);
+pcWorkbenchApiRouter.post('/notifications/send', notify);
+pcWorkbenchApiRouter.get('/audit-logs', auditLogs);

+ 187 - 0
backend/src/apps/pc/workbench/services/workbench.service.ts

@@ -0,0 +1,187 @@
+/**
+ * 统一工作台与通知闭环模块 — 业务服务层
+ *
+ * 对应规范文档 §十三「模块 10:统一工作台与通知闭环模块」
+ *
+ * 功能:
+ *   §13.1 按角色与部门定制界面:RBAC 菜单配置,按角色返回可见模块
+ *   §13.2 监控预警与日常业务同一屏:聚合 compliance_issue / alert / ops 待办
+ *   §13.3 给相关人员发整改通知:按 issue 类型选模板 → API-14 发送
+ *   §13.4 给主管发汇总通知:定时汇总不合规数、风险数 → API-14
+ *   §13.5 问题分类展示:按 type 枚举分类
+ *   §13.7 操作与检查记录可追溯:audit_log 记录所有操作时间线
+ */
+
+import type {
+  WorkbenchHome,
+  Notification,
+  NotificationType,
+  AuditLog,
+} from '../models/workbench.model.js';
+
+// ---------- 内存存储(TODO: 替换为数据库)----------
+const notifStore = new Map<number, Notification>();
+const auditLogStore = new Map<number, AuditLog>();
+let nextNotifId = 1;
+let nextAuditLogId = 1;
+
+// ============================================================
+// 工作台首页(§13.1 ~ §13.2)
+// ============================================================
+
+/**
+ * 获取工作台首页聚合数据
+ *
+ * 根据用户角色返回定制化的待办和指标。
+ * 聚合来源:合规模块、风控模块、运营模块、意向客户模块。
+ *
+ * @param role - 用户角色(用于按角色过滤数据)
+ * @returns 工作台首页数据
+ */
+export function getWorkbenchHome(role?: string): WorkbenchHome {
+  // TODO: 从各模块实时聚合数据
+  // 以下为示例数据,实际应从 compliance/risk/content/koc 模块读取
+  return {
+    compliancePending: 2,
+    openAlerts: 3,
+    openWorkOrders: 2,
+    opsPending: 1,
+    intentPending: 4,
+    newMessagesToday: 156,
+    generatedAt: new Date().toISOString(),
+  };
+}
+
+// ============================================================
+// 通知管理(§13.3 ~ §13.4)
+// ============================================================
+
+/**
+ * 发送通知
+ *
+ * §13.3 整改通知:按 issue 类型选模板 → API-14 发送给责任人
+ * §13.4 汇总通知:定时汇总不合规数、风险数 → API-14 发送给主管
+ *
+ * @param type       - 通知类型
+ * @param receiverId - 接收人 ID
+ * @param title      - 标题
+ * @param content    - 内容
+ * @param refId      - 关联业务 ID
+ * @returns 通知记录
+ */
+export function sendNotification(
+  type: NotificationType,
+  receiverId: number,
+  title: string,
+  content: string,
+  refId: number,
+): Notification {
+  const now = new Date().toISOString();
+  const notif: Notification = {
+    id: nextNotifId++,
+    type,
+    receiverId,
+    title,
+    content,
+    refId,
+    channel: 'qiwe',
+    status: 'sent', // 实际需要通过 API-14 发送
+    createdAt: now,
+    sentAt: now,
+  };
+
+  notifStore.set(notif.id, notif);
+
+  // 记录审计日志
+  addAuditLog({
+    action: 'notify',
+    operatorId: 0, // 系统发送
+    target: `user:${receiverId}`,
+    detail: `发送${type}通知:${title}`,
+    result: 'success',
+  });
+
+  // TODO: 实际调用 API-14 发送企微消息
+  console.log(`[Workbench] 通知已发送: type=${type}, receiver=${receiverId}, title=${title}`);
+
+  return notif;
+}
+
+/**
+ * 生成整改通知模板
+ *
+ * 根据合规问题类型自动选择合适的通知文案。
+ *
+ * @param issueType - 合规问题类型
+ * @param roomName  - 群名称
+ * @returns 通知文案
+ */
+export function getIssueNotifyTemplate(issueType: string, roomName: string): { title: string; content: string } {
+  const templates: Record<string, { title: string; content: string }> = {
+    missing_doc: {
+      title: '【整改通知】缺少沟通记录表',
+      content: `群"${roomName}"尚未登记沟通记录在线文档,请在24小时内完成登记。`,
+    },
+    not_pinned: {
+      title: '【整改通知】沟通记录表未置顶',
+      content: `群"${roomName}"的沟通记录表未在群内置顶,请及时操作置顶。`,
+    },
+    stale_doc: {
+      title: '【整改通知】沟通记录表长期未更新',
+      content: `群"${roomName}"的沟通记录表已超过14天未更新,请及时更新沟通记录。`,
+    },
+    too_brief: {
+      title: '【整改通知】沟通记录内容过于简略',
+      content: `群"${roomName}"的沟通记录内容过于简略,请补充关键沟通内容。`,
+    },
+  };
+
+  return templates[issueType] || {
+    title: '【整改通知】沟通记录检查',
+    content: `群"${roomName}"存在合规问题(类型:${issueType}),请及时处理。`,
+  };
+}
+
+/**
+ * 查询通知列表
+ */
+export function listNotifications(receiverId?: number, type?: NotificationType): Notification[] {
+  let result = Array.from(notifStore.values());
+  if (receiverId) result = result.filter((n) => n.receiverId === receiverId);
+  if (type) result = result.filter((n) => n.type === type);
+  return result.sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
+}
+
+// ============================================================
+// 审计日志(§13.7)
+// ============================================================
+
+/**
+ * 添加审计日志
+ *
+ * 记录关键操作的时间线:webhook 接收、合规扫描、通知发送等。
+ * 所有操作均可追溯到操作人和时间。
+ */
+export function addAuditLog(data: Omit<AuditLog, 'id' | 'createdAt'>): AuditLog {
+  const log: AuditLog = {
+    id: nextAuditLogId++,
+    ...data,
+    createdAt: new Date().toISOString(),
+  };
+  auditLogStore.set(log.id, log);
+  return log;
+}
+
+/**
+ * 查询审计日志
+ *
+ * @param action - 操作类型筛选(可选)
+ * @param limit  - 返回条数上限
+ */
+export function listAuditLogs(action?: string, limit = 50): AuditLog[] {
+  let result = Array.from(auditLogStore.values());
+  if (action) result = result.filter((l) => l.action === action);
+  return result
+    .sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime())
+    .slice(0, limit);
+}

+ 46 - 1
backend/src/index.ts

@@ -1,8 +1,53 @@
+/**
+ * 总启动器
+ *
+ * 职责(遵循《后端目录规范》第八节):
+ *   - 加载环境变量(dotenv.config())
+ *   - 启动 PC 端服务(单端口,所有模块路由统一挂载)
+ *   - 启动 Mobile 端服务(单端口)
+ *   - 处理进程级事件
+ *
+ * 端口规划:
+ *   3101 — PC 端(11 个业务模块共用一个 Express App)
+ *   3201 — Mobile 端(chat 等模块)
+ *
+ * 前端只需配置两个 baseURL:
+ *   PC_BASE_URL     = http://localhost:3101/api
+ *   MOBILE_BASE_URL = http://localhost:3201/api
+ */
+
 import { config } from 'dotenv';
-import { startMobileChatServer } from './apps/mobile/chat/server.js';
 import { startPcServer } from './apps/pc/health/server.js';
+import { startMobileChatServer } from './apps/mobile/chat/server.js';
 
+// 必须在读取任何 process.env 之前调用
 config();
 
+console.log('===========================================');
+console.log('  Lami Base — 后端服务启动中...');
+console.log('===========================================');
+
+// PC 端(3101)—— 所有模块共用一个端口
 startPcServer();
+
+// Mobile 端(3201)—— AI 聊天等
 startMobileChatServer();
+
+// ---- 进程事件 ----
+process.on('SIGINT', () => {
+  console.log('\n收到 SIGINT,正在退出...');
+  process.exit(0);
+});
+
+process.on('SIGTERM', () => {
+  console.log('\n收到 SIGTERM,正在退出...');
+  process.exit(0);
+});
+
+process.on('uncaughtException', (error) => {
+  console.error('未捕获的异常:', error);
+});
+
+process.on('unhandledRejection', (reason) => {
+  console.error('未处理的 Promise 拒绝:', reason);
+});

+ 35 - 0
backend/src/shared/errors/app-error.ts

@@ -0,0 +1,35 @@
+/**
+ * 应用通用错误类型
+ *
+ * 用于在业务层抛出结构化错误,由统一错误处理中间件捕获并转换为标准响应格式。
+ *
+ * 使用方式:
+ *   throw new AppError(404, 'USER_NOT_FOUND', '用户不存在');
+ *   throw new AppError(400, 'VALIDATION_ERROR', '参数校验失败', { field: 'name' });
+ *
+ * 错误码(errorCode)约定:
+ *   - 使用大写蛇形命名,如 "USER_NOT_FOUND"、"VALIDATION_ERROR"
+ *   - 前端可根据 errorCode 做差异化展示或跳转
+ *
+ * 响应格式(由 error-handler 中间件统一输出):
+ *   { "success": false, "data": null, "error": { "message": "用户不存在", "code": "USER_NOT_FOUND" } }
+ */
+export class AppError extends Error {
+  /** HTTP 状态码,如 400 / 404 / 500 */
+  public readonly statusCode: number;
+  /** 业务错误码,前端可据此做分支处理 */
+  public readonly errorCode: string;
+  /** 附加的上下文数据(可选),如校验失败字段 */
+  public readonly details?: unknown;
+
+  constructor(statusCode: number, errorCode: string, message: string, details?: unknown) {
+    super(message);
+    this.name = 'AppError';
+    this.statusCode = statusCode;
+    this.errorCode = errorCode;
+    this.details = details;
+
+    // 确保 instanceof 检查正常(TypeScript 继承 Error 时需要)
+    Object.setPrototypeOf(this, AppError.prototype);
+  }
+}

+ 41 - 0
backend/src/shared/http/error-handler.ts

@@ -0,0 +1,41 @@
+import type { Request, Response, NextFunction } from 'express';
+import { AppError } from '../errors/app-error.js';
+import { sendError } from './response.js';
+
+/**
+ * 统一错误处理中间件
+ *
+ * 职责:
+ *   1. 捕获 controller/service 抛出的 AppError,转换为标准错误响应
+ *   2. 捕获未预期的异常(如 TypeError),返回 500 并打印日志
+ *   3. 保证无论什么情况,响应格式始终一致
+ *
+ * 挂载方式(必须在所有路由之后注册):
+ *   app.use(errorHandler);
+ *
+ * 与 AppError 的协作:
+ *   - controller 中 throw new AppError(404, 'NOT_FOUND', '资源不存在')
+ *   - 此中间件捕获后自动调用 sendError(res, 404, 'NOT_FOUND', '资源不存在')
+ *
+ * 注意:
+ *   - 线上环境不应在 error message 中暴露内部细节
+ *   - 此中间件为"最后一个兜底",前面不应再有任何未处理的中间件
+ */
+export function errorHandler(err: Error, _req: Request, res: Response, _next: NextFunction): void {
+  // 处理已知的业务错误(AppError)
+  if (err instanceof AppError) {
+    sendError(res, err.statusCode, err.errorCode, err.message, err.details);
+    return;
+  }
+
+  // 处理未知的服务器内部错误
+  console.error('[ErrorHandler] 未预期的服务器错误:', err);
+
+  // 线上环境不暴露内部错误详情,只给出通用提示
+  const message =
+    process.env.NODE_ENV === 'production'
+      ? '服务器内部错误'
+      : err.message || '服务器内部错误';
+
+  sendError(res, 500, 'INTERNAL_ERROR', message);
+}

+ 85 - 0
backend/src/shared/http/response.ts

@@ -0,0 +1,85 @@
+import type { Response } from 'express';
+
+/**
+ * 统一响应格式封装
+ *
+ * 所有 controller 在返回数据时应使用此模块中的辅助函数,
+ * 确保前后端都遵循相同的响应契约。
+ *
+ * 【成功响应格式】
+ *   { "success": true,  "data": { ... }, "error": null }
+ *
+ * 【错误响应格式】
+ *   { "success": false, "data": null, "error": { "message": "...", "code": "..." } }
+ *
+ * 设计意图:
+ *   - success 字段让前端无需判断 HTTP 状态码即可知道请求是否成功
+ *   - data 为 null 时明确表示无数据(而非 undefined)
+ *   - error.code 用于前端差异化处理(如弹窗、跳转、忽略等)
+ */
+
+/** 成功响应数据结构 */
+interface SuccessBody<T = unknown> {
+  success: true;
+  data: T;
+  error: null;
+}
+
+/** 错误响应数据结构 */
+interface ErrorBody {
+  success: false;
+  data: null;
+  error: {
+    message: string;
+    code: string;
+    details?: unknown;
+  };
+}
+
+/**
+ * 发送成功响应
+ *
+ * @param res   - Express Response 对象
+ * @param data  - 返回给前端的数据体(业务数据)
+ * @param statusCode - HTTP 状态码,默认 200
+ *
+ * @example
+ *   sendSuccess(res, { id: 1, name: '张三' });
+ *   sendSuccess(res, roomList, 201);
+ */
+export function sendSuccess<T>(res: Response, data: T, statusCode = 200): void {
+  const body: SuccessBody<T> = {
+    success: true,
+    data,
+    error: null,
+  };
+  res.status(statusCode).json(body);
+}
+
+/**
+ * 发送错误响应
+ *
+ * @param res       - Express Response 对象
+ * @param statusCode - HTTP 状态码
+ * @param code      - 业务错误码(大写蛇形命名,如 "USER_NOT_FOUND")
+ * @param message   - 面向用户的错误描述
+ * @param details   - 附加信息(可选,如校验失败的字段列表)
+ *
+ * @example
+ *   sendError(res, 404, 'USER_NOT_FOUND', '用户不存在');
+ *   sendError(res, 400, 'VALIDATION_ERROR', '参数校验失败', { fields: ['name'] });
+ */
+export function sendError(
+  res: Response,
+  statusCode: number,
+  code: string,
+  message: string,
+  details?: unknown,
+): void {
+  const body: ErrorBody = {
+    success: false,
+    data: null,
+    error: { message, code, ...(details ? { details } : {}) },
+  };
+  res.status(statusCode).json(body);
+}

+ 122 - 0
backend/src/shared/qiwei/client.ts

@@ -0,0 +1,122 @@
+/**
+ * QiWe(企微)API 统一调用客户端
+ *
+ * 职责:
+ *   1. 封装对 QiWe 开放平台的统一 HTTP 调用(POST /api/qw/doApi)
+ *   2. 自动注入必需的 Header(Content-Type、X-QIWEI-TOKEN)
+ *   3. 解析 QiWe 标准响应外壳 { code, data, msg }
+ *   4. 当 QiWe 返回非 0 code 时抛 AppError,由上层 error handler 处理
+ *
+ * 调用方式(参考 QiWe 开放平台文档):
+ *   所有接口通过统一 URL 调用,仅 method 和 params 不同:
+ *   ```
+ *   POST {QIWEI_BASE_URL}/api/qw/doApi
+ *   Header: X-QIWEI-TOKEN
+ *   Body: { "method": "/msg/syncMsg", "params": { "guid": "...", "msgSeq": 0 } }
+ *   ```
+ *
+ * 环境变量依赖:
+ *   - QIWEI_BASE_URL:QiWe 开放平台地址,默认 http://manager.qiweapi.com/qiwe
+ *   - QIWEI_TOKEN:租户 Token,在 QiWe 控制台申请
+ *
+ * 使用示例:
+ *   import { callQiWeApi } from '../../shared/qiwei/client.js';
+ *   const result = await callQiWeApi('/room/getRoomList', { guid: 'xxx', nextStartIndex: 0 });
+ */
+
+import { AppError } from '../errors/app-error.js';
+import { getStringEnv } from '../config/env.js';
+
+/** QiWe API 标准响应外壳 */
+interface QiWeApiResponse<T = unknown> {
+  code: number;
+  data: T;
+  msg: string;
+}
+
+/** 调用 QiWe API 时传入的参数 */
+interface QiWeApiParams {
+  [key: string]: unknown;
+}
+
+/**
+ * 调用 QiWe 开放平台 API(统一入口)
+ *
+ * 通过统一的 doApi 端点访问所有 QiWe 官方接口。
+ * 每次调用自动携带租户 Token(从环境变量 QIWEI_TOKEN 读取)。
+ *
+ * @param method - QiWe 接口路径,如 "/room/getRoomList"、"/msg/syncMsg"
+ * @param params - 接口参数对象,字段名以 QiWe 官方文档为准
+ * @returns 解析后的 data 字段内容(已从 { code, data, msg } 外壳中提取)
+ * @throws {AppError} 当 QIWEI_TOKEN 未配置、网络请求失败、或 QiWe 返回 code !== 0 时
+ *
+ * @example
+ *   // 获取群列表
+ *   const roomData = await callQiWeApi('/room/getRoomList', {
+ *     guid: 'a3318ad6-xxxx',
+ *     nextStartIndex: 0,
+ *   });
+ *   console.log(roomData.roomList); // QiWe 返回的群列表
+ */
+export async function callQiWeApi<T = unknown>(
+  method: string,
+  params: QiWeApiParams = {},
+): Promise<T> {
+  // ---- 1. 读取配置 ----
+  const baseUrl = getStringEnv('QIWEI_BASE_URL') || 'http://manager.qiweapi.com/qiwe';
+  const token = getStringEnv('QIWEI_TOKEN');
+
+  if (!token) {
+    throw new AppError(
+      500,
+      'QIWEI_TOKEN_MISSING',
+      'QiWe Token 未配置,请在 .env 中设置 QIWEI_TOKEN(从 QiWe 控制台申请)',
+    );
+  }
+
+  // ---- 2. 构造请求 ----
+  const url = `${baseUrl}/api/qw/doApi`;
+  const body = JSON.stringify({ method, params });
+
+  let response: Response;
+  try {
+    response = await fetch(url, {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+        'X-QIWEI-TOKEN': token,
+      },
+      body,
+    });
+  } catch (error) {
+    throw new AppError(
+      502,
+      'QIWEI_NETWORK_ERROR',
+      `请求 QiWe 开放平台失败:${error instanceof Error ? error.message : '网络异常'}`,
+    );
+  }
+
+  // ---- 3. 解析响应 ----
+  let responseBody: QiWeApiResponse<T>;
+  try {
+    responseBody = (await response.json()) as QiWeApiResponse<T>;
+  } catch {
+    throw new AppError(
+      502,
+      'QIWEI_RESPONSE_PARSE_ERROR',
+      `QiWe 响应不是合法的 JSON,HTTP 状态码:${response.status}`,
+    );
+  }
+
+  // ---- 4. 检查业务状态码 ----
+  if (responseBody.code !== 0) {
+    throw new AppError(
+      502,
+      'QIWEI_API_ERROR',
+      `QiWe 接口 [${method}] 返回错误:${responseBody.msg || '未知错误'}(code=${responseBody.code})`,
+    );
+  }
+
+  // ---- 5. 返回 data 层 ----
+  return responseBody.data;
+}

+ 62 - 0
backend/src/shared/types/page.ts

@@ -0,0 +1,62 @@
+/**
+ * 通用分页类型定义
+ *
+ * 用于所有列表类接口的请求参数和响应数据标准化。
+ * 遵循规范文档中的统一风格,前后端共用同一套分页契约。
+ *
+ * 使用示例:
+ *   // 请求
+ *   GET /api/rooms?page=1&pageSize=20
+ *
+ *   // 响应 data 字段
+ *   {
+ *     "list": [...],
+ *     "page": 1,
+ *     "pageSize": 20,
+ *     "total": 156
+ *   }
+ */
+
+/** 分页请求查询参数 */
+export interface PageQuery {
+  /** 页码,从 1 开始,默认 1 */
+  page?: number;
+  /** 每页条数,默认 20,上限 100 */
+  pageSize?: number;
+}
+
+/** 分页响应数据 */
+export interface PageResult<T> {
+  /** 当前页数据列表 */
+  list: T[];
+  /** 当前页码 */
+  page: number;
+  /** 每页条数 */
+  pageSize: number;
+  /** 总记录数(用于前端计算总页数) */
+  total: number;
+}
+
+/**
+ * 从查询参数中提取标准分页参数,带默认值和上限保护
+ *
+ * @param query - Express req.query 对象
+ * @returns 归一化后的分页参数
+ */
+export function normalizePageQuery(query: PageQuery): Required<PageQuery> {
+  const page = Math.max(1, Number(query.page) || 1);
+  const pageSize = Math.min(100, Math.max(1, Number(query.pageSize) || 20));
+  return { page, pageSize };
+}
+
+/**
+ * 构造标准分页响应体
+ *
+ * @param list     - 当前页数据
+ * @param total    - 总记录数
+ * @param page     - 当前页码
+ * @param pageSize - 每页条数
+ */
+export function makePageResult<T>(list: T[], total: number, page: number, pageSize: number): PageResult<T> {
+  return { list, page, pageSize, total };
+}

+ 82 - 0
backend/src/shared/utils/docid.ts

@@ -0,0 +1,82 @@
+/**
+ * 企微在线文档 docid 解析工具
+ *
+ * 背景:
+ *   在企业微信群里,设计师会发送沟通记录在线文档链接(微信文档),
+ *   系统需要从链接中提取唯一的文档 ID(docid),用于:
+ *     - 建立「群 → 文档」的台账映射
+ *     - 判断同一个群是否出现了多张表(异常)
+ *     - 后续读取文档正文时作为标识
+ *
+ * 微信文档链接格式示例:
+ *   - https://doc.weixin.qq.com/doc/w3_xxxx?docid=YYYY
+ *   - https://doc.weixin.qq.com/sheet/w3_xxxx?docid=YYYY
+ *   - https://doc.weixin.qq.com/doc/w3_AAAA?scode=BBB
+ *
+ * 解析规则:
+ *   1. 优先从 URL 查询参数 `docid` 中提取
+ *   2. 若没有 `docid`,则从路径末尾的文档 ID 中提取(格式 `w3_` 开头的部分)
+ *   3. 无法识别则返回 null,由调用方记入「链接异常」队列
+ *
+ * 使用示例:
+ *   import { parseDocId } from '../../shared/utils/docid.js';
+ *   const docid = parseDocId('https://doc.weixin.qq.com/doc/w3_abc?docid=123');
+ *   // → '123'
+ */
+
+/**
+ * 从企微文档 URL 中提取 docid
+ *
+ * @param url - 完整的文档链接,如 "https://doc.weixin.qq.com/doc/w3_xxxx?docid=YYYY"
+ * @returns 提取到的 docid;如果无法识别则返回 null
+ *
+ * @example
+ *   parseDocId('https://doc.weixin.qq.com/doc/w3_abc?docid=123')  // → '123'
+ *   parseDocId('https://doc.weixin.qq.com/doc/w3_abc')            // → 'w3_abc'
+ *   parseDocId('https://other.com/page')                           // → null(不是文档链接)
+ */
+export function parseDocId(url: string): string | null {
+  if (!url) return null;
+
+  try {
+    const urlObj = new URL(url);
+
+    // 策略 1:从查询参数 docid 中提取(最可靠的方式)
+    const docidParam = urlObj.searchParams.get('docid');
+    if (docidParam) {
+      return docidParam;
+    }
+
+    // 策略 2:从路径末尾提取文档 ID(格式 w3_xxxx)
+    // 路径格式如 /doc/w3_abc 或 /sheet/w3_abc
+    const pathParts = urlObj.pathname.split('/').filter(Boolean);
+    const lastPart = pathParts[pathParts.length - 1];
+    if (lastPart && /^w3_/.test(lastPart)) {
+      return lastPart;
+    }
+
+    return null;
+  } catch {
+    // URL 解析失败(格式异常),返回 null 由调用方处理
+    return null;
+  }
+}
+
+/**
+ * 判断给定 URL 是否是企微在线文档链接
+ *
+ * 主要用于 webhook 消息过滤:在收到链接消息(msgType=13)后,
+ * 快速判断该链接是否是我们关心的沟通记录文档。
+ *
+ * @param url - 消息中的链接
+ * @returns 是否匹配 doc.weixin.qq.com 域名
+ */
+export function isWeixinDocUrl(url: string): boolean {
+  if (!url) return false;
+  try {
+    const urlObj = new URL(url);
+    return urlObj.hostname === 'doc.weixin.qq.com';
+  } catch {
+    return false;
+  }
+}

+ 73 - 65
doc/后端目录规范.md

@@ -23,34 +23,47 @@
 ```text
 backend/
 └── src/
-    ├── index.ts                          # [总启动器] 启动多个 Express 实例并监听不同端口
+    ├── index.ts                          # [总启动器] 启动 PC 和 Mobile 两个 Express 实例
     ├── apps/                             # [应用隔离区] 端 + 模块 的物理隔离
-    │   ├── pc/                           # [💻 PC 端隔离区]
-    │   │   ├── user/                     # PC - 用户模块(独立端口)
-    │   │   │   ├── app.ts                # 创建 Express app(挂中间件/路由/错误处理)
-    │   │   │   ├── server.ts             # 监听端口(从 env 读取)
-    │   │   │   ├── routes/               # 路由层(Router 组合)
-    │   │   │   ├── controllers/          # 控制器层(req/res 编排)
-    │   │   │   ├── services/             # 业务服务层(业务逻辑/聚合)
-    │   │   │   ├── models/               # 模型/DTO(模块内自洽)
-    │   │   │   ├── validators/           # 入参校验(模块内)
-    │   │   │   └── middlewares/          # 模块私有中间件(鉴权/审计等)
+    │   ├── pc/                           # [💻 PC 端隔离区] 所有模块共用一个端口
+    │   │   ├── app.ts                    # [统一装配] 创建 Express app,注册所有模块路由
+    │   │   ├── health/                   # 健康检查
+    │   │   │   ├── server.ts             # PC 端入口(监听 PC_PORT)
+    │   │   │   ├── routes/
+    │   │   │   └── controllers/
     │   │   │
-    │   │   ├── order/                    # PC - 订单模块(独立端口)
-    │   │   └── ...                       # PC 其他模块(按需增加)
+    │   │   ├── qiwei/                    # PC - 企微API代理 [模块1]
+    │   │   │   ├── routes/
+    │   │   │   ├── controllers/
+    │   │   │   ├── services/
+    │   │   │   └── models/
+    │   │   │
+    │   │   ├── staff/                    # PC - 人员管理 [模块1]
+    │   │   ├── community/                # PC - 小区管理 [模块2]
+    │   │   ├── room/                     # PC - 群管理 [模块2]
+    │   │   ├── compliance/               # PC - 合规检查 [模块4]
+    │   │   ├── risk/                     # PC - 群风控 [模块5]
+    │   │   ├── content/                  # PC - 内容运营 [模块6]
+    │   │   ├── koc/                      # PC - KOC与意向 [模块7]
+    │   │   ├── dashboard/                # PC - 数据看板 [模块8]
+    │   │   ├── sales/                    # PC - 经营数据 [模块9]
+    │   │   └── workbench/                # PC - 工作台 [模块10]
     │   │
     │   └── mobile/                       # [📱 移动端隔离区]
-    │       ├── user/                     # Mobile - 用户模块(独立端口)
-    │       ├── content/                  # Mobile - 内容模块(独立端口)
-    │       └── ...
+    │       └── chat/                     # Mobile - AI聊天(独立端口)
+    │           ├── app.ts
+    │           ├── server.ts
+    │           ├── routes/
+    │           └── controllers/
     └── shared/                           # [共享区] 唯一允许跨模块复用的区域
-        ├── config/                       # 环境变量、端口映射、运行环境
-        ├── http/                         # 通用 HTTP 能力(中间件/错误处理/响应封装)
-        ├── errors/                       # 通用错误类型(AppError 等)
+        ├── config/                       # 环境变量读取
+        ├── http/                         # 通用 HTTP 能力(响应封装/错误处理)
+        ├── errors/                       # 通用错误类型(AppError)
+        ├── qiwei/                        # QiWe API 客户端
         ├── types/                        # 全局类型(仅 truly-shared)
-        └── utils/                        # 工具函数(不可依赖具体业务)
+        └── utils/                        # 工具函数
 ```
 
 ---
@@ -82,36 +95,41 @@ backend/
 
 ## 四、端口与服务拆分规范
 
-### 1. 端口规划(建议)
+### 1. 端口规划
 
-使用“端 + 模块”粒度进行端口分配,通过环境变量统一管理
+采用**「一端一端口」**策略,同一端下的所有模块共用一个 Express App 和端口
 
-示例(仅示意,可按你的模块数量调整)
+当前规划
 
-| 端 | 模块 | 环境变量 | 默认端口 |
+| 端 | 环境变量 | 默认端口 | 包含模块 |
 |---|---|---|---|
-| PC | user | `PC_USER_PORT` | 3101 |
-| PC | order | `PC_ORDER_PORT` | 3102 |
-| Mobile | user | `MOBILE_USER_PORT` | 3201 |
-| Mobile | content | `MOBILE_CONTENT_PORT` | 3202 |
+| PC | `PC_PORT` | 3101 | health / qiwei / staff / community / room / compliance / risk / content / koc / dashboard / sales / workbench |
+| Mobile | `MOBILE_CHAT_PORT` | 3201 | chat 等 |
+
+**为什么不用模块级端口?**
 
-建议端口分段:
-- `31xx`:PC
-- `32xx`:Mobile
+- 当前阶段各模块无独立发布、独立扩容的强需求
+- 模块级端口意味着前端需要管理 12 个 baseURL,开发和部署成本高
+- 模块目录结构和分层(models/services/controllers/routes)已保证逻辑隔离
+- 未来某模块需要独立部署时,给它加一个 `server.ts` 即可拆分出去
 
-### 2. URL 规范(即使分端口也要统一风格)
+### 2. URL 规范
 
-每个服务内部的路由建议统一以 `/api` 作为前缀:
-- `http://localhost:3101/api/...`(PC-user)
-- `http://localhost:3202/api/...`(Mobile-content)
+所有 PC 模块路由统一挂载在 `/api` 前缀下:
+- `http://localhost:3101/api/health` — 健康检查
+- `http://localhost:3101/api/staff` — 人员管理
+- `http://localhost:3101/api/rooms` — 群管理
 
-### 3. 是否需要“网关聚合层”
+前端只需配置一个 baseURL:`http://localhost:3101/api`
 
-如果前端希望只配置一个 baseURL(减少多端口管理成本),可在未来增加一个“API Gateway”(仍在本仓库内):
-- 作为单端口入口(例如 `3000`),按路径转发到对应模块端口
-- 该网关只做转发与鉴权,不承载业务逻辑
+### 3. 当前是否引入 API Gateway
 
-是否立刻引入取决于你的前端请求层如何管理多个 baseURL;本规范不强制。
+不需要。PC 端已有一个统一的 `apps/pc/app.ts` 充当”装配层”:
+- 创建唯一的 Express 实例
+- 注册所有模块路由
+- 共享同一套中间件(cors、json 解析、日志、错误处理)
+
+这本质上就是 Gateway 和模块路由的合并实现,等未来有模块需要独立端口时再做拆分。
 
 ---
 
@@ -119,31 +137,13 @@ backend/
 
 每个模块建议遵循固定分层,以降低心智负担:
 
-### 1. `server.ts`(端口监听层)
-
-职责:
-- 读取本模块端口(env)
-- `app.listen(...)`
-- 打印启动信息(可选)
-
-要求:
-- 不写任何业务逻辑
-
-### 2. `app.ts`(装配层)
-
-职责:
-- 创建 `express()` 实例
-- 挂载通用中间件(`cors` / `express.json` / request id 等)
-- 挂载路由(`routes/`)
-- 挂载统一错误处理(来自 `shared/http`)
-
-### 3. `routes/`(路由层)
+### 1. `routes/`(路由层)
 
 职责:
 - 定义 URL 与 controller 映射
-- 只做路由组织”,不写业务逻辑
+- 只做”路由组织”,不写业务逻辑
 
-### 4. `controllers/`(控制器层)
+### 2. `controllers/`(控制器层)
 
 职责:
 - 解析请求参数(path/query/body)
@@ -154,18 +154,26 @@ backend/
 - controller 内不直接写复杂业务逻辑
 - 外部依赖(数据库/第三方接口)应在 service 或 client 中处理
 
-### 5. `services/`(业务层)
+### 3. `services/`(业务层)
 
 职责:
 - 编排业务流程
 - 聚合多个数据源
-- 产出业务结果或抛出业务错误
+- 产出业务结果或抛出业务错误(AppError)
 
-### 6. `models/` 与 `validators/`
+### 4. `models/` 与 `validators/`
 
 建议:
 - `models/` 存 DTO、业务对象、接口响应结构类型
-- `validators/` 存入参校验逻辑(没有引入第三方校验库时,也可以写轻量手写校验)
+- `validators/` 存入参校验逻辑
+
+### 5. `app.ts` 与 `server.ts`(端级入口)
+
+`apps/pc/app.ts` 是 PC 端唯一的 Express 装配层:创建 app、注册所有模块路由、挂载中间件和错误处理。
+`apps/pc/health/server.ts` 是 PC 端的监听入口:读取 `PC_PORT`,调用 `app.listen()`。
+
+**当前阶段模块不需要自己的 app.ts 和 server.ts**。它们只需要 routes → controllers → services → models 四层。
+未来某模块需要独立部署时,再给它加 `server.ts` 并单独监听端口即可。
 
 ---
 

+ 809 - 0
doc/开发/PC后端接口文档.md

@@ -0,0 +1,809 @@
+# PC 后端接口文档
+
+> **Base URL:** `http://localhost:3101/api`
+>
+> **响应格式:** 所有接口统一返回 JSON:
+> ```json
+> { "success": true,  "data": { ... }, "error": null }       // 成功
+> { "success": false, "data": null, "error": { "message": "...", "code": "ERROR_CODE" } }  // 失败
+> ```
+
+---
+
+## 目录
+
+- [快速开始](#快速开始)
+- [项目架构](#项目架构)
+- [通用约定](#通用约定)
+- [1. 健康检查](#1-健康检查)
+- [2. 企微 API 代理](#2-企微-api-代理)
+- [3. 人员管理](#3-人员管理)
+- [4. 小区管理](#4-小区管理)
+- [5. 群管理](#5-群管理)
+- [6. 合规检查](#6-合规检查)
+- [7. 群风控](#7-群风控)
+- [8. 内容运营](#8-内容运营)
+- [9. KOC 与意向客户](#9-koc-与意向客户)
+- [10. 数据看板](#10-数据看板)
+- [11. 经营数据补录](#11-经营数据补录)
+- [12. 统一工作台](#12-统一工作台)
+
+---
+
+## 快速开始
+
+### 启动服务
+
+```bash
+cd backend
+pnpm install
+pnpm dev
+```
+
+服务启动后访问:
+- PC 端:`http://localhost:3101/api/health`
+- Mobile 端:`http://localhost:3201/api/health`
+
+### 环境变量
+
+复制 `.env.example` 为 `.env`,关键变量:
+
+| 变量 | 说明 | 默认值 |
+|------|------|--------|
+| `PC_PORT` | PC 端端口 | `3101` |
+| `MOBILE_CHAT_PORT` | Mobile 端端口 | `3201` |
+| `QIWEI_BASE_URL` | QiWe 开放平台地址 | `http://manager.qiweapi.com/qiwe` |
+| `QIWEI_TOKEN` | QiWe 租户 Token | 在控制台申请 |
+| `DASHSCOPE_API_KEY` | 阿里云百炼 API Key | — |
+| `DASHSCOPE_APP_ID` | 阿里云百炼 App ID | — |
+
+---
+
+## 项目架构
+
+```
+backend/src/
+├── index.ts                    # 总启动器(启动 PC + Mobile)
+├── apps/
+│   ├── pc/                     # PC 端(端口 3101,所有模块共享)
+│   │   ├── app.ts              # 统一 Express 应用(注册所有路由)
+│   │   ├── health/             # 健康检查
+│   │   ├── qiwei/              # 企微 API 代理 [模块1]
+│   │   ├── staff/              # 人员管理 [模块1]
+│   │   ├── community/          # 小区管理 [模块2]
+│   │   ├── room/               # 群管理 [模块2]
+│   │   ├── compliance/         # 合规检查 [模块4]
+│   │   ├── risk/               # 群风控 [模块5]
+│   │   ├── content/            # 内容运营 [模块6]
+│   │   ├── koc/                # KOC与意向 [模块7]
+│   │   ├── dashboard/          # 数据看板 [模块8]
+│   │   ├── sales/              # 经营数据 [模块9]
+│   │   └── workbench/          # 工作台 [模块10]
+│   └── mobile/
+│       └── chat/               # AI 聊天(端口 3201)
+└── shared/                     # 共享层
+    ├── config/env.ts           # 环境变量读取
+    ├── errors/app-error.ts     # 统一错误类型
+    ├── http/response.ts        # 统一响应格式
+    ├── http/error-handler.ts   # 错误处理中间件
+    ├── qiwei/client.ts         # QiWe API 客户端
+    ├── types/page.ts           # 分页类型
+    └── utils/docid.ts          # 文档 ID 解析工具
+```
+
+每个业务模块内部统一分为 4 层:
+- `models/` — 数据模型 / DTO 类型定义
+- `services/` — 业务逻辑层
+- `controllers/` — 请求解析 + 调用 service + 响应
+- `routes/` — URL → controller 映射
+
+---
+
+## 通用约定
+
+### HTTP 方法语义
+
+| 方法 | 语义 |
+|------|------|
+| `GET` | 查询(幂等) |
+| `POST` | 创建 / 触发动作 |
+| `PUT` | 更新整个资源或状态 |
+| `DELETE` | 删除 |
+
+### 分页
+
+分页接口使用 `page` / `pageSize` 查询参数(默认 `page=1, pageSize=20`,上限 100)。
+
+### 错误码
+
+| 错误码 | HTTP 状态 | 说明 |
+|--------|-----------|------|
+| `VALIDATION_ERROR` | 400 | 参数校验不通过 |
+| `NOT_FOUND` | 404 | 资源不存在 |
+| `DUPLICATE` | 409 | 重复数据 |
+| `QIWEI_TOKEN_MISSING` | 500 | 未配置企微 Token |
+| `QIWEI_API_ERROR` | 502 | 企微接口返回错误 |
+| `INTERNAL_ERROR` | 500 | 服务器内部错误 |
+
+### 响应示例
+
+```json
+// 成功
+POST /api/staff
+{
+  "success": true,
+  "data": { "id": 1, "name": "张三", "role": "manager", "storeId": 1, ... },
+  "error": null
+}
+
+// 失败
+POST /api/staff
+{
+  "success": false,
+  "data": null,
+  "error": { "message": "手机号 13800001111 已存在", "code": "STAFF_PHONE_DUPLICATE" }
+}
+```
+
+---
+
+## 1. 健康检查
+
+### `GET /api/health`
+
+返回服务运行状态和已加载模块。
+
+**响应示例:**
+```json
+{
+  "status": "ok",
+  "platform": "pc",
+  "timestamp": "2026-05-21T10:30:00.000Z",
+  "modules": ["qiwei", "staff", "community", "room", "compliance", "risk", "content", "koc", "dashboard", "sales", "workbench"]
+}
+```
+
+---
+
+## 2. 企微 API 代理
+
+> **路由文件:** `apps/pc/qiwei/routes/qiwei.routes.ts`
+> **对应规范:** §4 模块1「企微接入与消息基础模块」
+
+### `POST /api/qiwei/proxy`
+
+通用 QiWe API 代理,前端传入 `method` + `params`,后端转发到 QiWe 开放平台。
+
+**Body:**
+```json
+{
+  "method": "/room/getRoomList",
+  "params": { "guid": "a3318ad6-xxxx", "nextStartIndex": 0 }
+}
+```
+
+---
+
+### `GET /api/qiwei/staff/:guid/status`
+
+查询指定人员的企微在线状态。对应 API-05 `/login/checkLogin`。
+
+**Path:** `guid` — 人员设备 GUID
+
+**响应字段:** `userOnlineStatus`(1=在线, 2=离线)、`userId`、`nickname`、`corpName`
+
+---
+
+### `POST /api/qiwei/staff/batch-status`
+
+批量查询人员在线状态。
+
+**Body:**
+```json
+{ "guids": ["guid1", "guid2", "guid3"] }
+```
+
+---
+
+### `POST /api/qiwei/sync`
+
+触发历史消息同步。对应 API-06 `/msg/syncMsg`。
+
+**Body:**
+```json
+{ "guid": "a3318ad6-xxxx", "msgSeq": 0, "limit": 50 }
+```
+
+**响应:** `{ messages: [...], hasMore: 1, nextSeq: 12345 }`
+
+---
+
+### `POST /api/qiwei/webhook`
+
+接收 QiWe Webhook 推送。对应 API-04 回调。
+**此接口需要公网可达**,通过 API-03 `/client/setCallback` 注册到 QiWe。
+
+处理逻辑:
+1. 解析 `data[]` 中的消息,过滤 `cmd=15000`(普通消息)
+2. 若 `msgType=13`(链接消息),自动解析文档链接 → 登记台账
+3. 同群发现不同 docid → 记录多表异常
+
+---
+
+### `GET /api/qiwei/messages`
+
+查询已存储的消息列表。
+
+**Query:** `roomId`(可选)、`guid`(可选)、`limit`(默认 50)
+
+---
+
+### `GET /api/qiwei/room-docs`
+
+查询群-文档台账列表。**Query:** `roomId`(可选,不传返回全部)
+
+### `GET /api/qiwei/room-doc-anomalies`
+
+查询台账异常记录(多表异常等)。
+
+### `PUT /api/qiwei/room-doc-anomalies/:roomId/resolve`
+
+解决台账异常(人工确认后)。
+
+**Body:**
+```json
+{ "newDocId": "...", "resolution": "keep_new" }
+```
+`resolution`:`keep_new`(以新表为准)/ `keep_old`(保留旧表)
+
+---
+
+## 3. 人员管理
+
+> **路由文件:** `apps/pc/staff/routes/staff.routes.ts`
+> **对应规范:** §4.2「人员企微账号纳入管理」、§4.3「账号是否在线提醒」
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/staff` | 创建人员账号 |
+| `GET` | `/api/staff` | 查询人员列表 |
+| `GET` | `/api/staff/active-guids` | 获取所有启用的 guid |
+| `GET` | `/api/staff/:id` | 查询人员详情 |
+| `PUT` | `/api/staff/:id` | 更新人员信息 |
+| `DELETE` | `/api/staff/:id` | 删除人员 |
+
+### 创建人员
+
+```json
+// POST /api/staff
+{
+  "name": "张三",
+  "role": "manager",
+  "storeId": 1,
+  "phone": "13800001111"
+}
+```
+
+> `role` 可选值:`manager`(店长)、`designer`(设计师)、`operator`(运营)
+>
+> 创建时不绑 guid,人员扫码登录后通过 PUT 回填。
+
+### 查询人员
+
+`GET /api/staff?role=manager&storeId=1&status=1`
+
+### 更新人员(回填 guid、停用等)
+
+```json
+// PUT /api/staff/1
+{ "guid": "a3318ad6-xxxx", "status": 0 }
+```
+
+---
+
+## 4. 小区管理
+
+> **路由文件:** `apps/pc/community/routes/community.routes.ts`
+> **对应规范:** §5.5「录入小区基础档案」、§5.6「维护小区—群—门店对应关系」
+
+### 小区档案
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/communities` | 录入小区 |
+| `GET` | `/api/communities` | 查询小区列表 |
+| `GET` | `/api/communities/:id` | 查询小区详情 |
+| `PUT` | `/api/communities/:id` | 更新小区 |
+| `DELETE` | `/api/communities/:id` | 删除小区 |
+
+```json
+// POST /api/communities
+{
+  "name": "万科城市花园",
+  "totalHouseholds": 1200,
+  "avgPrice": 35000,
+  "deliveryYear": 2022,
+  "storeId": 1,
+  "address": "xx路xx号",
+  "remark": ""
+}
+```
+
+### 群-小区绑定
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/community-room-bindings` | 绑定群到小区 |
+| `GET` | `/api/community-room-bindings` | 查询绑定列表 |
+| `GET` | `/api/community-room-bindings/by-room/:roomId` | 按群号查绑定 |
+| `DELETE` | `/api/community-room-bindings/:id` | 解绑 |
+
+```json
+// POST /api/community-room-bindings
+{ "communityId": 1, "roomId": "10791082xxxx", "storeId": 1 }
+```
+
+> 一个群只能绑定一个小区,重复绑定返回 409 错误。
+
+---
+
+## 5. 群管理
+
+> **路由文件:** `apps/pc/room/routes/room.routes.ts`
+> **对应规范:** §5.1~§5.7
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `GET` | `/api/rooms` | 查询群列表 |
+| `POST` | `/api/rooms/sync` | 触发群同步(API-07+API-08) |
+| `GET` | `/api/rooms/:roomId` | 查询群详情 |
+| `POST` | `/api/rooms/member-events/sync` | 同步进退群事件(API-09) |
+| `GET` | `/api/rooms/member-events` | 查询进退群事件 |
+| `GET` | `/api/rooms/health` | 所有群健康度 |
+| `GET` | `/api/rooms/:roomId/health` | 单个群健康度 |
+
+### 触发群同步
+
+```json
+// POST /api/rooms/sync
+{ "guid": "a3318ad6-xxxx", "nextStartIndex": 0 }
+```
+
+### 同步进退群事件
+
+```json
+// POST /api/rooms/member-events/sync
+{
+  "guid": "a3318ad6-xxxx",
+  "roomId": "10791082xxxx",
+  "startTime": 1708300000,
+  "endTime": 1708400000
+}
+```
+
+### 群健康度
+
+健康度评分(0-100),扣分/加分规则:
+- 7 日无消息:-30
+- 24h 退群 > 3 人:-20
+- 成员 < 5 人:-15
+- 成员增长趋势:+10
+
+响应:
+```json
+{
+  "roomId": "10791082xxxx",
+  "roomName": "万科业主群",
+  "healthScore": 85,
+  "messageCount7d": 120,
+  "leaveCount24h": 0,
+  "memberTrend": "growing",
+  "detail": "群状态正常"
+}
+```
+
+---
+
+## 6. 合规检查
+
+> **路由文件:** `apps/pc/compliance/routes/compliance.routes.ts`
+> **对应规范:** §7「模块 4:沟通记录合规检查模块」
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/compliance/scan` | 触发合规巡检 |
+| `GET` | `/api/compliance/issues` | 查询合规问题列表 |
+| `GET` | `/api/compliance/issues/:id` | 查询问题详情 |
+| `PUT` | `/api/compliance/issues/:id` | 更新问题状态 |
+| `GET` | `/api/compliance/reports` | 合规汇总报表 |
+
+### 问题类型(`type`)
+
+| type | 含义 | 严重程度 |
+|------|------|----------|
+| `missing_doc` | 缺少沟通记录表 | 高 |
+| `not_pinned` | 记录表未置顶 | 中 |
+| `no_doc_in_notice` | 群公告无文档链接 | 低 |
+| `multi_doc` | 群内存在多张表 | 高 |
+| `stale_doc` | 记录表长期未更新 | 中 |
+| `too_brief` | 内容过于简略 | 低 |
+| `format_error` | 格式不规范 | 中 |
+| `required_empty` | 必填项为空 | 高 |
+| `suspected_miss_log` | 疑似漏记 | 中 |
+
+### 触发巡检
+
+```json
+// POST /api/compliance/scan
+{ "roomIds": ["10791082xxxx", "10791083xxxx"] }
+```
+
+### 更新问题状态
+
+```json
+// PUT /api/compliance/issues/1
+{ "status": "in_progress", "note": "已通知设计师整改" }
+```
+
+状态流转:`open` → `in_progress` → `resolved` → `closed`
+
+### 合规报表
+
+`GET /api/compliance/reports?totalRooms=156`
+
+---
+
+## 7. 群风控
+
+> **路由文件:** `apps/pc/risk/routes/risk.routes.ts`
+> **对应规范:** §8「模块 5:群风控与异常干预模块」
+
+### 风险关键词
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/risk/keywords` | 创建关键词 |
+| `GET` | `/api/risk/keywords` | 查询关键词列表 |
+| `POST` | `/api/risk/keywords/scan` | 扫描消息内容 |
+| `PUT` | `/api/risk/keywords/:id` | 更新关键词 |
+| `DELETE` | `/api/risk/keywords/:id` | 删除关键词 |
+
+```json
+// POST /api/risk/keywords
+{
+  "keyword": "退群",
+  "category": "complaint",
+  "severity": 3,
+  "enabled": 1,
+  "remark": "客户投诉敏感词"
+}
+```
+
+`category`:`price`(价格敏感)、`competitor`(竞品)、`complaint`(投诉)、`custom`(自定义)
+
+### 消息扫描
+
+```json
+// POST /api/risk/keywords/scan
+{ "content": "我想退群了", "roomId": "10791082xxxx", "messageId": 12345 }
+```
+
+响应:`{ alerts: [...], hitCount: 1 }`
+
+> 高危预警(severity=3)自动生成工单。
+
+### 预警管理
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `GET` | `/api/risk/alerts` | 查询预警列表 |
+| `PUT` | `/api/risk/alerts/:id` | 处理预警 |
+
+```json
+// PUT /api/risk/alerts/1
+{ "status": "handled", "handlerId": 1, "note": "已私聊安抚客户" }
+```
+
+### 工单管理
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `GET` | `/api/risk/work-orders` | 查询工单列表 |
+| `PUT` | `/api/risk/work-orders/:id` | 更新工单状态 |
+
+```json
+// PUT /api/risk/work-orders/1
+{ "status": "completed", "handleRecord": "已完成整改" }
+```
+
+---
+
+## 8. 内容运营
+
+> **路由文件:** `apps/pc/content/routes/content.routes.ts`
+> **对应规范:** §9「模块 6:社群内容与运营执行模块」
+
+### 素材库
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/content/materials` | 创建素材 |
+| `GET` | `/api/content/materials` | 查询素材列表 |
+| `PUT` | `/api/content/materials/:id` | 更新素材 |
+| `DELETE` | `/api/content/materials/:id` | 删除素材 |
+
+```json
+// POST /api/content/materials
+{
+  "title": "装修预算话术",
+  "type": "script",
+  "content": "您好,根据您的需求...",
+  "tags": ["预算", "话术"],
+  "creatorId": 1
+}
+```
+
+`type`:`script`(话术)、`case`(案例)、`image`(图片)、`video`(视频)、`file`(文件)
+
+### 群发任务
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/content/broadcasts` | 创建群发 |
+| `GET` | `/api/content/broadcasts` | 查询群发列表 |
+| `GET` | `/api/content/broadcasts/:id` | 查群发状态 |
+
+```json
+// POST /api/content/broadcasts
+{
+  "guid": "a3318ad6-xxxx",
+  "sendType": 1,
+  "toIdList": ["10791082xxxx"],
+  "msgList": [{ "type": 0, "msgData": { "content": "本周活动" } }]
+}
+```
+`sendType`:0=外部联系人, 1=外部群
+
+### 运营计划
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/content/plans` | 创建运营计划 |
+| `GET` | `/api/content/plans` | 查询计划列表 |
+| `POST` | `/api/content/plans/:planId/items` | 添加计划项 |
+| `GET` | `/api/content/plans/:planId/items` | 查询计划项 |
+| `GET` | `/api/content/plans/:planId/execution` | 检查执行情况 |
+
+```json
+// POST /api/content/plans
+{
+  "name": "第22周运营计划",
+  "startDate": "2026-05-25",
+  "endDate": "2026-05-31",
+  "ownerId": 1
+}
+
+// POST /api/content/plans/1/items
+{
+  "content": "发送周末活动预告",
+  "scheduledDate": "2026-05-30",
+  "targetRoomIds": ["10791082xxxx"],
+  "materialId": 1
+}
+```
+
+---
+
+## 9. KOC 与意向客户
+
+> **路由文件:** `apps/pc/koc/routes/koc.routes.ts`
+> **对应规范:** §10「模块 7:拉群、KOC 与意向客户模块」
+
+### 渠道管理
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/channels` | 创建渠道 |
+| `GET` | `/api/channels` | 查询渠道列表 |
+| `PUT` | `/api/channels/:id` | 更新渠道 |
+| `DELETE` | `/api/channels/:id` | 删除渠道 |
+
+### 外部联系人
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/contacts/sync` | 同步联系人(API-17+18) |
+| `GET` | `/api/contacts` | 查询联系人列表 |
+| `GET` | `/api/contacts/:userId` | 查询联系人详情 |
+
+```json
+// POST /api/contacts/sync
+{ "guid": "a3318ad6-xxxx", "currentSeq": 0, "limit": 50 }
+```
+
+### KOC 管理
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `GET` | `/api/koc/candidates` | KOC 候选人列表 |
+| `POST` | `/api/koc/label` | 打 KOC 标签(API-19) |
+
+```json
+// POST /api/koc/label
+{ "userId": "168885xxxx", "guid": "a3318ad6-xxxx", "labelId": "140737xxxx" }
+```
+
+### 意向客户
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/intent-leads/detect` | 识别意向话术 |
+| `GET` | `/api/intent-leads` | 查询意向客户列表 |
+| `PUT` | `/api/intent-leads/:id` | 更新意向客户 |
+| `GET` | `/api/intent-tasks` | 查询跟进待办 |
+
+```json
+// POST /api/intent-leads/detect
+{ "userId": "168885xxxx", "roomId": "10791082xxxx", "content": "这个方案多少钱?能约看房吗?" }
+```
+
+> 匹配关键词:价格、多少钱、预算、报价、量房、尺寸、面积、方案、设计、风格……
+>
+> 高意向(匹配 ≥3 个词)自动生成跟进待办。
+
+---
+
+## 10. 数据看板
+
+> **路由文件:** `apps/pc/dashboard/routes/dashboard.routes.ts`
+> **对应规范:** §11「模块 8:数据看板与经营复盘模块」
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `GET` | `/api/dashboard/overview` | 总览看板 |
+| `GET` | `/api/dashboard/community/:communityId` | 小区看板 |
+| `GET` | `/api/dashboard/store/:storeId` | 门店看板 |
+| `GET` | `/api/dashboard/activity/:roomId` | 群活跃度 |
+| `GET` | `/api/dashboard/activity-ranking` | 活跃度排行 |
+| `GET` | `/api/dashboard/reports/weekly` | 周报 |
+| `GET` | `/api/dashboard/reports/monthly` | 月报 |
+
+### 总览看板响应
+
+```json
+{
+  "totalRooms": 156,
+  "totalMembers": 2340,
+  "messageCount7d": 8920,
+  "activeRooms": 142,
+  "complianceRate": 0.85,
+  "openAlerts": 3,
+  "openWorkOrders": 2
+}
+```
+
+---
+
+## 11. 经营数据补录
+
+> **路由文件:** `apps/pc/sales/routes/sales.routes.ts`
+> **对应规范:** §12「模块 9:经营数据手工补录模块」
+
+### 选客数
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/sales/leads` | 录入选客数 |
+| `GET` | `/api/sales/leads` | 查询选客数列表 |
+
+```json
+{ "salespersonId": 1, "recordDate": "2026-05-21", "addCount": 5, "channelId": 1, "remark": "" }
+```
+
+### 订单
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/sales/orders` | 录入订单 |
+| `GET` | `/api/sales/orders` | 查询订单列表 |
+
+```json
+{
+  "salespersonId": 1, "customerId": 1,
+  "amount": 150000, "orderDate": "2026-05-20",
+  "source": "group", "roomId": "10791082xxxx"
+}
+```
+`source`:`group`(群内转化)、`referral`(转介绍)、`walk_in`(自然到店)
+
+### 客户档案
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/sales/customers` | 创建客户档案 |
+| `GET` | `/api/sales/customers` | 查询客户列表 |
+| `GET` | `/api/sales/customers/:id` | 查询客户详情 |
+| `PUT` | `/api/sales/customers/:id` | 更新客户档案 |
+| `POST` | `/api/sales/customers/:customerId/follow-ups` | 添加跟进记录 |
+| `GET` | `/api/sales/customers/:customerId/follow-ups` | 查询跟进记录 |
+
+### 直播数据
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `POST` | `/api/sales/live-stats` | 录入直播数据 |
+| `GET` | `/api/sales/live-stats` | 查询直播数据列表 |
+
+---
+
+## 12. 统一工作台
+
+> **路由文件:** `apps/pc/workbench/routes/workbench.routes.ts`
+> **对应规范:** §13「模块 10:统一工作台与通知闭环模块」
+
+| 方法 | 路径 | 说明 |
+|------|------|------|
+| `GET` | `/api/workbench` | 工作台首页 |
+| `GET` | `/api/notifications` | 查询通知列表 |
+| `GET` | `/api/notifications/template` | 获取通知模板 |
+| `POST` | `/api/notifications/send` | 发送通知 |
+| `GET` | `/api/audit-logs` | 查询审计日志 |
+
+### 工作台首页
+
+`GET /api/workbench?role=manager`
+
+返回:
+```json
+{
+  "compliancePending": 2,
+  "openAlerts": 3,
+  "openWorkOrders": 2,
+  "opsPending": 1,
+  "intentPending": 4,
+  "newMessagesToday": 156
+}
+```
+
+### 发送通知
+
+```json
+// POST /api/notifications/send
+{
+  "type": "compliance",
+  "receiverId": 1,
+  "title": "【整改通知】缺少沟通记录表",
+  "content": "群"万科业主群"尚未登记沟通记录在线文档,请在24小时内完成登记。",
+  "refId": 1
+}
+```
+
+通知模板:`GET /api/notifications/template?issueType=missing_doc&roomName=万科业主群`
+
+### 审计日志
+
+`GET /api/audit-logs?action=notify&limit=50`
+
+---
+
+## 扩展指南
+
+### 新增接口
+
+1. 确定接口属于哪个模块(如人员管理 → `staff/`)
+2. 在 `models/` 定义类型 → `services/` 写逻辑 → `controllers/` 写 handler → `routes/` 注册路由
+3. 在 `apps/pc/app.ts` 中导入新路由(如果是新模块)
+
+### 新增模块
+
+1. 在 `apps/pc/` 下建目录:`models/`、`services/`、`controllers/`、`routes/`
+2. 在 `apps/pc/app.ts` 中 `import` 并 `app.use('/api', router)`
+3. 完成。不需要新增端口、不需要新增 server.ts
+
+### 当前数据存储说明
+
+所有模块使用内存 `Map` 存储(搜索 `TODO: 替换为数据库`),生产环境需替换为 MySQL/PostgreSQL。
+
+---
+
+> **最后更新:** 2026-05-21

+ 111 - 0
doc/开发/QiWe开放平台文档/README.md

@@ -0,0 +1,111 @@
+# QiWe 开放平台文档索引
+
+> 抓取入口: https://doc.qiweapi.com/
+> 页面总数: 106
+
+- [平台介绍](md/平台介绍.md) - https://doc.qiweapi.com
+- [平台介绍](md/平台介绍 2.md) - https://doc.qiweapi.com/doc-7331301
+- [快速开始 ⭐](md/快速开始 ⭐.md) - https://doc.qiweapi.com/doc-7562288
+- [Webhook事件⭐](md/Webhook事件⭐.md) - https://doc.qiweapi.com/doc-7331303
+- [回调结构说明](md/回调结构说明.md) - https://doc.qiweapi.com/doc-7331304
+- [调试指南⭐](md/调试指南⭐.md) - https://doc.qiweapi.com/doc-8483504
+- [常见问题](md/常见问题.md) - https://doc.qiweapi.com/doc-8483505
+- [创建设备(步骤1)](md/创建设备(步骤1).md) - https://doc.qiweapi.com/api-344613850
+- [二维码-获取(步骤2)](md/二维码-获取(步骤2).md) - https://doc.qiweapi.com/api-344613856
+- [二维码状态-检测(步骤3)](md/二维码状态-检测(步骤3).md) - https://doc.qiweapi.com/api-344613857
+- [二维码-code验证(步骤4)](md/二维码-code验证(步骤4).md) - https://doc.qiweapi.com/api-344613858
+- [设置回调地址](md/设置回调地址.md) - https://doc.qiweapi.com/api-354411522
+- [用户登录(免扫码登录)](md/用户登录(免扫码登录).md) - https://doc.qiweapi.com/api-344613859
+- [用户状态](md/用户状态.md) - https://doc.qiweapi.com/api-347221662
+- [恢复设备](md/恢复设备.md) - https://doc.qiweapi.com/api-344613851
+- [停用设备](md/停用设备.md) - https://doc.qiweapi.com/api-344613852
+- [联系人详情-批量](md/联系人详情-批量.md) - https://doc.qiweapi.com/api-344613868
+- [外部联系人分页](md/外部联系人分页.md) - https://doc.qiweapi.com/api-344613869
+- [内部联系人分页](md/内部联系人分页.md) - https://doc.qiweapi.com/api-344613870
+- [联系人搜索](md/联系人搜索.md) - https://doc.qiweapi.com/api-344613871
+- [添加个微](md/添加个微.md) - https://doc.qiweapi.com/api-344613872
+- [添加企微](md/添加企微.md) - https://doc.qiweapi.com/api-344613873
+- [添加群成员好友](md/添加群成员好友.md) - https://doc.qiweapi.com/api-425758709
+- [添加企微名片](md/添加企微名片.md) - https://doc.qiweapi.com/api-344613874
+- [添加删除联系人](md/添加删除联系人.md) - https://doc.qiweapi.com/api-344613875
+- [同意申请](md/同意申请.md) - https://doc.qiweapi.com/api-344613876
+- [外部联系人信息-更新](md/外部联系人信息-更新.md) - https://doc.qiweapi.com/api-344613877
+- [内部联系人信息-更新](md/内部联系人信息-更新.md) - https://doc.qiweapi.com/api-344613878
+- [删除联系人](md/删除联系人.md) - https://doc.qiweapi.com/api-344613879
+- [Openid](md/Openid.md) - https://doc.qiweapi.com/api-344613880
+- [群分页](md/群分页.md) - https://doc.qiweapi.com/api-344613881
+- [群详情-批量](md/群详情-批量.md) - https://doc.qiweapi.com/api-344613882
+- [群成员变动查询](md/群成员变动查询.md) - https://doc.qiweapi.com/api-437674162
+- [创建群](md/创建群.md) - https://doc.qiweapi.com/api-344613883
+- [修改群名称](md/修改群名称.md) - https://doc.qiweapi.com/api-344613884
+- [修改群备注](md/修改群备注.md) - https://doc.qiweapi.com/api-344613885
+- [修改群内昵称](md/修改群内昵称.md) - https://doc.qiweapi.com/api-344613886
+- [邀请/添加成员](md/邀请_添加成员.md) - https://doc.qiweapi.com/api-344613887
+- [禁止群成员互相添加](md/禁止群成员互相添加.md) - https://doc.qiweapi.com/api-437795951
+- [移除成员](md/移除成员.md) - https://doc.qiweapi.com/api-344613888
+- [群二维码](md/群二维码.md) - https://doc.qiweapi.com/api-344613889
+- [修改群公告](md/修改群公告.md) - https://doc.qiweapi.com/api-344613890
+- [添加群管理员](md/添加群管理员.md) - https://doc.qiweapi.com/api-344613891
+- [取消群管理员](md/取消群管理员.md) - https://doc.qiweapi.com/api-344613892
+- [退群](md/退群.md) - https://doc.qiweapi.com/api-344613893
+- [转让群主](md/转让群主.md) - https://doc.qiweapi.com/api-344613894
+- [群解散](md/群解散.md) - https://doc.qiweapi.com/api-344613895
+- [OpenID](md/OpenID 2.md) - https://doc.qiweapi.com/api-344613896
+- [开启群改名](md/开启群改名.md) - https://doc.qiweapi.com/api-344613897
+- [开启群邀请确认](md/开启群邀请确认.md) - https://doc.qiweapi.com/api-344613898
+- [接受群邀请-By链接](md/接受群邀请-By链接.md) - https://doc.qiweapi.com/api-410838558
+- [引用消息发送说明](md/引用消息发送说明.md) - https://doc.qiweapi.com/doc-7331310
+- [本地文件上传](md/本地文件上传.md) - https://doc.qiweapi.com/api-344613899
+- [企微文件异步上传](md/企微文件异步上传.md) - https://doc.qiweapi.com/api-395133885
+- [企微大文件异步上传](md/企微大文件异步上传.md) - https://doc.qiweapi.com/api-389695362
+- [个微文件下载](md/个微文件下载.md) - https://doc.qiweapi.com/api-344613902
+- [企微文件下载](md/企微文件下载.md) - https://doc.qiweapi.com/api-344613901
+- [企微文件异步下载](md/企微文件异步下载.md) - https://doc.qiweapi.com/api-389691087
+- [企微大文件异步下载](md/企微大文件异步下载.md) - https://doc.qiweapi.com/api-453564016
+- [个微文件异步下载](md/个微文件异步下载.md) - https://doc.qiweapi.com/api-399776006
+- [文件上传-URL](md/文件上传-URL.md) - https://doc.qiweapi.com/api-344613900
+- [文件CDN转URL](md/文件CDN转URL.md) - https://doc.qiweapi.com/api-344613903
+- [发送纯文本消息](md/发送纯文本消息.md) - https://doc.qiweapi.com/api-344613906
+- [发送混合文本消息](md/发送混合文本消息.md) - https://doc.qiweapi.com/api-344613907
+- [发送图片消息](md/发送图片消息.md) - https://doc.qiweapi.com/api-344613908
+- [发送GIF表情消息](md/发送GIF表情消息.md) - https://doc.qiweapi.com/api-344613909
+- [发送视频消息](md/发送视频消息.md) - https://doc.qiweapi.com/api-344613910
+- [发送文件消息](md/发送文件消息.md) - https://doc.qiweapi.com/api-344613911
+- [发送语音消息](md/发送语音消息.md) - https://doc.qiweapi.com/api-344613912
+- [发送链接消息](md/发送链接消息.md) - https://doc.qiweapi.com/api-344613913
+- [发送小程序消息](md/发送小程序消息.md) - https://doc.qiweapi.com/api-344613914
+- [发送名片消息](md/发送名片消息.md) - https://doc.qiweapi.com/api-344613915
+- [发送视频号消息](md/发送视频号消息.md) - https://doc.qiweapi.com/api-344613916
+- [发送定位消息](md/发送定位消息.md) - https://doc.qiweapi.com/api-344613917
+- [撤回消息](md/撤回消息.md) - https://doc.qiweapi.com/api-344613918
+- [语音转文字-任务申请](md/语音转文字-任务申请.md) - https://doc.qiweapi.com/api-440192990
+- [语音转文字-任务查询](md/语音转文字-任务查询.md) - https://doc.qiweapi.com/api-440146240
+- [修改消息状态](md/修改消息状态.md) - https://doc.qiweapi.com/api-344613919
+- [群消息置顶-列表](md/群消息置顶-列表.md) - https://doc.qiweapi.com/api-344613920
+- [群消息置顶-添加](md/群消息置顶-添加.md) - https://doc.qiweapi.com/api-344613921
+- [群消息置顶-移除](md/群消息置顶-移除.md) - https://doc.qiweapi.com/api-344613922
+- [群发消息](md/群发消息.md) - https://doc.qiweapi.com/api-344613923
+- [群发消息-状态查询](md/群发消息-状态查询.md) - https://doc.qiweapi.com/api-344613924
+- [群发消息-规则查询](md/群发消息-规则查询.md) - https://doc.qiweapi.com/api-344613925
+- [同步历史消息分页](md/同步历史消息分页.md) - https://doc.qiweapi.com/api-344613926
+- [会话分页](md/会话分页.md) - https://doc.qiweapi.com/api-344613938
+- [会话组-编辑](md/会话组-编辑.md) - https://doc.qiweapi.com/api-344613939
+- [会话组-查询](md/会话组-查询.md) - https://doc.qiweapi.com/api-344613940
+- [朋友圈列表分页](md/朋友圈列表分页.md) - https://doc.qiweapi.com/api-344613927
+- [获取详情-批量](md/获取详情-批量.md) - https://doc.qiweapi.com/api-344613928
+- [文件上传](md/文件上传.md) - https://doc.qiweapi.com/api-344613929
+- [发送朋友圈](md/发送朋友圈.md) - https://doc.qiweapi.com/api-344613930
+- [删除朋友圈](md/删除朋友圈.md) - https://doc.qiweapi.com/api-344613931
+- [点赞/取消赞](md/点赞_取消赞.md) - https://doc.qiweapi.com/api-344613932
+- [评论/追评](md/评论_追评.md) - https://doc.qiweapi.com/api-344613933
+- [评论删除](md/评论删除.md) - https://doc.qiweapi.com/api-344613934
+- [生成二维码](md/生成二维码.md) - https://doc.qiweapi.com/api-344613861
+- [获取个人信息](md/获取个人信息.md) - https://doc.qiweapi.com/api-344613862
+- [更新个人信息](md/更新个人信息.md) - https://doc.qiweapi.com/api-344613863
+- [查询企业信息](md/查询企业信息.md) - https://doc.qiweapi.com/api-344613864
+- [账号退出](md/账号退出.md) - https://doc.qiweapi.com/api-344613865
+- [个人收藏-分页](md/个人收藏-分页.md) - https://doc.qiweapi.com/api-344613866
+- [个人收藏-添加GIF表情](md/个人收藏-添加GIF表情.md) - https://doc.qiweapi.com/api-344613867
+- [列表分页](md/列表分页.md) - https://doc.qiweapi.com/api-361694421
+- [个人标签-增删改](md/个人标签-增删改.md) - https://doc.qiweapi.com/api-344613936
+- [客户标签-增删](md/客户标签-增删.md) - https://doc.qiweapi.com/api-344613937

+ 210 - 0
doc/开发/QiWe开放平台文档/md/OpenID 2.md

@@ -0,0 +1,210 @@
+# OpenID
+
+> 来源: https://doc.qiweapi.com/api-344613896
+
+[![图片](images/api-344613896/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页POST](https://doc.qiweapi.com/api-344613881 "群分页")
+      * [群详情-批量POST](https://doc.qiweapi.com/api-344613882 "群详情-批量")
+      * [群成员变动查询POST](https://doc.qiweapi.com/api-437674162 "群成员变动查询")
+      * [创建群POST](https://doc.qiweapi.com/api-344613883 "创建群")
+      * [修改群名称POST](https://doc.qiweapi.com/api-344613884 "修改群名称")
+      * [修改群备注POST](https://doc.qiweapi.com/api-344613885 "修改群备注")
+      * [修改群内昵称POST](https://doc.qiweapi.com/api-344613886 "修改群内昵称")
+      * [邀请/添加成员POST](https://doc.qiweapi.com/api-344613887 "邀请/添加成员")
+      * [禁止群成员互相添加POST](https://doc.qiweapi.com/api-437795951 "禁止群成员互相添加")
+      * [移除成员POST](https://doc.qiweapi.com/api-344613888 "移除成员")
+      * [群二维码POST](https://doc.qiweapi.com/api-344613889 "群二维码")
+      * [修改群公告POST](https://doc.qiweapi.com/api-344613890 "修改群公告")
+      * [添加群管理员POST](https://doc.qiweapi.com/api-344613891 "添加群管理员")
+      * [取消群管理员POST](https://doc.qiweapi.com/api-344613892 "取消群管理员")
+      * [退群POST](https://doc.qiweapi.com/api-344613893 "退群")
+      * [转让群主POST](https://doc.qiweapi.com/api-344613894 "转让群主")
+      * [群解散POST](https://doc.qiweapi.com/api-344613895 "群解散")
+      * [OpenIDPOST](https://doc.qiweapi.com/api-344613896 "OpenID")
+      * [开启群改名POST](https://doc.qiweapi.com/api-344613897 "开启群改名")
+      * [开启群邀请确认POST](https://doc.qiweapi.com/api-344613898 "开启群邀请确认")
+      * [接受群邀请-By链接POST](https://doc.qiweapi.com/api-410838558 "接受群邀请-By链接")
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# OpenID
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "method": "/room/openid",
+        "params": {
+            "guid": "{{guid}}",
+            "roomId": "1077**********6",
+            "corpAgentId": "56295***777700"
+        }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+        "method": "/room/openid",
+        "params": {
+            "guid": "",
+            "roomId": "1077**********6",
+            "corpAgentId": "56295***777700"
+        }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "code": 0,
+        "data": {
+            "openRoomId": "wrhNLvDA**********HskZE3dtg"
+        },
+        "msg": "成功"
+    }
+```
+修改于 2026-04-14 10:23:10
+[上一页群解散](https://doc.qiweapi.com/api-344613895)[下一页开启群改名](https://doc.qiweapi.com/api-344613897)

+ 6 - 0
doc/开发/QiWe开放平台文档/md/Openid.md

@@ -0,0 +1,6 @@
+# Openid
+
+> 来源: https://doc.qiweapi.com/api-344613880
+
+•
+OpenID:就是官方API的 external_userid(客户的唯一身份证)

+ 6 - 0
doc/开发/QiWe开放平台文档/md/个人收藏-分页.md

@@ -0,0 +1,6 @@
+# 个人收藏-分页
+
+> 来源: https://doc.qiweapi.com/api-344613866
+
+•
+接口返回结果包含 `表情收藏列表` 和 `消息收藏列表`。

+ 5 - 0
doc/开发/QiWe开放平台文档/md/个人收藏-添加GIF表情.md

@@ -0,0 +1,5 @@
+# 个人收藏-添加GIF表情
+
+> 来源: https://doc.qiweapi.com/api-344613867
+
+**提示:** 上传表情文件时,单文件大小不允许超过 **1MB** ,超出限制会导致添加失败

+ 222 - 0
doc/开发/QiWe开放平台文档/md/个人标签-增删改.md

@@ -0,0 +1,222 @@
+# 个人标签-增删改
+
+> 来源: https://doc.qiweapi.com/api-344613936
+
+[![图片](images/api-344613936/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303 "Webhook事件⭐")
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304 "回调结构说明")
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504 "调试指南⭐")
+    * [常见问题](https://doc.qiweapi.com/doc-8483505 "常见问题")
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页POST](https://doc.qiweapi.com/api-361694421 "列表分页")
+      * [个人标签-增删改POST](https://doc.qiweapi.com/api-344613936 "个人标签-增删改")
+      * [客户标签-增删POST](https://doc.qiweapi.com/api-344613937 "客户标签-增删")
+
+复制页面
+# 个人标签-增删改
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/label/editLabel",
+      "params": {
+        "guid": "{{guid}}",
+        "opType": 1,
+        "paramList": [
+          {
+            "labelId": "",
+            "labelSuperId": "14073751403**0383",
+            "labelName": "f3"
+          }
+        ]
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/label/editLabel",
+      "params": {
+        "guid": "",
+        "opType": 1,
+        "paramList": [
+          {
+            "labelId": "",
+            "labelSuperId": "14073751403**0383",
+            "labelName": "f3"
+          }
+        ]
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {

+        "code": 0,

+        "data": [

+            {}

+        ],

+        "msg": "string"

+    }
+```
+修改于 2026-04-02 11:35:25
+[上一页列表分页](https://doc.qiweapi.com/api-361694421)[下一页客户标签-增删](https://doc.qiweapi.com/api-344613937)

+ 5 - 0
doc/开发/QiWe开放平台文档/md/个微文件下载.md

@@ -0,0 +1,5 @@
+# 个微文件下载
+
+> 来源: https://doc.qiweapi.com/api-344613902
+
+下载地址为临时云资源,非官方CDN,7–15天不定期清理,请及时下载。

+ 7 - 0
doc/开发/QiWe开放平台文档/md/个微文件异步下载.md

@@ -0,0 +1,7 @@
+# 个微文件异步下载
+
+> 来源: https://doc.qiweapi.com/api-399776006
+
+下载地址为临时云资源,非官方CDN,7–15天不定期清理,请及时下载。
+异步下载结果通过回调通知,详情查阅[回调结构说明](https://doc.qiweapi.com/doc-7331304)中的 API 异步消息响应。
+根据回调返回的 requestId 值查询,requestId 一致即为对应下载结果。

+ 7 - 0
doc/开发/QiWe开放平台文档/md/二维码-code验证(步骤4).md

@@ -0,0 +1,7 @@
+# 二维码-code验证(步骤4)
+
+> 来源: https://doc.qiweapi.com/api-344613858
+
+#### 收到6位数验证码,执行此接口验证[#](#undefined)
+•
+验证码校验成功后,**必须再次调用`[二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)` 接口**,此时状态码将变为 `Status=2`,代表登录成功。

+ 12 - 0
doc/开发/QiWe开放平台文档/md/二维码-获取(步骤2).md

@@ -0,0 +1,12 @@
+# 二维码-获取(步骤2)
+
+> 来源: https://doc.qiweapi.com/api-344613856
+
+**提示:** 登录模块为必要步骤。如需简化流程,可跳过步骤 1-4,直接通过[控制台在线登录](https://manager.qiweapi.com/nodes)获取设备 id(`guid`)后,再进行接口调用。
+创建设备成功后,通过此接口获取登录凭证
+•
+**首次登录:** 请使用参数 `useCache=false`,获取全新二维码。
+•
+**旧设备异常:** 提示设备不存在/不在线时,先调用[恢复设备](https://doc.qiweapi.com/api-344613851)接口,再获取二维码。
+•
+**恢复设备后:** 请使用参数 `useCache=true`,获取缓存二维码。

+ 11 - 0
doc/开发/QiWe开放平台文档/md/二维码状态-检测(步骤3).md

@@ -0,0 +1,11 @@
+# 二维码状态-检测(步骤3)
+
+> 来源: https://doc.qiweapi.com/api-344613857
+
+**提示:** 获取二维码后,需轮询调用此接口,实时获取用户的扫码进度。
+#### 核心逻辑[#](#undefined)
+•
+**请求频率:** 建议消息间隔2-3秒。
+•
+**生命周期:** 从“获取二维码”开始,到“登录成功/失败”结束。超时将报错。
+Status状态码对照表

+ 6 - 0
doc/开发/QiWe开放平台文档/md/企微大文件异步上传.md

@@ -0,0 +1,6 @@
+# 企微大文件异步上传
+
+> 来源: https://doc.qiweapi.com/api-389695362
+
+异步上传结果通过回调通知,详情查阅[回调结构说明](https://doc.qiweapi.com/doc-7331304)中的 API 异步消息响应。
+根据回调返回的 requestId 值查询,requestId 一致即为对应上传结果。

+ 8 - 0
doc/开发/QiWe开放平台文档/md/企微大文件异步下载.md

@@ -0,0 +1,8 @@
+# 企微大文件异步下载
+
+> 来源: https://doc.qiweapi.com/api-453564016
+
+下载地址为临时云资源,非官方CDN,7–15天不定期清理,请及时下载。
+文件大于20M使用此接口
+异步下载结果通过回调通知,详情查阅[回调结构说明](https://doc.qiweapi.com/doc-7331304)中的 API 异步消息响应。
+根据回调返回的 requestId 值查询,requestId 一致即为对应下载结果。

+ 5 - 0
doc/开发/QiWe开放平台文档/md/企微文件下载.md

@@ -0,0 +1,5 @@
+# 企微文件下载
+
+> 来源: https://doc.qiweapi.com/api-344613901
+
+下载地址为临时云资源,非官方CDN,7–15天不定期清理,请及时下载。

+ 6 - 0
doc/开发/QiWe开放平台文档/md/企微文件异步上传.md

@@ -0,0 +1,6 @@
+# 企微文件异步上传
+
+> 来源: https://doc.qiweapi.com/api-395133885
+
+异步上传结果通过回调通知,详情查阅[回调结构说明](https://doc.qiweapi.com/doc-7331304)中的 API 异步消息响应。
+根据回调返回的 requestId 值查询,requestId 一致即为对应上传结果。

+ 7 - 0
doc/开发/QiWe开放平台文档/md/企微文件异步下载.md

@@ -0,0 +1,7 @@
+# 企微文件异步下载
+
+> 来源: https://doc.qiweapi.com/api-389691087
+
+下载地址为临时云资源,非官方CDN,7–15天不定期清理,请及时下载。
+异步下载结果通过回调通知,详情查阅[回调结构说明](https://doc.qiweapi.com/doc-7331304)中的 API 异步消息响应。
+根据回调返回的 requestId 值查询,requestId 一致即为对应下载结果。

+ 6 - 0
doc/开发/QiWe开放平台文档/md/会话分页.md

@@ -0,0 +1,6 @@
+# 会话分页
+
+> 来源: https://doc.qiweapi.com/api-344613938
+
+•
+该接口不向下兼容,原路径为 `/session/getSessionList`。

+ 229 - 0
doc/开发/QiWe开放平台文档/md/会话组-查询.md

@@ -0,0 +1,229 @@
+# 会话组-查询
+
+> 来源: https://doc.qiweapi.com/api-344613940
+
+[![图片](images/api-344613940/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303 "Webhook事件⭐")
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304 "回调结构说明")
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504 "调试指南⭐")
+    * [常见问题](https://doc.qiweapi.com/doc-8483505 "常见问题")
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页POST](https://doc.qiweapi.com/api-344613938 "会话分页")
+      * [会话组-编辑POST](https://doc.qiweapi.com/api-344613939 "会话组-编辑")
+      * [会话组-查询POST](https://doc.qiweapi.com/api-344613940 "会话组-查询")
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 会话组-查询
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "method": "/session/getSessionList",
+        "params": {
+            "guid": "{{guid}}"
+        }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+        "method": "/session/getSessionList",
+        "params": {
+            "guid": ""
+        }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "code": 0,
+      "data": {
+        "collectList": [
+          {
+            "sessionId": "1087****6179",
+            "sessionType": 1
+          }
+        ],
+        "shieldList": [
+          {
+            "sessionId": "10031",
+            "sessionType": 3
+          }
+        ],
+        "topList": [
+          {
+            "sessionId": "108508****00852",
+            "sessionType": 1
+          }
+        ],
+        "markList": [
+          {
+            "sessionId": "1087246****179",
+            "sessionType": 1
+          }
+        ]
+      },
+      "msg": "成功"
+    }
+```
+修改于 2026-04-02 10:22:02
+[上一页会话组-编辑](https://doc.qiweapi.com/api-344613939)[下一页朋友圈列表分页](https://doc.qiweapi.com/api-344613927)

+ 203 - 0
doc/开发/QiWe开放平台文档/md/会话组-编辑.md

@@ -0,0 +1,203 @@
+# 会话组-编辑
+
+> 来源: https://doc.qiweapi.com/api-344613939
+
+[![图片](images/api-344613939/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303 "Webhook事件⭐")
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304 "回调结构说明")
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504 "调试指南⭐")
+    * [常见问题](https://doc.qiweapi.com/doc-8483505 "常见问题")
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页POST](https://doc.qiweapi.com/api-344613938 "会话分页")
+      * [会话组-编辑POST](https://doc.qiweapi.com/api-344613939 "会话组-编辑")
+      * [会话组-查询POST](https://doc.qiweapi.com/api-344613940 "会话组-查询")
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 会话组-编辑
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/session/setSessionCmd",
+      "params": {
+        "guid": "{{guid}}",
+        "chatId": "27895642800***",
+        "chatType": 1
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/session/setSessionCmd",
+      "params": {
+        "guid": "",
+        "chatId": "27895642800***",
+        "chatType": 1
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+```
+修改于 2026-04-02 10:21:40
+[上一页会话分页](https://doc.qiweapi.com/api-344613938)[下一页会话组-查询](https://doc.qiweapi.com/api-344613940)

+ 210 - 0
doc/开发/QiWe开放平台文档/md/修改消息状态.md

@@ -0,0 +1,210 @@
+# 修改消息状态
+
+> 来源: https://doc.qiweapi.com/api-344613919
+
+[![图片](images/api-344613919/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310 "引用消息发送说明")
+      * 文件与媒体(下载/上传)
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息POST](https://doc.qiweapi.com/api-344613906 "发送纯文本消息")
+      * [发送混合文本消息POST](https://doc.qiweapi.com/api-344613907 "发送混合文本消息")
+      * [发送图片消息POST](https://doc.qiweapi.com/api-344613908 "发送图片消息")
+      * [发送GIF表情消息POST](https://doc.qiweapi.com/api-344613909 "发送GIF表情消息")
+      * [发送视频消息POST](https://doc.qiweapi.com/api-344613910 "发送视频消息")
+      * [发送文件消息POST](https://doc.qiweapi.com/api-344613911 "发送文件消息")
+      * [发送语音消息POST](https://doc.qiweapi.com/api-344613912 "发送语音消息")
+      * [发送链接消息POST](https://doc.qiweapi.com/api-344613913 "发送链接消息")
+      * [发送小程序消息POST](https://doc.qiweapi.com/api-344613914 "发送小程序消息")
+      * [发送名片消息POST](https://doc.qiweapi.com/api-344613915 "发送名片消息")
+      * [发送视频号消息POST](https://doc.qiweapi.com/api-344613916 "发送视频号消息")
+      * [发送定位消息POST](https://doc.qiweapi.com/api-344613917 "发送定位消息")
+      * [撤回消息POST](https://doc.qiweapi.com/api-344613918 "撤回消息")
+      * [语音转文字-任务申请POST](https://doc.qiweapi.com/api-440192990 "语音转文字-任务申请")
+      * [语音转文字-任务查询POST](https://doc.qiweapi.com/api-440146240 "语音转文字-任务查询")
+      * [修改消息状态POST](https://doc.qiweapi.com/api-344613919 "修改消息状态")
+      * [群消息置顶-列表POST](https://doc.qiweapi.com/api-344613920 "群消息置顶-列表")
+      * [群消息置顶-添加POST](https://doc.qiweapi.com/api-344613921 "群消息置顶-添加")
+      * [群消息置顶-移除POST](https://doc.qiweapi.com/api-344613922 "群消息置顶-移除")
+      * [群发消息POST](https://doc.qiweapi.com/api-344613923 "群发消息")
+      * [群发消息-状态查询POST](https://doc.qiweapi.com/api-344613924 "群发消息-状态查询")
+      * [群发消息-规则查询POST](https://doc.qiweapi.com/api-344613925 "群发消息-规则查询")
+      * [同步历史消息分页POST](https://doc.qiweapi.com/api-344613926 "同步历史消息分页")
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 修改消息状态
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/msg/statusModify",
+      "params": {
+        "guid": "{{guid}}",
+        "chatId": "***87495148271",
+        "modifyType": 4
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/msg/statusModify",
+      "params": {
+        "guid": "",
+        "chatId": "***87495148271",
+        "modifyType": 4
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {

+        "code": 0,

+        "data": [

+            {}

+        ],

+        "msg": "string"

+    }
+```
+修改于 2026-04-10 06:02:33
+[上一页语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)[下一页群消息置顶-列表](https://doc.qiweapi.com/api-344613920)

+ 203 - 0
doc/开发/QiWe开放平台文档/md/修改群公告.md

@@ -0,0 +1,203 @@
+# 修改群公告
+
+> 来源: https://doc.qiweapi.com/api-344613890
+
+[![图片](images/api-344613890/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页POST](https://doc.qiweapi.com/api-344613881 "群分页")
+      * [群详情-批量POST](https://doc.qiweapi.com/api-344613882 "群详情-批量")
+      * [群成员变动查询POST](https://doc.qiweapi.com/api-437674162 "群成员变动查询")
+      * [创建群POST](https://doc.qiweapi.com/api-344613883 "创建群")
+      * [修改群名称POST](https://doc.qiweapi.com/api-344613884 "修改群名称")
+      * [修改群备注POST](https://doc.qiweapi.com/api-344613885 "修改群备注")
+      * [修改群内昵称POST](https://doc.qiweapi.com/api-344613886 "修改群内昵称")
+      * [邀请/添加成员POST](https://doc.qiweapi.com/api-344613887 "邀请/添加成员")
+      * [禁止群成员互相添加POST](https://doc.qiweapi.com/api-437795951 "禁止群成员互相添加")
+      * [移除成员POST](https://doc.qiweapi.com/api-344613888 "移除成员")
+      * [群二维码POST](https://doc.qiweapi.com/api-344613889 "群二维码")
+      * [修改群公告POST](https://doc.qiweapi.com/api-344613890 "修改群公告")
+      * [添加群管理员POST](https://doc.qiweapi.com/api-344613891 "添加群管理员")
+      * [取消群管理员POST](https://doc.qiweapi.com/api-344613892 "取消群管理员")
+      * [退群POST](https://doc.qiweapi.com/api-344613893 "退群")
+      * [转让群主POST](https://doc.qiweapi.com/api-344613894 "转让群主")
+      * [群解散POST](https://doc.qiweapi.com/api-344613895 "群解散")
+      * [OpenIDPOST](https://doc.qiweapi.com/api-344613896 "OpenID")
+      * [开启群改名POST](https://doc.qiweapi.com/api-344613897 "开启群改名")
+      * [开启群邀请确认POST](https://doc.qiweapi.com/api-344613898 "开启群邀请确认")
+      * [接受群邀请-By链接POST](https://doc.qiweapi.com/api-410838558 "接受群邀请-By链接")
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 修改群公告
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/room/modifyRoomNotice",
+      "params": {
+        "guid": "{{guid}}",
+        "roomId": "108144***9970753",
+        "notice": "test-notice"
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/room/modifyRoomNotice",
+      "params": {
+        "guid": "",
+        "roomId": "108144***9970753",
+        "notice": "test-notice"
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+```
+修改于 2026-04-17 02:53:30
+[上一页群二维码](https://doc.qiweapi.com/api-344613889)[下一页添加群管理员](https://doc.qiweapi.com/api-344613891)

+ 203 - 0
doc/开发/QiWe开放平台文档/md/修改群内昵称.md

@@ -0,0 +1,203 @@
+# 修改群内昵称
+
+> 来源: https://doc.qiweapi.com/api-344613886
+
+[![图片](images/api-344613886/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页POST](https://doc.qiweapi.com/api-344613881 "群分页")
+      * [群详情-批量POST](https://doc.qiweapi.com/api-344613882 "群详情-批量")
+      * [群成员变动查询POST](https://doc.qiweapi.com/api-437674162 "群成员变动查询")
+      * [创建群POST](https://doc.qiweapi.com/api-344613883 "创建群")
+      * [修改群名称POST](https://doc.qiweapi.com/api-344613884 "修改群名称")
+      * [修改群备注POST](https://doc.qiweapi.com/api-344613885 "修改群备注")
+      * [修改群内昵称POST](https://doc.qiweapi.com/api-344613886 "修改群内昵称")
+      * [邀请/添加成员POST](https://doc.qiweapi.com/api-344613887 "邀请/添加成员")
+      * [禁止群成员互相添加POST](https://doc.qiweapi.com/api-437795951 "禁止群成员互相添加")
+      * [移除成员POST](https://doc.qiweapi.com/api-344613888 "移除成员")
+      * [群二维码POST](https://doc.qiweapi.com/api-344613889 "群二维码")
+      * [修改群公告POST](https://doc.qiweapi.com/api-344613890 "修改群公告")
+      * [添加群管理员POST](https://doc.qiweapi.com/api-344613891 "添加群管理员")
+      * [取消群管理员POST](https://doc.qiweapi.com/api-344613892 "取消群管理员")
+      * [退群POST](https://doc.qiweapi.com/api-344613893 "退群")
+      * [转让群主POST](https://doc.qiweapi.com/api-344613894 "转让群主")
+      * [群解散POST](https://doc.qiweapi.com/api-344613895 "群解散")
+      * [OpenIDPOST](https://doc.qiweapi.com/api-344613896 "OpenID")
+      * [开启群改名POST](https://doc.qiweapi.com/api-344613897 "开启群改名")
+      * [开启群邀请确认POST](https://doc.qiweapi.com/api-344613898 "开启群邀请确认")
+      * [接受群邀请-By链接POST](https://doc.qiweapi.com/api-410838558 "接受群邀请-By链接")
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 修改群内昵称
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/room/modifyRoomNickname",
+      "params": {
+        "guid": "{{guid}}",
+        "roomId": "10814496149970753",
+        "nickname": "新昵称"
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/room/modifyRoomNickname",
+      "params": {
+        "guid": "",
+        "roomId": "10814496149970753",
+        "nickname": "新昵称"
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+```
+修改于 2026-04-02 08:44:44
+[上一页修改群备注](https://doc.qiweapi.com/api-344613885)[下一页邀请/添加成员](https://doc.qiweapi.com/api-344613887)

+ 203 - 0
doc/开发/QiWe开放平台文档/md/修改群名称.md

@@ -0,0 +1,203 @@
+# 修改群名称
+
+> 来源: https://doc.qiweapi.com/api-344613884
+
+[![图片](images/api-344613884/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页POST](https://doc.qiweapi.com/api-344613881 "群分页")
+      * [群详情-批量POST](https://doc.qiweapi.com/api-344613882 "群详情-批量")
+      * [群成员变动查询POST](https://doc.qiweapi.com/api-437674162 "群成员变动查询")
+      * [创建群POST](https://doc.qiweapi.com/api-344613883 "创建群")
+      * [修改群名称POST](https://doc.qiweapi.com/api-344613884 "修改群名称")
+      * [修改群备注POST](https://doc.qiweapi.com/api-344613885 "修改群备注")
+      * [修改群内昵称POST](https://doc.qiweapi.com/api-344613886 "修改群内昵称")
+      * [邀请/添加成员POST](https://doc.qiweapi.com/api-344613887 "邀请/添加成员")
+      * [禁止群成员互相添加POST](https://doc.qiweapi.com/api-437795951 "禁止群成员互相添加")
+      * [移除成员POST](https://doc.qiweapi.com/api-344613888 "移除成员")
+      * [群二维码POST](https://doc.qiweapi.com/api-344613889 "群二维码")
+      * [修改群公告POST](https://doc.qiweapi.com/api-344613890 "修改群公告")
+      * [添加群管理员POST](https://doc.qiweapi.com/api-344613891 "添加群管理员")
+      * [取消群管理员POST](https://doc.qiweapi.com/api-344613892 "取消群管理员")
+      * [退群POST](https://doc.qiweapi.com/api-344613893 "退群")
+      * [转让群主POST](https://doc.qiweapi.com/api-344613894 "转让群主")
+      * [群解散POST](https://doc.qiweapi.com/api-344613895 "群解散")
+      * [OpenIDPOST](https://doc.qiweapi.com/api-344613896 "OpenID")
+      * [开启群改名POST](https://doc.qiweapi.com/api-344613897 "开启群改名")
+      * [开启群邀请确认POST](https://doc.qiweapi.com/api-344613898 "开启群邀请确认")
+      * [接受群邀请-By链接POST](https://doc.qiweapi.com/api-410838558 "接受群邀请-By链接")
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 修改群名称
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/room/modifyRoomName",
+      "params": {
+        "guid": "{{guid}}",
+        "roomId": "10814496149970753",
+        "name": "test-update-name"
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/room/modifyRoomName",
+      "params": {
+        "guid": "",
+        "roomId": "10814496149970753",
+        "name": "test-update-name"
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+```
+修改于 2026-03-17 05:24:17
+[上一页创建群](https://doc.qiweapi.com/api-344613883)[下一页修改群备注](https://doc.qiweapi.com/api-344613885)

+ 6 - 0
doc/开发/QiWe开放平台文档/md/修改群备注.md

@@ -0,0 +1,6 @@
+# 修改群备注
+
+> 来源: https://doc.qiweapi.com/api-344613885
+
+•
+群备注仅自己可见

+ 12 - 0
doc/开发/QiWe开放平台文档/md/停用设备.md

@@ -0,0 +1,12 @@
+# 停用设备
+
+> 来源: https://doc.qiweapi.com/api-344613852
+
+#### 设备切换[#](#undefined)
+如需更换新设备或重新开始流程,请遵循 **“先停再建”** 原则:
+•
+**第一步:停用设备**  
+调用「停用设备」接口,释放当前占用的资源。
+•
+**第二步:创建设备**  
+调用 `[创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)` 接口,初始化全新的设备环境。

+ 205 - 0
doc/开发/QiWe开放平台文档/md/内部联系人信息-更新.md

@@ -0,0 +1,205 @@
+# 内部联系人信息-更新
+
+> 来源: https://doc.qiweapi.com/api-344613878
+
+[![图片](images/api-344613878/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303 "Webhook事件⭐")
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304 "回调结构说明")
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504 "调试指南⭐")
+    * [常见问题](https://doc.qiweapi.com/doc-8483505 "常见问题")
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量POST](https://doc.qiweapi.com/api-344613868 "联系人详情-批量")
+      * [外部联系人分页POST](https://doc.qiweapi.com/api-344613869 "外部联系人分页")
+      * [内部联系人分页POST](https://doc.qiweapi.com/api-344613870 "内部联系人分页")
+      * [联系人搜索POST](https://doc.qiweapi.com/api-344613871 "联系人搜索")
+      * [添加个微POST](https://doc.qiweapi.com/api-344613872 "添加个微")
+      * [添加企微POST](https://doc.qiweapi.com/api-344613873 "添加企微")
+      * [添加群成员好友POST](https://doc.qiweapi.com/api-425758709 "添加群成员好友")
+      * [添加企微名片POST](https://doc.qiweapi.com/api-344613874 "添加企微名片")
+      * [添加删除联系人POST](https://doc.qiweapi.com/api-344613875 "添加删除联系人")
+      * [同意申请POST](https://doc.qiweapi.com/api-344613876 "同意申请")
+      * [外部联系人信息-更新POST](https://doc.qiweapi.com/api-344613877 "外部联系人信息-更新")
+      * [内部联系人信息-更新POST](https://doc.qiweapi.com/api-344613878 "内部联系人信息-更新")
+      * [删除联系人POST](https://doc.qiweapi.com/api-344613879 "删除联系人")
+      * [OpenidPOST](https://doc.qiweapi.com/api-344613880 "Openid")
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 内部联系人信息-更新
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/contact/updateWxWorkContact",
+      "params": {
+        "guid": "{{guid}}",
+        "userId": "1688**********",
+        "remark": "22222ffffffffxxxx",
+        "desc": "222222xxxxxx"
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/contact/updateWxWorkContact",
+      "params": {
+        "guid": "",
+        "userId": "1688**********",
+        "remark": "22222ffffffffxxxx",
+        "desc": "222222xxxxxx"
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+```
+修改于 2026-04-02 07:18:10
+[上一页外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)[下一页删除联系人](https://doc.qiweapi.com/api-344613879)

+ 218 - 0
doc/开发/QiWe开放平台文档/md/内部联系人分页.md

@@ -0,0 +1,218 @@
+# 内部联系人分页
+
+> 来源: https://doc.qiweapi.com/api-344613870
+
+[![图片](images/api-344613870/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303 "Webhook事件⭐")
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304 "回调结构说明")
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504 "调试指南⭐")
+    * [常见问题](https://doc.qiweapi.com/doc-8483505 "常见问题")
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量POST](https://doc.qiweapi.com/api-344613868 "联系人详情-批量")
+      * [外部联系人分页POST](https://doc.qiweapi.com/api-344613869 "外部联系人分页")
+      * [内部联系人分页POST](https://doc.qiweapi.com/api-344613870 "内部联系人分页")
+      * [联系人搜索POST](https://doc.qiweapi.com/api-344613871 "联系人搜索")
+      * [添加个微POST](https://doc.qiweapi.com/api-344613872 "添加个微")
+      * [添加企微POST](https://doc.qiweapi.com/api-344613873 "添加企微")
+      * [添加群成员好友POST](https://doc.qiweapi.com/api-425758709 "添加群成员好友")
+      * [添加企微名片POST](https://doc.qiweapi.com/api-344613874 "添加企微名片")
+      * [添加删除联系人POST](https://doc.qiweapi.com/api-344613875 "添加删除联系人")
+      * [同意申请POST](https://doc.qiweapi.com/api-344613876 "同意申请")
+      * [外部联系人信息-更新POST](https://doc.qiweapi.com/api-344613877 "外部联系人信息-更新")
+      * [内部联系人信息-更新POST](https://doc.qiweapi.com/api-344613878 "内部联系人信息-更新")
+      * [删除联系人POST](https://doc.qiweapi.com/api-344613879 "删除联系人")
+      * [OpenidPOST](https://doc.qiweapi.com/api-344613880 "Openid")
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 内部联系人分页
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/contact/getWxWorkContactList",
+      "params": {
+        "guid": "{{guid}}",
+        "clientVersion": "",
+        "limit": 10
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/contact/getWxWorkContactList",
+      "params": {
+        "guid": "",
+        "clientVersion": "",
+        "limit": 10
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "code": 0,
+        "data": {
+            "contactCount": 1,
+            "contactList": [
+                {
+                    "partyId": "16888523**********",
+                    "userId": "1688852**********"
+                }
+            ],
+            "currentVersion": "6865**********644481_6943**********857_6_64269897897**********411_0_7198609256**********_0",
+            "hasMore": false
+        },
+        "msg": "成功"
+    }
+```
+修改于 2026-04-02 06:57:36
+[上一页外部联系人分页](https://doc.qiweapi.com/api-344613869)[下一页联系人搜索](https://doc.qiweapi.com/api-344613871)

+ 232 - 0
doc/开发/QiWe开放平台文档/md/列表分页.md

@@ -0,0 +1,232 @@
+# 列表分页
+
+> 来源: https://doc.qiweapi.com/api-361694421
+
+[![图片](images/api-361694421/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303 "Webhook事件⭐")
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304 "回调结构说明")
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504 "调试指南⭐")
+    * [常见问题](https://doc.qiweapi.com/doc-8483505 "常见问题")
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页POST](https://doc.qiweapi.com/api-361694421 "列表分页")
+      * [个人标签-增删改POST](https://doc.qiweapi.com/api-344613936 "个人标签-增删改")
+      * [客户标签-增删POST](https://doc.qiweapi.com/api-344613937 "客户标签-增删")
+
+复制页面
+# 列表分页
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/label/syncLabelList",
+      "params": {
+        "guid": "{{guid}}",
+        "currentSeq": 0,
+        "labelType": 2
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/label/syncLabelList",
+      "params": {
+        "guid": "",
+        "currentSeq": 0,
+        "labelType": 2
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "code": 0,
+      "data": {
+        "currentSeq": 703640,
+        "hasMore": 0,
+        "labelCount": 6,
+        "labelList": [
+          {
+            "createTime": 1598406448,
+            "dataType": 2,
+            "groupId": "0",
+            "labelId": "1407375169760**43",
+            "labelType": 1,
+            "name": "5a6i5oi3562J57qn",
+            "isDeleted": 0
+          },
+          {
+            "createTime": 1598406448,
+            "dataType": 1,
+            "groupId": "1407375169760**43",
+            "labelId": "14073751697605**4",
+            "labelType": 1,
+            "name": "5LiA6Iis",
+            "isDeleted": 0
+          }
+        ]
+      },
+      "msg": "成功"
+    }
+```
+修改于 2026-04-02 11:34:09
+[上一页个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)[下一页个人标签-增删改](https://doc.qiweapi.com/api-344613936)

+ 225 - 0
doc/开发/QiWe开放平台文档/md/创建群.md

@@ -0,0 +1,225 @@
+# 创建群
+
+> 来源: https://doc.qiweapi.com/api-344613883
+
+[![图片](images/api-344613883/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页POST](https://doc.qiweapi.com/api-344613881 "群分页")
+      * [群详情-批量POST](https://doc.qiweapi.com/api-344613882 "群详情-批量")
+      * [群成员变动查询POST](https://doc.qiweapi.com/api-437674162 "群成员变动查询")
+      * [创建群POST](https://doc.qiweapi.com/api-344613883 "创建群")
+      * [修改群名称POST](https://doc.qiweapi.com/api-344613884 "修改群名称")
+      * [修改群备注POST](https://doc.qiweapi.com/api-344613885 "修改群备注")
+      * [修改群内昵称POST](https://doc.qiweapi.com/api-344613886 "修改群内昵称")
+      * [邀请/添加成员POST](https://doc.qiweapi.com/api-344613887 "邀请/添加成员")
+      * [禁止群成员互相添加POST](https://doc.qiweapi.com/api-437795951 "禁止群成员互相添加")
+      * [移除成员POST](https://doc.qiweapi.com/api-344613888 "移除成员")
+      * [群二维码POST](https://doc.qiweapi.com/api-344613889 "群二维码")
+      * [修改群公告POST](https://doc.qiweapi.com/api-344613890 "修改群公告")
+      * [添加群管理员POST](https://doc.qiweapi.com/api-344613891 "添加群管理员")
+      * [取消群管理员POST](https://doc.qiweapi.com/api-344613892 "取消群管理员")
+      * [退群POST](https://doc.qiweapi.com/api-344613893 "退群")
+      * [转让群主POST](https://doc.qiweapi.com/api-344613894 "转让群主")
+      * [群解散POST](https://doc.qiweapi.com/api-344613895 "群解散")
+      * [OpenIDPOST](https://doc.qiweapi.com/api-344613896 "OpenID")
+      * [开启群改名POST](https://doc.qiweapi.com/api-344613897 "开启群改名")
+      * [开启群邀请确认POST](https://doc.qiweapi.com/api-344613898 "开启群邀请确认")
+      * [接受群邀请-By链接POST](https://doc.qiweapi.com/api-410838558 "接受群邀请-By链接")
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 创建群
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/room/createRoom",
+      "params": {
+        "guid": "{{guid}}",
+        "isOuterRoom": 1,
+        "memberList": [
+          "168885****57534",
+          "168885****64987",
+          "788135****45545"
+        ]
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/room/createRoom",
+      "params": {
+        "guid": "",
+        "isOuterRoom": 1,
+        "memberList": [
+          "168885****57534",
+          "168885****64987",
+          "788135****45545"
+        ]
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "code": 0,
+        "data": {
+            "memberList": [
+                "788130**********",
+                "16888**********91",
+                "1688850**********1"
+            ],
+            "roomCreatetime": 1709637022,
+            "roomCreatorId": "1688852**********1",
+            "roomId": "108854**********6"
+        },
+        "msg": "成功"
+    }
+```
+修改于 2026-03-26 02:45:08
+[上一页群成员变动查询](https://doc.qiweapi.com/api-437674162)[下一页修改群名称](https://doc.qiweapi.com/api-344613884)

+ 8 - 0
doc/开发/QiWe开放平台文档/md/创建设备(步骤1).md

@@ -0,0 +1,8 @@
+# 创建设备(步骤1)
+
+> 来源: https://doc.qiweapi.com/api-344613850
+
+**提示:** 登录模块为必要步骤。如需简化流程,可跳过步骤 1-4,直接通过[控制台在线登录](https://manager.qiweapi.com/nodes)获取设备 id(`guid`)后,再进行接口调用。  
+⚠️ 重要提醒:创建/恢复设备5分钟内没有登录,此实例会自动清理
+登录流程图
+必看说明

+ 201 - 0
doc/开发/QiWe开放平台文档/md/删除朋友圈.md

@@ -0,0 +1,201 @@
+# 删除朋友圈
+
+> 来源: https://doc.qiweapi.com/api-344613931
+
+[![图片](images/api-344613931/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303 "Webhook事件⭐")
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304 "回调结构说明")
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504 "调试指南⭐")
+    * [常见问题](https://doc.qiweapi.com/doc-8483505 "常见问题")
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页POST](https://doc.qiweapi.com/api-344613927 "朋友圈列表分页")
+      * [获取详情-批量POST](https://doc.qiweapi.com/api-344613928 "获取详情-批量")
+      * [文件上传POST](https://doc.qiweapi.com/api-344613929 "文件上传")
+      * [发送朋友圈POST](https://doc.qiweapi.com/api-344613930 "发送朋友圈")
+      * [删除朋友圈POST](https://doc.qiweapi.com/api-344613931 "删除朋友圈")
+      * [点赞/取消赞POST](https://doc.qiweapi.com/api-344613932 "点赞/取消赞")
+      * [评论/追评POST](https://doc.qiweapi.com/api-344613933 "评论/追评")
+      * [评论删除POST](https://doc.qiweapi.com/api-344613934 "评论删除")
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 删除朋友圈
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/sns/deleteSns",
+      "params": {
+        "guid": "{{guid}}",
+        "snsId": 7342863033058568888
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/sns/deleteSns",
+      "params": {
+        "guid": "",
+        "snsId": 7342863033058568888
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+```
+修改于 2025-10-09 03:33:19
+[上一页发送朋友圈](https://doc.qiweapi.com/api-344613930)[下一页点赞/取消赞](https://doc.qiweapi.com/api-344613932)

+ 201 - 0
doc/开发/QiWe开放平台文档/md/删除联系人.md

@@ -0,0 +1,201 @@
+# 删除联系人
+
+> 来源: https://doc.qiweapi.com/api-344613879
+
+[![图片](images/api-344613879/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303 "Webhook事件⭐")
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304 "回调结构说明")
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504 "调试指南⭐")
+    * [常见问题](https://doc.qiweapi.com/doc-8483505 "常见问题")
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量POST](https://doc.qiweapi.com/api-344613868 "联系人详情-批量")
+      * [外部联系人分页POST](https://doc.qiweapi.com/api-344613869 "外部联系人分页")
+      * [内部联系人分页POST](https://doc.qiweapi.com/api-344613870 "内部联系人分页")
+      * [联系人搜索POST](https://doc.qiweapi.com/api-344613871 "联系人搜索")
+      * [添加个微POST](https://doc.qiweapi.com/api-344613872 "添加个微")
+      * [添加企微POST](https://doc.qiweapi.com/api-344613873 "添加企微")
+      * [添加群成员好友POST](https://doc.qiweapi.com/api-425758709 "添加群成员好友")
+      * [添加企微名片POST](https://doc.qiweapi.com/api-344613874 "添加企微名片")
+      * [添加删除联系人POST](https://doc.qiweapi.com/api-344613875 "添加删除联系人")
+      * [同意申请POST](https://doc.qiweapi.com/api-344613876 "同意申请")
+      * [外部联系人信息-更新POST](https://doc.qiweapi.com/api-344613877 "外部联系人信息-更新")
+      * [内部联系人信息-更新POST](https://doc.qiweapi.com/api-344613878 "内部联系人信息-更新")
+      * [删除联系人POST](https://doc.qiweapi.com/api-344613879 "删除联系人")
+      * [OpenidPOST](https://doc.qiweapi.com/api-344613880 "Openid")
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310)
+      * [文件与媒体(下载/上传)]()
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息](https://doc.qiweapi.com/api-344613906)
+      * [发送混合文本消息](https://doc.qiweapi.com/api-344613907)
+      * [发送图片消息](https://doc.qiweapi.com/api-344613908)
+      * [发送GIF表情消息](https://doc.qiweapi.com/api-344613909)
+      * [发送视频消息](https://doc.qiweapi.com/api-344613910)
+      * [发送文件消息](https://doc.qiweapi.com/api-344613911)
+      * [发送语音消息](https://doc.qiweapi.com/api-344613912)
+      * [发送链接消息](https://doc.qiweapi.com/api-344613913)
+      * [发送小程序消息](https://doc.qiweapi.com/api-344613914)
+      * [发送名片消息](https://doc.qiweapi.com/api-344613915)
+      * [发送视频号消息](https://doc.qiweapi.com/api-344613916)
+      * [发送定位消息](https://doc.qiweapi.com/api-344613917)
+      * [撤回消息](https://doc.qiweapi.com/api-344613918)
+      * [语音转文字-任务申请](https://doc.qiweapi.com/api-440192990)
+      * [语音转文字-任务查询](https://doc.qiweapi.com/api-440146240)
+      * [修改消息状态](https://doc.qiweapi.com/api-344613919)
+      * [群消息置顶-列表](https://doc.qiweapi.com/api-344613920)
+      * [群消息置顶-添加](https://doc.qiweapi.com/api-344613921)
+      * [群消息置顶-移除](https://doc.qiweapi.com/api-344613922)
+      * [群发消息](https://doc.qiweapi.com/api-344613923)
+      * [群发消息-状态查询](https://doc.qiweapi.com/api-344613924)
+      * [群发消息-规则查询](https://doc.qiweapi.com/api-344613925)
+      * [同步历史消息分页](https://doc.qiweapi.com/api-344613926)
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 删除联系人
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/contact/deleteContact",
+      "params": {
+        "guid": "{{guid}}",
+        "userId": "7881**********"
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/contact/deleteContact",
+      "params": {
+        "guid": "",
+        "userId": "7881**********"
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+```
+修改于 2026-04-02 07:18:43
+[上一页内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)[下一页Openid](https://doc.qiweapi.com/api-344613880)

+ 12 - 0
doc/开发/QiWe开放平台文档/md/发送GIF表情消息.md

@@ -0,0 +1,12 @@
+# 发送GIF表情消息
+
+> 来源: https://doc.qiweapi.com/api-344613909
+
+#### 发送GIF表情步骤方法一[#](#undefined)
+•
+GIF图片上传:调用 `[文件上传](https://doc.qiweapi.com/api-344613899)` 接口。
+•
+获取GIF的CdnUrl:调用 `[文件CDN转URL](https://doc.qiweapi.com/api-344613903)` 接口。
+#### 发送GIF表情步骤方法二[#](#undefined)
+•
+获取收藏表情列表:通过调用 `收藏分页` API,过滤出 `表情收藏列表`。

+ 215 - 0
doc/开发/QiWe开放平台文档/md/发送名片消息.md

@@ -0,0 +1,215 @@
+# 发送名片消息
+
+> 来源: https://doc.qiweapi.com/api-344613915
+
+[![图片](images/api-344613915/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310 "引用消息发送说明")
+      * 文件与媒体(下载/上传)
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息POST](https://doc.qiweapi.com/api-344613906 "发送纯文本消息")
+      * [发送混合文本消息POST](https://doc.qiweapi.com/api-344613907 "发送混合文本消息")
+      * [发送图片消息POST](https://doc.qiweapi.com/api-344613908 "发送图片消息")
+      * [发送GIF表情消息POST](https://doc.qiweapi.com/api-344613909 "发送GIF表情消息")
+      * [发送视频消息POST](https://doc.qiweapi.com/api-344613910 "发送视频消息")
+      * [发送文件消息POST](https://doc.qiweapi.com/api-344613911 "发送文件消息")
+      * [发送语音消息POST](https://doc.qiweapi.com/api-344613912 "发送语音消息")
+      * [发送链接消息POST](https://doc.qiweapi.com/api-344613913 "发送链接消息")
+      * [发送小程序消息POST](https://doc.qiweapi.com/api-344613914 "发送小程序消息")
+      * [发送名片消息POST](https://doc.qiweapi.com/api-344613915 "发送名片消息")
+      * [发送视频号消息POST](https://doc.qiweapi.com/api-344613916 "发送视频号消息")
+      * [发送定位消息POST](https://doc.qiweapi.com/api-344613917 "发送定位消息")
+      * [撤回消息POST](https://doc.qiweapi.com/api-344613918 "撤回消息")
+      * [语音转文字-任务申请POST](https://doc.qiweapi.com/api-440192990 "语音转文字-任务申请")
+      * [语音转文字-任务查询POST](https://doc.qiweapi.com/api-440146240 "语音转文字-任务查询")
+      * [修改消息状态POST](https://doc.qiweapi.com/api-344613919 "修改消息状态")
+      * [群消息置顶-列表POST](https://doc.qiweapi.com/api-344613920 "群消息置顶-列表")
+      * [群消息置顶-添加POST](https://doc.qiweapi.com/api-344613921 "群消息置顶-添加")
+      * [群消息置顶-移除POST](https://doc.qiweapi.com/api-344613922 "群消息置顶-移除")
+      * [群发消息POST](https://doc.qiweapi.com/api-344613923 "群发消息")
+      * [群发消息-状态查询POST](https://doc.qiweapi.com/api-344613924 "群发消息-状态查询")
+      * [群发消息-规则查询POST](https://doc.qiweapi.com/api-344613925 "群发消息-规则查询")
+      * [同步历史消息分页POST](https://doc.qiweapi.com/api-344613926 "同步历史消息分页")
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 发送名片消息
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/msg/sendPersonalCard",
+      "params": {
+        "guid": "{{guid}}",
+        "sharedId": "7881302799122145",
+        "toId": "{{toId}}"
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/msg/sendPersonalCard",
+      "params": {
+        "guid": "",
+        "sharedId": "7881302799122145",
+        "toId": ""
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {

+        "code": 0,

+        "data": {

+            "isSendSuccess": 0,

+            "msgServerId": 0,

+            "msgType": 0,

+            "msgUniqueIdentifier": "string",

+            "seq": 0,

+            "timestamp": 0

+        },

+        "msg": "string"

+    }
+```
+修改于 2026-04-08 08:43:20
+[上一页发送小程序消息](https://doc.qiweapi.com/api-344613914)[下一页发送视频号消息](https://doc.qiweapi.com/api-344613916)

+ 9 - 0
doc/开发/QiWe开放平台文档/md/发送图片消息.md

@@ -0,0 +1,9 @@
+# 发送图片消息
+
+> 来源: https://doc.qiweapi.com/api-344613908
+
+#### 图片格式 JPG[#](#undefined)
+•
+图片消息参数:通过接口 `[文件上传](https://doc.qiweapi.com/api-344613899)` 或 `[文件上传-URL](https://doc.qiweapi.com/api-344613900)` 获取发送图片参数。
+•
+也可通过回调获取相应参数。

+ 221 - 0
doc/开发/QiWe开放平台文档/md/发送定位消息.md

@@ -0,0 +1,221 @@
+# 发送定位消息
+
+> 来源: https://doc.qiweapi.com/api-344613917
+
+[![图片](images/api-344613917/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310 "引用消息发送说明")
+      * 文件与媒体(下载/上传)
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息POST](https://doc.qiweapi.com/api-344613906 "发送纯文本消息")
+      * [发送混合文本消息POST](https://doc.qiweapi.com/api-344613907 "发送混合文本消息")
+      * [发送图片消息POST](https://doc.qiweapi.com/api-344613908 "发送图片消息")
+      * [发送GIF表情消息POST](https://doc.qiweapi.com/api-344613909 "发送GIF表情消息")
+      * [发送视频消息POST](https://doc.qiweapi.com/api-344613910 "发送视频消息")
+      * [发送文件消息POST](https://doc.qiweapi.com/api-344613911 "发送文件消息")
+      * [发送语音消息POST](https://doc.qiweapi.com/api-344613912 "发送语音消息")
+      * [发送链接消息POST](https://doc.qiweapi.com/api-344613913 "发送链接消息")
+      * [发送小程序消息POST](https://doc.qiweapi.com/api-344613914 "发送小程序消息")
+      * [发送名片消息POST](https://doc.qiweapi.com/api-344613915 "发送名片消息")
+      * [发送视频号消息POST](https://doc.qiweapi.com/api-344613916 "发送视频号消息")
+      * [发送定位消息POST](https://doc.qiweapi.com/api-344613917 "发送定位消息")
+      * [撤回消息POST](https://doc.qiweapi.com/api-344613918 "撤回消息")
+      * [语音转文字-任务申请POST](https://doc.qiweapi.com/api-440192990 "语音转文字-任务申请")
+      * [语音转文字-任务查询POST](https://doc.qiweapi.com/api-440146240 "语音转文字-任务查询")
+      * [修改消息状态POST](https://doc.qiweapi.com/api-344613919 "修改消息状态")
+      * [群消息置顶-列表POST](https://doc.qiweapi.com/api-344613920 "群消息置顶-列表")
+      * [群消息置顶-添加POST](https://doc.qiweapi.com/api-344613921 "群消息置顶-添加")
+      * [群消息置顶-移除POST](https://doc.qiweapi.com/api-344613922 "群消息置顶-移除")
+      * [群发消息POST](https://doc.qiweapi.com/api-344613923 "群发消息")
+      * [群发消息-状态查询POST](https://doc.qiweapi.com/api-344613924 "群发消息-状态查询")
+      * [群发消息-规则查询POST](https://doc.qiweapi.com/api-344613925 "群发消息-规则查询")
+      * [同步历史消息分页POST](https://doc.qiweapi.com/api-344613926 "同步历史消息分页")
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 发送定位消息
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "method": "/msg/sendLocation",
+        "params": {
+            "guid": "{{guid}}",
+            "title": "南岸区茶园(重庆第二师范学院)",
+            "address": "重庆市南岸区",
+            "latitude": 29.510868,
+            "longitude": 106.656882,
+            "toId": "{{toId}}"
+        }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+        "method": "/msg/sendLocation",
+        "params": {
+            "guid": "",
+            "title": "南岸区茶园(重庆第二师范学院)",
+            "address": "重庆市南岸区",
+            "latitude": 29.510868,
+            "longitude": 106.656882,
+            "toId": ""
+        }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {

+        "code": 0,

+        "data": {

+            "isSendSuccess": 0,

+            "msgServerId": 0,

+            "msgType": 0,

+            "msgUniqueIdentifier": "string",

+            "seq": 0,

+            "timestamp": 0

+        },

+        "msg": "string"

+    }
+```
+修改于 2026-04-20 08:41:47
+[上一页发送视频号消息](https://doc.qiweapi.com/api-344613916)[下一页撤回消息](https://doc.qiweapi.com/api-344613918)

+ 6 - 0
doc/开发/QiWe开放平台文档/md/发送小程序消息.md

@@ -0,0 +1,6 @@
+# 发送小程序消息
+
+> 来源: https://doc.qiweapi.com/api-344613914
+
+•
+小程序消息参数可通过消息回调信息获取。

+ 221 - 0
doc/开发/QiWe开放平台文档/md/发送文件消息.md

@@ -0,0 +1,221 @@
+# 发送文件消息
+
+> 来源: https://doc.qiweapi.com/api-344613911
+
+[![图片](images/api-344613911/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310 "引用消息发送说明")
+      * 文件与媒体(下载/上传)
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息POST](https://doc.qiweapi.com/api-344613906 "发送纯文本消息")
+      * [发送混合文本消息POST](https://doc.qiweapi.com/api-344613907 "发送混合文本消息")
+      * [发送图片消息POST](https://doc.qiweapi.com/api-344613908 "发送图片消息")
+      * [发送GIF表情消息POST](https://doc.qiweapi.com/api-344613909 "发送GIF表情消息")
+      * [发送视频消息POST](https://doc.qiweapi.com/api-344613910 "发送视频消息")
+      * [发送文件消息POST](https://doc.qiweapi.com/api-344613911 "发送文件消息")
+      * [发送语音消息POST](https://doc.qiweapi.com/api-344613912 "发送语音消息")
+      * [发送链接消息POST](https://doc.qiweapi.com/api-344613913 "发送链接消息")
+      * [发送小程序消息POST](https://doc.qiweapi.com/api-344613914 "发送小程序消息")
+      * [发送名片消息POST](https://doc.qiweapi.com/api-344613915 "发送名片消息")
+      * [发送视频号消息POST](https://doc.qiweapi.com/api-344613916 "发送视频号消息")
+      * [发送定位消息POST](https://doc.qiweapi.com/api-344613917 "发送定位消息")
+      * [撤回消息POST](https://doc.qiweapi.com/api-344613918 "撤回消息")
+      * [语音转文字-任务申请POST](https://doc.qiweapi.com/api-440192990 "语音转文字-任务申请")
+      * [语音转文字-任务查询POST](https://doc.qiweapi.com/api-440146240 "语音转文字-任务查询")
+      * [修改消息状态POST](https://doc.qiweapi.com/api-344613919 "修改消息状态")
+      * [群消息置顶-列表POST](https://doc.qiweapi.com/api-344613920 "群消息置顶-列表")
+      * [群消息置顶-添加POST](https://doc.qiweapi.com/api-344613921 "群消息置顶-添加")
+      * [群消息置顶-移除POST](https://doc.qiweapi.com/api-344613922 "群消息置顶-移除")
+      * [群发消息POST](https://doc.qiweapi.com/api-344613923 "群发消息")
+      * [群发消息-状态查询POST](https://doc.qiweapi.com/api-344613924 "群发消息-状态查询")
+      * [群发消息-规则查询POST](https://doc.qiweapi.com/api-344613925 "群发消息-规则查询")
+      * [同步历史消息分页POST](https://doc.qiweapi.com/api-344613926 "同步历史消息分页")
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 发送文件消息
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "method": "/msg/sendFile",
+        "params": {
+            "guid": "{{guid}}",
+            "fileAesKey": "77a57600970141b09caf30498edf5858",
+            "fileId": "306b0201020464306202010002044c9aff3e02030f42410204c83b66b4020468bfef49042437376135373630302d393730312d343162302d396361662d333034393865646635383538020310000502030ca01004100509d04c4e3b56d76c72aeb2376bb1bb0201050201000400",
+            "fileSize": 827392,
+            "filename": "istone_1709280032552.xls",
+            "toId": "{{toId}}"
+        }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+        "method": "/msg/sendFile",
+        "params": {
+            "guid": "",
+            "fileAesKey": "77a57600970141b09caf30498edf5858",
+            "fileId": "306b0201020464306202010002044c9aff3e02030f42410204c83b66b4020468bfef49042437376135373630302d393730312d343162302d396361662d333034393865646635383538020310000502030ca01004100509d04c4e3b56d76c72aeb2376bb1bb0201050201000400",
+            "fileSize": 827392,
+            "filename": "istone_1709280032552.xls",
+            "toId": ""
+        }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {

+        "code": 0,

+        "data": {

+            "isSendSuccess": 0,

+            "msgServerId": 0,

+            "msgType": 0,

+            "msgUniqueIdentifier": "string",

+            "seq": 0,

+            "timestamp": 0

+        },

+        "msg": "string"

+    }
+```
+修改于 2026-04-08 08:20:31
+[上一页发送视频消息](https://doc.qiweapi.com/api-344613910)[下一页发送语音消息](https://doc.qiweapi.com/api-344613912)

+ 8 - 0
doc/开发/QiWe开放平台文档/md/发送朋友圈.md

@@ -0,0 +1,8 @@
+# 发送朋友圈
+
+> 来源: https://doc.qiweapi.com/api-344613930
+
+•
+支持文本 + 图片/视频/视频号/链接等类型的发送,其中图片一次可以发送多个。
+•
+图片/视频/视频号/链接,每次发送最多只能选择其中的一种类型。

+ 241 - 0
doc/开发/QiWe开放平台文档/md/发送混合文本消息.md

@@ -0,0 +1,241 @@
+# 发送混合文本消息
+
+> 来源: https://doc.qiweapi.com/api-344613907
+
+[![图片](images/api-344613907/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310 "引用消息发送说明")
+      * 文件与媒体(下载/上传)
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息POST](https://doc.qiweapi.com/api-344613906 "发送纯文本消息")
+      * [发送混合文本消息POST](https://doc.qiweapi.com/api-344613907 "发送混合文本消息")
+      * [发送图片消息POST](https://doc.qiweapi.com/api-344613908 "发送图片消息")
+      * [发送GIF表情消息POST](https://doc.qiweapi.com/api-344613909 "发送GIF表情消息")
+      * [发送视频消息POST](https://doc.qiweapi.com/api-344613910 "发送视频消息")
+      * [发送文件消息POST](https://doc.qiweapi.com/api-344613911 "发送文件消息")
+      * [发送语音消息POST](https://doc.qiweapi.com/api-344613912 "发送语音消息")
+      * [发送链接消息POST](https://doc.qiweapi.com/api-344613913 "发送链接消息")
+      * [发送小程序消息POST](https://doc.qiweapi.com/api-344613914 "发送小程序消息")
+      * [发送名片消息POST](https://doc.qiweapi.com/api-344613915 "发送名片消息")
+      * [发送视频号消息POST](https://doc.qiweapi.com/api-344613916 "发送视频号消息")
+      * [发送定位消息POST](https://doc.qiweapi.com/api-344613917 "发送定位消息")
+      * [撤回消息POST](https://doc.qiweapi.com/api-344613918 "撤回消息")
+      * [语音转文字-任务申请POST](https://doc.qiweapi.com/api-440192990 "语音转文字-任务申请")
+      * [语音转文字-任务查询POST](https://doc.qiweapi.com/api-440146240 "语音转文字-任务查询")
+      * [修改消息状态POST](https://doc.qiweapi.com/api-344613919 "修改消息状态")
+      * [群消息置顶-列表POST](https://doc.qiweapi.com/api-344613920 "群消息置顶-列表")
+      * [群消息置顶-添加POST](https://doc.qiweapi.com/api-344613921 "群消息置顶-添加")
+      * [群消息置顶-移除POST](https://doc.qiweapi.com/api-344613922 "群消息置顶-移除")
+      * [群发消息POST](https://doc.qiweapi.com/api-344613923 "群发消息")
+      * [群发消息-状态查询POST](https://doc.qiweapi.com/api-344613924 "群发消息-状态查询")
+      * [群发消息-规则查询POST](https://doc.qiweapi.com/api-344613925 "群发消息-规则查询")
+      * [同步历史消息分页POST](https://doc.qiweapi.com/api-344613926 "同步历史消息分页")
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 发送混合文本消息
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "method": "/msg/sendHyperText",
+        "params": {
+            "guid": "{{guid}}",
+            "content": [
+                {
+                    "subtype": 2,
+                    "text": "[微笑][憨笑]"
+                },
+                {
+                    "subtype": 1,
+                    "text": "" //@所有人
+                },
+                {
+                    "subtype": 0,
+                    "text": " 我是智能客服"
+                }
+            ],
+            "toId": "7881302****70971"
+        }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data-raw '{
+        "method": "/msg/sendHyperText",
+        "params": {
+            "guid": "",
+            "content": [
+                {
+                    "subtype": 2,
+                    "text": "[微笑][憨笑]"
+                },
+                {
+                    "subtype": 1,
+                    "text": "" //@所有人
+                },
+                {
+                    "subtype": 0,
+                    "text": " 我是智能客服"
+                }
+            ],
+            "toId": "7881302****70971"
+        }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {

+        "code": 0,

+        "data": {

+            "isSendSuccess": 1,

+            "msgServerId": 1000838,

+            "msgType": 2,

+            "msgUniqueIdentifier": "T2Bsflc6oeswjjM==",

+            "seq": 4649019,

+            "timestamp": 1758350588

+        },

+        "msg": "成功"

+    }
+```
+修改于 2026-04-10 13:32:43
+[上一页发送纯文本消息](https://doc.qiweapi.com/api-344613906)[下一页发送图片消息](https://doc.qiweapi.com/api-344613908)

+ 217 - 0
doc/开发/QiWe开放平台文档/md/发送纯文本消息.md

@@ -0,0 +1,217 @@
+# 发送纯文本消息
+
+> 来源: https://doc.qiweapi.com/api-344613906
+
+[![图片](images/api-344613906/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310 "引用消息发送说明")
+      * 文件与媒体(下载/上传)
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息POST](https://doc.qiweapi.com/api-344613906 "发送纯文本消息")
+      * [发送混合文本消息POST](https://doc.qiweapi.com/api-344613907 "发送混合文本消息")
+      * [发送图片消息POST](https://doc.qiweapi.com/api-344613908 "发送图片消息")
+      * [发送GIF表情消息POST](https://doc.qiweapi.com/api-344613909 "发送GIF表情消息")
+      * [发送视频消息POST](https://doc.qiweapi.com/api-344613910 "发送视频消息")
+      * [发送文件消息POST](https://doc.qiweapi.com/api-344613911 "发送文件消息")
+      * [发送语音消息POST](https://doc.qiweapi.com/api-344613912 "发送语音消息")
+      * [发送链接消息POST](https://doc.qiweapi.com/api-344613913 "发送链接消息")
+      * [发送小程序消息POST](https://doc.qiweapi.com/api-344613914 "发送小程序消息")
+      * [发送名片消息POST](https://doc.qiweapi.com/api-344613915 "发送名片消息")
+      * [发送视频号消息POST](https://doc.qiweapi.com/api-344613916 "发送视频号消息")
+      * [发送定位消息POST](https://doc.qiweapi.com/api-344613917 "发送定位消息")
+      * [撤回消息POST](https://doc.qiweapi.com/api-344613918 "撤回消息")
+      * [语音转文字-任务申请POST](https://doc.qiweapi.com/api-440192990 "语音转文字-任务申请")
+      * [语音转文字-任务查询POST](https://doc.qiweapi.com/api-440146240 "语音转文字-任务查询")
+      * [修改消息状态POST](https://doc.qiweapi.com/api-344613919 "修改消息状态")
+      * [群消息置顶-列表POST](https://doc.qiweapi.com/api-344613920 "群消息置顶-列表")
+      * [群消息置顶-添加POST](https://doc.qiweapi.com/api-344613921 "群消息置顶-添加")
+      * [群消息置顶-移除POST](https://doc.qiweapi.com/api-344613922 "群消息置顶-移除")
+      * [群发消息POST](https://doc.qiweapi.com/api-344613923 "群发消息")
+      * [群发消息-状态查询POST](https://doc.qiweapi.com/api-344613924 "群发消息-状态查询")
+      * [群发消息-规则查询POST](https://doc.qiweapi.com/api-344613925 "群发消息-规则查询")
+      * [同步历史消息分页POST](https://doc.qiweapi.com/api-344613926 "同步历史消息分页")
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 发送纯文本消息
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+        "method": "/msg/sendText",
+        "params": {
+            "guid": "{{guid}}",
+            "content": "你好,这是你第一条企业微信消息",
+            "toId": "168****768657", //用户userid,或群id
+            "isNoNeedRead": true
+        }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+        "method": "/msg/sendText",
+        "params": {
+            "guid": "",
+            "content": "你好,这是你第一条企业微信消息",
+            "toId": "168****768657", //用户userid,或群id
+            "isNoNeedRead": true
+        }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {

+        "code": 0,

+        "data": {

+            "isSendSuccess": 1,

+            "msgServerId": 1000888,

+            "msgType": 2,

+            "msgUniqueIdentifier": "Gef7kslP7****==",

+            "seq": 4649777,

+            "timestamp": 1758349925

+        },

+        "msg": "成功"

+    }
+```
+修改于 2026-04-10 06:40:53
+[上一页文件CDN转URL](https://doc.qiweapi.com/api-344613903)[下一页发送混合文本消息](https://doc.qiweapi.com/api-344613907)

+ 229 - 0
doc/开发/QiWe开放平台文档/md/发送视频号消息.md

@@ -0,0 +1,229 @@
+# 发送视频号消息
+
+> 来源: https://doc.qiweapi.com/api-344613916
+
+[![图片](images/api-344613916/48f11eac-33e9-4038-9e16-4382ea98363e.png)**QiWe开放平台**](https://doc.qiweapi.com)
+[ 企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[企微官网](http://www.qiweapi.com "企微官网")[企微报价](http://manager.qiweapi.com/order "企微报价")[控制台](http://manager.qiweapi.com/login?redirect=%2Findex "控制台")
+[后台系统](http://manager.qiweapi.com/index)
+复制页面
+  * [平台介绍](https://doc.qiweapi.com/doc-7331301 "平台介绍")
+  * [ 快速开始 ⭐](https://doc.qiweapi.com/doc-7562288 " 快速开始 ⭐")
+  * Webhook
+    * [Webhook事件⭐](https://doc.qiweapi.com/doc-7331303)
+    * [回调结构说明](https://doc.qiweapi.com/doc-7331304)
+    * [调试指南⭐](https://doc.qiweapi.com/doc-8483504)
+    * [常见问题](https://doc.qiweapi.com/doc-8483505)
+  * API参考
+    * 登录模块
+      * [创建设备(步骤1)](https://doc.qiweapi.com/api-344613850)
+      * [二维码-获取(步骤2)](https://doc.qiweapi.com/api-344613856)
+      * [二维码状态-检测(步骤3)](https://doc.qiweapi.com/api-344613857)
+      * [二维码-code验证(步骤4)](https://doc.qiweapi.com/api-344613858)
+      * [设置回调地址](https://doc.qiweapi.com/api-354411522)
+      * [用户登录(免扫码登录)](https://doc.qiweapi.com/api-344613859)
+      * [用户状态](https://doc.qiweapi.com/api-347221662)
+      * [恢复设备](https://doc.qiweapi.com/api-344613851)
+      * [停用设备](https://doc.qiweapi.com/api-344613852)
+    * 联系人模块
+      * [联系人详情-批量](https://doc.qiweapi.com/api-344613868)
+      * [外部联系人分页](https://doc.qiweapi.com/api-344613869)
+      * [内部联系人分页](https://doc.qiweapi.com/api-344613870)
+      * [联系人搜索](https://doc.qiweapi.com/api-344613871)
+      * [添加个微](https://doc.qiweapi.com/api-344613872)
+      * [添加企微](https://doc.qiweapi.com/api-344613873)
+      * [添加群成员好友](https://doc.qiweapi.com/api-425758709)
+      * [添加企微名片](https://doc.qiweapi.com/api-344613874)
+      * [添加删除联系人](https://doc.qiweapi.com/api-344613875)
+      * [同意申请](https://doc.qiweapi.com/api-344613876)
+      * [外部联系人信息-更新](https://doc.qiweapi.com/api-344613877)
+      * [内部联系人信息-更新](https://doc.qiweapi.com/api-344613878)
+      * [删除联系人](https://doc.qiweapi.com/api-344613879)
+      * [Openid](https://doc.qiweapi.com/api-344613880)
+    * 群模块
+      * [群分页](https://doc.qiweapi.com/api-344613881)
+      * [群详情-批量](https://doc.qiweapi.com/api-344613882)
+      * [群成员变动查询](https://doc.qiweapi.com/api-437674162)
+      * [创建群](https://doc.qiweapi.com/api-344613883)
+      * [修改群名称](https://doc.qiweapi.com/api-344613884)
+      * [修改群备注](https://doc.qiweapi.com/api-344613885)
+      * [修改群内昵称](https://doc.qiweapi.com/api-344613886)
+      * [邀请/添加成员](https://doc.qiweapi.com/api-344613887)
+      * [禁止群成员互相添加](https://doc.qiweapi.com/api-437795951)
+      * [移除成员](https://doc.qiweapi.com/api-344613888)
+      * [群二维码](https://doc.qiweapi.com/api-344613889)
+      * [修改群公告](https://doc.qiweapi.com/api-344613890)
+      * [添加群管理员](https://doc.qiweapi.com/api-344613891)
+      * [取消群管理员](https://doc.qiweapi.com/api-344613892)
+      * [退群](https://doc.qiweapi.com/api-344613893)
+      * [转让群主](https://doc.qiweapi.com/api-344613894)
+      * [群解散](https://doc.qiweapi.com/api-344613895)
+      * [OpenID](https://doc.qiweapi.com/api-344613896)
+      * [开启群改名](https://doc.qiweapi.com/api-344613897)
+      * [开启群邀请确认](https://doc.qiweapi.com/api-344613898)
+      * [接受群邀请-By链接](https://doc.qiweapi.com/api-410838558)
+    * 消息模块 
+      * [引用消息发送说明](https://doc.qiweapi.com/doc-7331310 "引用消息发送说明")
+      * 文件与媒体(下载/上传)
+        * [本地文件上传](https://doc.qiweapi.com/api-344613899)
+        * [企微文件异步上传](https://doc.qiweapi.com/api-395133885)
+        * [企微大文件异步上传](https://doc.qiweapi.com/api-389695362)
+        * [个微文件下载](https://doc.qiweapi.com/api-344613902)
+        * [企微文件下载](https://doc.qiweapi.com/api-344613901)
+        * [企微文件异步下载](https://doc.qiweapi.com/api-389691087)
+        * [企微大文件异步下载](https://doc.qiweapi.com/api-453564016)
+        * [个微文件异步下载](https://doc.qiweapi.com/api-399776006)
+        * [文件上传-URL](https://doc.qiweapi.com/api-344613900)
+        * [文件CDN转URL](https://doc.qiweapi.com/api-344613903)
+      * [发送纯文本消息POST](https://doc.qiweapi.com/api-344613906 "发送纯文本消息")
+      * [发送混合文本消息POST](https://doc.qiweapi.com/api-344613907 "发送混合文本消息")
+      * [发送图片消息POST](https://doc.qiweapi.com/api-344613908 "发送图片消息")
+      * [发送GIF表情消息POST](https://doc.qiweapi.com/api-344613909 "发送GIF表情消息")
+      * [发送视频消息POST](https://doc.qiweapi.com/api-344613910 "发送视频消息")
+      * [发送文件消息POST](https://doc.qiweapi.com/api-344613911 "发送文件消息")
+      * [发送语音消息POST](https://doc.qiweapi.com/api-344613912 "发送语音消息")
+      * [发送链接消息POST](https://doc.qiweapi.com/api-344613913 "发送链接消息")
+      * [发送小程序消息POST](https://doc.qiweapi.com/api-344613914 "发送小程序消息")
+      * [发送名片消息POST](https://doc.qiweapi.com/api-344613915 "发送名片消息")
+      * [发送视频号消息POST](https://doc.qiweapi.com/api-344613916 "发送视频号消息")
+      * [发送定位消息POST](https://doc.qiweapi.com/api-344613917 "发送定位消息")
+      * [撤回消息POST](https://doc.qiweapi.com/api-344613918 "撤回消息")
+      * [语音转文字-任务申请POST](https://doc.qiweapi.com/api-440192990 "语音转文字-任务申请")
+      * [语音转文字-任务查询POST](https://doc.qiweapi.com/api-440146240 "语音转文字-任务查询")
+      * [修改消息状态POST](https://doc.qiweapi.com/api-344613919 "修改消息状态")
+      * [群消息置顶-列表POST](https://doc.qiweapi.com/api-344613920 "群消息置顶-列表")
+      * [群消息置顶-添加POST](https://doc.qiweapi.com/api-344613921 "群消息置顶-添加")
+      * [群消息置顶-移除POST](https://doc.qiweapi.com/api-344613922 "群消息置顶-移除")
+      * [群发消息POST](https://doc.qiweapi.com/api-344613923 "群发消息")
+      * [群发消息-状态查询POST](https://doc.qiweapi.com/api-344613924 "群发消息-状态查询")
+      * [群发消息-规则查询POST](https://doc.qiweapi.com/api-344613925 "群发消息-规则查询")
+      * [同步历史消息分页POST](https://doc.qiweapi.com/api-344613926 "同步历史消息分页")
+    * 会话模块
+      * [会话分页](https://doc.qiweapi.com/api-344613938)
+      * [会话组-编辑](https://doc.qiweapi.com/api-344613939)
+      * [会话组-查询](https://doc.qiweapi.com/api-344613940)
+    * 朋友圈模块
+      * [朋友圈列表分页](https://doc.qiweapi.com/api-344613927)
+      * [获取详情-批量](https://doc.qiweapi.com/api-344613928)
+      * [文件上传](https://doc.qiweapi.com/api-344613929)
+      * [发送朋友圈](https://doc.qiweapi.com/api-344613930)
+      * [删除朋友圈](https://doc.qiweapi.com/api-344613931)
+      * [点赞/取消赞](https://doc.qiweapi.com/api-344613932)
+      * [评论/追评](https://doc.qiweapi.com/api-344613933)
+      * [评论删除](https://doc.qiweapi.com/api-344613934)
+    * 个人模块
+      * [生成二维码](https://doc.qiweapi.com/api-344613861)
+      * [获取个人信息](https://doc.qiweapi.com/api-344613862)
+      * [更新个人信息](https://doc.qiweapi.com/api-344613863)
+      * [查询企业信息](https://doc.qiweapi.com/api-344613864)
+      * [账号退出](https://doc.qiweapi.com/api-344613865)
+      * [个人收藏-分页](https://doc.qiweapi.com/api-344613866)
+      * [个人收藏-添加GIF表情](https://doc.qiweapi.com/api-344613867)
+    * 标签模块
+      * [列表分页](https://doc.qiweapi.com/api-361694421)
+      * [个人标签-增删改](https://doc.qiweapi.com/api-344613936)
+      * [客户标签-增删](https://doc.qiweapi.com/api-344613937)
+
+复制页面
+# 发送视频号消息
+POST
+/api/qw/doApi
+调试Run in Apifox
+Run in Apifox
+## 请求参数
+Header 参数
+生成代码
+### 
+  *   *   * 
+
+Body 参数application/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {
+      "method": "/msg/sendFeedVideo",
+      "params": {
+        "guid": "{{guid}}",
+        "channelName": "test-channel-name",
+        "channelUrl": "https://channels.weixin.qq.com/web/pages/feed?eid=export%2FUzFfAgtgekIEAQAAAAAAHq0FF8bkrAAAAAstQy6ubaLX4KHWvLEZgBPE7qMEazI1S7yAzNPgMIIbiq_UHcSt4wZRfG5rK2Cd",
+        "coverUrl": "http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=oibeqyX228riaCwo9STVsGLPj9UYCicgttvaCTQZ1peb7XkymiaLfmHIE0ZR5vgLDxRAPb4cJKohnaUBZFtt4TdGo7dc0ud9cmKkXxzH5xf9kmicPyhwvUwYldthr4SI3mRCRKAUd69opMQI&adaptivelytrans=0&bizid=1023&dotrans=0&hy=SH&idx=1&m=3ea9e72770bc61dffe747dfc1fd10e3b&token=AxricY7RBHdV2hHD**PokKdhcL3lIl9gj0mAG0bW1soQ8ulpIDKe8hIJs3uOof4icXkkcbHDVbl1Q&finder_expire_time=1681990196&finder_eid=export%2FUzFfAgtgekIEAQAAAAAAHq0FF8bkrAAAAAstQy6ubaLX4KHWvLEZgBPE7qMEazI1S7yAzNPgMIIbiq_UHcSt4wZRfG5rK2Cd",
+        "encodeData": "CAEQACKeHgAE9OmXBAAAAQAA3dg4YsB/GHgYpBNP+jTFcF8sUYEWXdt3MoPFfPa7CD/P+HRPWL8z4vSPJ3/R88jKbet1tM9uEXzp6xmGoqoJPgsw8jL0IY1X/j+DzfpX+UJ0/ukyq8ZkWlLvcZ2hSwtP/JsUZGP9+XBy4EZGEC1kRhyIDFz99e8TH0/UuVH6rmMHAg2kbtfzLWbVNGRPpU58HTCEPsKOGtRfzzIbes3eRYzy6J2fdbINsEZyvroHljl**+g+ttDonNWA3E1tLrePhdX2+YyJ59JbPbuIyl5Y47WuAbaplJwFhZk1ujNJtMESexLmE8DF8pWr8u8aCC0//YRxTP1igmEXk2mJbVEDrDV/Z1M6dz5TsGq1mlILjmHPJDkpdm2TeXdz/jfEU2fJmnlFDO1pGBKkm9OXcuLTFJZ1dXUMYl0M2ZXl31ESrwk//CbZEnD2GPo9ORTJy10i9sJ6VigA",
+        "headImgUrl": "http://wx.qlogo.cn/finderhead/ver_1/bzwBUPmmjrmPtYet7ARzEJxQt1MflBsHFq35TtdvH6OR75grJZx0RLh5DOr1p5STKWjQfKrej**m8zwEMNxnicA/0",
+        "feedId": "xxxx",
+        "feedNo": "xxxx",
+        "username": "test_username",
+        "toId": "{{toId}}"
+      }
+    }
+```
+## 请求示例代码
+Shell
+JavaScript
+Java
+Swift
+Go
+PHP
+Python
+HTTP
+C
+C#
+Objective-C
+Ruby
+OCaml
+Dart
+R
+请求示例请求示例
+Shell
+JavaScript
+Java
+Swift
+cURLcURL-WindowsHttpiewgetPowerShell
+```
+    curl --location 'http://manager.qiweapi.com/qiwe/api/qw/doApi' \
+    --header 'X-QIWEI-TOKEN: ' \
+    --header 'Content-Type: application/json' \
+    --data '{
+      "method": "/msg/sendFeedVideo",
+      "params": {
+        "guid": "",
+        "channelName": "test-channel-name",
+        "channelUrl": "https://channels.weixin.qq.com/web/pages/feed?eid=export%2FUzFfAgtgekIEAQAAAAAAHq0FF8bkrAAAAAstQy6ubaLX4KHWvLEZgBPE7qMEazI1S7yAzNPgMIIbiq_UHcSt4wZRfG5rK2Cd",
+        "coverUrl": "http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=oibeqyX228riaCwo9STVsGLPj9UYCicgttvaCTQZ1peb7XkymiaLfmHIE0ZR5vgLDxRAPb4cJKohnaUBZFtt4TdGo7dc0ud9cmKkXxzH5xf9kmicPyhwvUwYldthr4SI3mRCRKAUd69opMQI&adaptivelytrans=0&bizid=1023&dotrans=0&hy=SH&idx=1&m=3ea9e72770bc61dffe747dfc1fd10e3b&token=AxricY7RBHdV2hHD**PokKdhcL3lIl9gj0mAG0bW1soQ8ulpIDKe8hIJs3uOof4icXkkcbHDVbl1Q&finder_expire_time=1681990196&finder_eid=export%2FUzFfAgtgekIEAQAAAAAAHq0FF8bkrAAAAAstQy6ubaLX4KHWvLEZgBPE7qMEazI1S7yAzNPgMIIbiq_UHcSt4wZRfG5rK2Cd",
+        "encodeData": "CAEQACKeHgAE9OmXBAAAAQAA3dg4YsB/GHgYpBNP+jTFcF8sUYEWXdt3MoPFfPa7CD/P+HRPWL8z4vSPJ3/R88jKbet1tM9uEXzp6xmGoqoJPgsw8jL0IY1X/j+DzfpX+UJ0/ukyq8ZkWlLvcZ2hSwtP/JsUZGP9+XBy4EZGEC1kRhyIDFz99e8TH0/UuVH6rmMHAg2kbtfzLWbVNGRPpU58HTCEPsKOGtRfzzIbes3eRYzy6J2fdbINsEZyvroHljl**+g+ttDonNWA3E1tLrePhdX2+YyJ59JbPbuIyl5Y47WuAbaplJwFhZk1ujNJtMESexLmE8DF8pWr8u8aCC0//YRxTP1igmEXk2mJbVEDrDV/Z1M6dz5TsGq1mlILjmHPJDkpdm2TeXdz/jfEU2fJmnlFDO1pGBKkm9OXcuLTFJZ1dXUMYl0M2ZXl31ESrwk//CbZEnD2GPo9ORTJy10i9sJ6VigA",
+        "headImgUrl": "http://wx.qlogo.cn/finderhead/ver_1/bzwBUPmmjrmPtYet7ARzEJxQt1MflBsHFq35TtdvH6OR75grJZx0RLh5DOr1p5STKWjQfKrej**m8zwEMNxnicA/0",
+        "feedId": "xxxx",
+        "feedNo": "xxxx",
+        "username": "test_username",
+        "toId": ""
+      }
+    }'
+```
+## 返回响应
+🟢200成功
+application/json
+生成代码
+Bodyapplication/json
+生成代码
+### 
+  *   *   * 
+
+示例
+```
+    {

+        "code": 0,

+        "data": {

+            "isSendSuccess": 0,

+            "msgServerId": 0,

+            "msgType": 0,

+            "msgUniqueIdentifier": "string",

+            "seq": 0,

+            "timestamp": 0

+        },

+        "msg": "string"

+    }
+```
+修改于 2026-04-08 09:27:16
+[上一页发送名片消息](https://doc.qiweapi.com/api-344613915)[下一页发送定位消息](https://doc.qiweapi.com/api-344613917)

Некоторые файлы не были показаны из-за большого количества измененных файлов