Skip to content

feat: #4118 增加微信客服知识库接口 - #4119

Open
binarywang wants to merge 2 commits into
developfrom
feat/4118-kf-knowledge
Open

feat: #4118 增加微信客服知识库接口#4119
binarywang wants to merge 2 commits into
developfrom
feat/4118-kf-knowledge

Conversation

@binarywang

Copy link
Copy Markdown
Owner

关联 Issue

变更内容

  • 新增微信客服知识库分组的添加、删除、修改与分页查询 API。
  • 新增微信客服知识库问答的添加、删除、修改与分页查询 API。
  • 补充请求/响应模型,涵盖文本、相似问题、回答及图片、视频、链接、小程序附件。
  • 新增 JSON 与 8 个请求端点的契约测试。

验证

  • mvn -pl weixin-java-cp -am -DskipTests=false test(编译成功;仓库 POM 默认跳过 Surefire 测试)
  • 直接执行 TestNG:WxCpKfKnowledgeTest,3 passed, 0 failed

Copilot AI lite review requested due to automatic review settings September 1, 2026 02:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T02:37:55.625324Z fc9b3ce PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to run its full agentic suite in this review.

Pull request overview

该 PR 为企业微信「微信客服」新增知识库(分组/问答)相关接口与数据模型,并加入对应契约测试以覆盖新增端点。

Changes:

  • 新增知识库分组:添加、删除、修改、分页查询 API(含路径常量与响应模型)。
  • 新增知识库问答:添加、删除、修改、分页查询 API(含请求/响应模型)。
  • 新增 TestNG 契约测试并加入测试套件配置。

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
weixin-java-cp/src/test/resources/testng.xml 将知识库契约测试加入 TestNG suite,确保在常规测试流程中执行
weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeTest.java 新增知识库分组/问答的 JSON 序列化与接口请求契约测试
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java 增加知识库相关 8 个端点 path 常量
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentListResp.java 新增问答列表响应模型
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntentAddResp.java 新增问答新增响应模型
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeIntent.java 新增知识库问答(含相似问题、回答、附件)数据模型
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupListResp.java 新增分组列表响应模型
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroupAddResp.java 新增分组新增响应模型
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeGroup.java 新增知识库分组数据模型
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java 在实现类中落地知识库分组/问答相关方法与请求组装
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpKfService.java 在接口层暴露知识库分组/问答相关方法签名与注释

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpKfService.java Outdated
Comment thread weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpKfService.java Outdated
Comment thread weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java Outdated
Comment thread weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpKfServiceImpl.java Outdated
@augmentcode

augmentcode Bot commented Sep 1, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR adds Enterprise WeChat customer-service knowledge-base support.


Changes:

  • Adds group create, delete, modify, and paginated-list service APIs.
  • Adds knowledge-intent create, delete, modify, and paginated-list APIs.
  • Introduces models for group metadata and API result envelopes.
  • Models questions, similar questions, answers, and image/video/link/miniprogram attachments.
  • Registers eight new /cgi-bin/kf/knowledge/* endpoint constants.
  • Implements request construction and response parsing in WxCpKfServiceImpl.
  • Adds TestNG JSON and mocked-request contract coverage and includes it in the suite.
Technical notes: The APIs use the existing customer-service transport and Gson serialization conventions; list requests omit optional parameters when null.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

缺少企业微信的微信客服的部分代码

2 participants