增加快速创建企业小程序接口#4061
Conversation
🤖 Augment PR SummarySummary: 本 PR 新增“快速注册企业小程序”接口支持,用于替代已停用的旧版快速创建小程序接口。 Changes:
Technical Notes: 企业注册接口按文档在请求体中携带 🤖 Was this summary useful? React with 👍 or 👎 |
|
@codex review一下 |
There was a problem hiding this comment.
Pull request overview
该 PR 针对微信开放平台“老版本快速创建小程序接口已于 2026-04-30 停用”的变化,在 weixin-java-open 模块中补充了“快速创建企业小程序”及其任务查询接口,以保持 SDK 对新接口的支持并减少调用方迁移成本。
Changes:
- 新增企业快速创建小程序的创建/查询 URL 常量。
- 在
WxOpenComponentService中新增企业快速创建与任务查询方法声明。 - 在
WxOpenComponentServiceImpl中补齐上述新接口的请求组装与调用实现,并在旧接口注释中标注下线信息。
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenComponentService.java | 新增企业快速注册相关常量与 API;更新旧快速创建接口注释说明下线时间 |
| weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java | 实现企业快速注册与任务查询的 POST 调用与参数组装 |
| /** | ||
| * https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=21538208049W8uwq&token=&lang=zh_CN | ||
| * 第三方平台快速创建小程序. | ||
| * 第三方平台快速创建小程序. 2026-04-30 已下线 |
| * @return . wx open result | ||
| * @throws WxErrorException . | ||
| */ | ||
| WxOpenRegisterPersonalWeappResult fastRegisterEnterpriseWeapp(String name, String code, String codeType, String legalPersonaOpenid, String legalPersonaName, String componentPhone) throws WxErrorException; |
| } | ||
|
|
||
| @Override | ||
| public WxOpenRegisterPersonalWeappResult fastRegisterEnterpriseWeapp(String name, String code, String codeType, String legalPersonaOpenid, String legalPersonaName, String componentPhone) throws WxErrorException { |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f548c3f588
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| jsonObject.addProperty("component_phone", componentPhone); | ||
| jsonObject.addProperty("new_version", true); | ||
| String response = post(FAST_REGISTER_ENTERPRISE_WEAPP_URL, jsonObject.toString(), "component_access_token"); | ||
| return WxOpenGsonBuilder.create().fromJson(response, WxOpenRegisterPersonalWeappResult.class); |
There was a problem hiding this comment.

2026-04-30 老版本的快速创建小程序接口停用
增加新版本的快速创建企业小程序接口实现