mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-27 11:53:48 +08:00
🆕 #2752 【小程序】增加查询小程序版本信息的接口以及第三方userid_to_openuserid的接口
This commit is contained in:
@ -251,6 +251,11 @@ public interface WxOpenMaService extends WxMaService {
|
||||
*/
|
||||
String API_WX_AMP_LINK_UN = "https://api.weixin.qq.com/cgi-bin/wxopen/wxampunlink";
|
||||
|
||||
/**
|
||||
* 小程序管理-查询小程序版本信息
|
||||
*/
|
||||
String API_GET_VERSION_INFO = "https://api.weixin.qq.com/wxa/getversioninfo";
|
||||
|
||||
/**
|
||||
* 获得小程序的域名配置信息
|
||||
*
|
||||
@ -702,4 +707,12 @@ public interface WxOpenMaService extends WxMaService {
|
||||
*/
|
||||
WxOpenResult wxAmpUnLink(String appid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 查询小程序版本信息
|
||||
*
|
||||
* @return the wx open result
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxOpenResult getVersionInfo() throws WxErrorException;
|
||||
|
||||
}
|
||||
|
||||
@ -439,4 +439,12 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
|
||||
}
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxOpenResult getVersionInfo() throws WxErrorException {
|
||||
JsonObject params = new JsonObject();
|
||||
String response = post(API_GET_VERSION_INFO, GSON.toJson(params));
|
||||
WxOpenResult result = WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user