🎨 #4061 【开放平台】增加快速创建企业小程序的接口
This commit is contained in:
@@ -124,6 +124,17 @@ public interface WxOpenComponentService {
|
|||||||
* 快速创建小程序接口.
|
* 快速创建小程序接口.
|
||||||
*/
|
*/
|
||||||
String FAST_REGISTER_WEAPP_URL = "https://api.weixin.qq.com/cgi-bin/component/fastregisterweapp?action=create";
|
String FAST_REGISTER_WEAPP_URL = "https://api.weixin.qq.com/cgi-bin/component/fastregisterweapp?action=create";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 快速创建企业小程序接口.
|
||||||
|
*/
|
||||||
|
String FAST_REGISTER_ENTERPRISE_WEAPP_URL = "https://api.weixin.qq.com/wxa/component/fastregisterenterpriseweapp?action=create";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 快速创建企业小程序查询接口.
|
||||||
|
*/
|
||||||
|
String FAST_REGISTER_ENTERPRISE_WEAPP_QUERY_URL = "https://api.weixin.qq.com/wxa/component/fastregisterenterpriseweapp?action=query";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The constant FAST_REGISTER_WEAPP_SEARCH_URL.
|
* The constant FAST_REGISTER_WEAPP_SEARCH_URL.
|
||||||
*/
|
*/
|
||||||
@@ -611,7 +622,7 @@ public interface WxOpenComponentService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=21538208049W8uwq&token=&lang=zh_CN
|
* 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 已下线
|
||||||
* 注意:创建任务逻辑串行,单次任务结束后才可以使用相同信息下发第二次任务,请注意规避任务阻塞
|
* 注意:创建任务逻辑串行,单次任务结束后才可以使用相同信息下发第二次任务,请注意规避任务阻塞
|
||||||
*
|
*
|
||||||
* @param name 企业名(需与工商部门登记信息一致)
|
* @param name 企业名(需与工商部门登记信息一致)
|
||||||
@@ -622,9 +633,34 @@ public interface WxOpenComponentService {
|
|||||||
* @param componentPhone 第三方联系电话(方便法人与第三方联系)
|
* @param componentPhone 第三方联系电话(方便法人与第三方联系)
|
||||||
* @return . wx open result
|
* @return . wx open result
|
||||||
* @throws WxErrorException .
|
* @throws WxErrorException .
|
||||||
|
* @deprecated 2026-04-30 接口已经下线
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
WxOpenResult fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone) throws WxErrorException;
|
WxOpenResult fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://developers.weixin.qq.com/doc/oplatform/openApi/register-management/fast-registration-ent/api_fastregisterenterpriseweapp.html
|
||||||
|
* 第三方平台快速创建企业小程序.
|
||||||
|
* 注意:创建任务逻辑串行,单次任务结束后才可以使用相同信息下发第二次任务,请注意规避任务阻塞
|
||||||
|
*
|
||||||
|
* @param name 企业名(需与工商部门登记信息一致)
|
||||||
|
* @param code 企业代码,18位统一信用代码
|
||||||
|
* @param componentPhone 第三方联系电话(方便法人与第三方联系)
|
||||||
|
* @return . wx open result
|
||||||
|
* @throws WxErrorException .
|
||||||
|
*/
|
||||||
|
WxOpenRegisterPersonalWeappResult fastRegisterEnterpriseWeapp(String name, String code, String componentPhone) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://developers.weixin.qq.com/doc/oplatform/openApi/register-management/fast-registration-ent/api_fastregisterenterpriseweapp.html
|
||||||
|
* 查询企业小程序注册任务状态
|
||||||
|
*
|
||||||
|
* @param taskid 任务ID
|
||||||
|
* @return the wx open result
|
||||||
|
* @throws WxErrorException
|
||||||
|
*/
|
||||||
|
WxOpenRegisterPersonalWeappResult fastRegisterEnterpriseWeappQuery(String taskid) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=21538208049W8uwq&token=&lang=zh_CN
|
* https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=21538208049W8uwq&token=&lang=zh_CN
|
||||||
* 查询第三方平台快速创建小程序的任务状态
|
* 查询第三方平台快速创建小程序的任务状态
|
||||||
|
|||||||
@@ -643,6 +643,26 @@ public class WxOpenComponentServiceImpl implements WxOpenComponentService {
|
|||||||
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
|
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxOpenRegisterPersonalWeappResult fastRegisterEnterpriseWeapp(String name, String code, String componentPhone) throws WxErrorException {
|
||||||
|
JsonObject jsonObject = new JsonObject();
|
||||||
|
jsonObject.addProperty("name", name);
|
||||||
|
jsonObject.addProperty("code", code);
|
||||||
|
jsonObject.addProperty("component_phone", componentPhone);
|
||||||
|
jsonObject.addProperty("new_version", true);
|
||||||
|
String response = post(FAST_REGISTER_ENTERPRISE_WEAPP_URL, jsonObject.toString(), "access_token");
|
||||||
|
return WxOpenGsonBuilder.create().fromJson(response, WxOpenRegisterPersonalWeappResult.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxOpenRegisterPersonalWeappResult fastRegisterEnterpriseWeappQuery(String taskid) throws WxErrorException {
|
||||||
|
JsonObject jsonObject = new JsonObject();
|
||||||
|
jsonObject.addProperty("taskid", taskid);
|
||||||
|
jsonObject.addProperty("new_version", true);
|
||||||
|
String response = post(FAST_REGISTER_ENTERPRISE_WEAPP_QUERY_URL, jsonObject.toString(), "access_token");
|
||||||
|
return WxOpenGsonBuilder.create().fromJson(response, WxOpenRegisterPersonalWeappResult.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WxOpenResult fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName) throws WxErrorException {
|
public WxOpenResult fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName) throws WxErrorException {
|
||||||
JsonObject jsonObject = new JsonObject();
|
JsonObject jsonObject = new JsonObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user