Visitar URL original
新增客户群opengid转换 & 入群欢迎语素材管理相关API by wslongchen · Pull Request #2372 · binarywang/WxJava · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
修改opengid
  • Loading branch information
wslongchen authored Nov 3, 2021
commit 3056599b012bd80c314fe3b305157b695cfcc4eb
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ public String unionidToExternalUserid(@NotNull String unionid,String openid) thr
}

@Override
public String openidToChatid(@NotNull String openid) throws WxErrorException {
public String opengidToChatid(@NotNull String opengid) throws WxErrorException {
JsonObject json = new JsonObject();
json.addProperty("openid",openid);
json.addProperty("opengid",opengid);
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(OPENID_TO_CHATID);
String responseContent = this.mainService.post(url, json.toString());
JsonObject tmpJson = GsonParser.parse(responseContent);
return tmpJson.get("external_userid").getAsString();
return tmpJson.get("chat_id").getAsString();
}

@Override
Expand Down