Conversation
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add API endpoint for application admin access
添加获取应用管理员列表接口
Dec 24, 2025
There was a problem hiding this comment.
Pull request overview
本 PR 为企业微信代开发应用添加了"获取应用管理员列表"API 支持。该接口允许第三方服务商获取授权企业中指定应用的管理员列表(不包括外部管理员),便于服务商根据用户的管理员身份进行权限区分。
主要变更包括:
- 新增 API 端点常量定义
- 在
WxCpAgentService接口中添加getAdminList方法 - 在
WxCpAgentServiceImpl中实现该方法,包含参数校验和错误处理 - 复用现有的
WxCpTpAdminBean 承载响应数据 - 添加完整的真实环境测试和 Mock 单元测试
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpApiPathConsts.java | 在 Agent 接口中添加 AGENT_GET_ADMIN_LIST 常量,定义 API 路径 "/cgi-bin/agent/get_admin_list" |
| weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpAgentService.java | 添加 getAdminList 接口方法定义,包含完整的 JavaDoc 文档说明 |
| weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImpl.java | 实现 getAdminList 方法,包含参数校验、JSON 请求构建、API 调用和标准错误处理 |
| weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImplTest.java | 添加真实环境测试 testGetAdminList 和 Mock 测试,验证接口调用和响应解析的正确性 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
添加企业微信代开发应用"获取应用管理员列表"API支持。该接口用于获取授权企业中第三方应用或代开发应用的管理员列表(不包括外部管理员)。
变更内容
WxCpApiPathConsts.Agent中添加AGENT_GET_ADMIN_LIST = "/cgi-bin/agent/get_admin_list"WxCpAgentService中添加getAdminList(Integer agentId)方法WxCpAgentServiceImpl中实现该方法,使用POST请求,包含参数校验和标准错误处理WxCpTpAdminbean承载返回数据使用示例
参考文档: https://developer.work.weixin.qq.com/document/path/90506
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.