Skip to content

增加快速创建企业小程序接口#4061

Merged
binarywang merged 4 commits into
binarywang:developfrom
allovine:develop
Jul 2, 2026
Merged

增加快速创建企业小程序接口#4061
binarywang merged 4 commits into
binarywang:developfrom
allovine:develop

Conversation

@allovine

@allovine allovine commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

2026-04-30 老版本的快速创建小程序接口停用

增加新版本的快速创建企业小程序接口实现

@augmentcode

augmentcode Bot commented Jul 2, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: 本 PR 新增“快速注册企业小程序”接口支持,用于替代已停用的旧版快速创建小程序接口。

Changes:

  • WxOpenComponentService 中新增企业小程序注册/查询相关 URL 常量与方法声明
  • WxOpenComponentServiceImpl 中实现企业小程序注册与任务状态查询的 POST 调用
  • 为旧版快速创建小程序接口补充“2026-04-30 已下线”提示

Technical Notes: 企业注册接口按文档在请求体中携带 new_version=true,并使用 component_access_token 调用。

🤖 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. 2 suggestions posted.

Fix All in Augment

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

@binarywang binarywang requested a review from Copilot July 2, 2026 02:39
@binarywang

Copy link
Copy Markdown
Owner

@codex review一下

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.

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 {

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 解析企业注册回调中的 taskid

使用新增企业注册接口时,微信最终的 notify_third_fasteregister 回调只在 <info><taskid>... 中带回任务 ID;但当前消息模型的 WxOpenXmlMessage.Info 没有 taskid 字段(只有旧接口的 name/code/legal_persona_*),因此调用方拿到这个新方法返回的多个 taskid 后,无法在成功或失败回调中关联是哪一个注册任务完成。请同步给 Info 增加 taskid 映射,避免并发创建企业小程序时结果无法对账。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

image

@binarywang binarywang merged commit eaf28fe into binarywang:develop Jul 2, 2026
@binarywang binarywang added this to the 4.8.5 milestone Jul 2, 2026
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.

3 participants