浏览代码

change tab space

change tab space 1 time
master
tianmu 9 年前
父节点
当前提交
b2e1cca6c2
共有 1 个文件被更改,包括 13 次插入13 次删除
  1. +13
    -13
      weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpServiceImpl.java

+ 13
- 13
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpServiceImpl.java 查看文件

@@ -230,13 +230,13 @@ public class WxMpServiceImpl implements WxMpService {
}

public void menuCreate(WxMenu menu) throws WxErrorException {
if (menu.getMatchrule() != null) {
String url = "https://api.weixin.qq.com/cgi-bin/menu/addconditional";
execute(new SimplePostRequestExecutor(), url, menu.toJson());
} else {
String url = "https://api.weixin.qq.com/cgi-bin/menu/create";
execute(new SimplePostRequestExecutor(), url, menu.toJson());
}
if (menu.getMatchrule() != null) {
String url = "https://api.weixin.qq.com/cgi-bin/menu/addconditional";
execute(new SimplePostRequestExecutor(), url, menu.toJson());
} else {
String url = "https://api.weixin.qq.com/cgi-bin/menu/create";
execute(new SimplePostRequestExecutor(), url, menu.toJson());
}
}

public void menuDelete() throws WxErrorException {
@@ -245,7 +245,7 @@ public class WxMpServiceImpl implements WxMpService {
}
public void menuDelete(String menuid) throws WxErrorException {
String url = "https://api.weixin.qq.com/cgi-bin/menu/delconditional";
String url = "https://api.weixin.qq.com/cgi-bin/menu/delconditional";
execute(new SimpleGetRequestExecutor(), url, "menuid=" + menuid);
}

@@ -264,11 +264,11 @@ public class WxMpServiceImpl implements WxMpService {
}
public WxMenu menuTryMatch(String userid) throws WxErrorException {
String url = "https://api.weixin.qq.com/cgi-bin/menu/trymatch";
try {
String resultContent = execute(new SimpleGetRequestExecutor(), url, "user_id=" + userid);
return WxMenu.fromJson(resultContent);
} catch (WxErrorException e) {
String url = "https://api.weixin.qq.com/cgi-bin/menu/trymatch";
try {
String resultContent = execute(new SimpleGetRequestExecutor(), url, "user_id=" + userid);
return WxMenu.fromJson(resultContent);
} catch (WxErrorException e) {
// 46003 不存在的菜单数据 46002 不存在的菜单版本
if (e.getError().getErrorCode() == 46003 || e.getError().getErrorCode() == 46002) {
return null;


正在加载...
取消
保存