change tab space

change tab space 1 time
This commit is contained in:
tianmu
2015-12-21 19:41:42 +08:00
parent f8207ef65f
commit b2e1cca6c2

View File

@ -230,13 +230,13 @@ public class WxMpServiceImpl implements WxMpService {
} }
public void menuCreate(WxMenu menu) throws WxErrorException { public void menuCreate(WxMenu menu) throws WxErrorException {
if (menu.getMatchrule() != null) { if (menu.getMatchrule() != null) {
String url = "https://api.weixin.qq.com/cgi-bin/menu/addconditional"; String url = "https://api.weixin.qq.com/cgi-bin/menu/addconditional";
execute(new SimplePostRequestExecutor(), url, menu.toJson()); execute(new SimplePostRequestExecutor(), url, menu.toJson());
} else { } else {
String url = "https://api.weixin.qq.com/cgi-bin/menu/create"; String url = "https://api.weixin.qq.com/cgi-bin/menu/create";
execute(new SimplePostRequestExecutor(), url, menu.toJson()); execute(new SimplePostRequestExecutor(), url, menu.toJson());
} }
} }
public void menuDelete() throws WxErrorException { public void menuDelete() throws WxErrorException {
@ -245,7 +245,7 @@ public class WxMpServiceImpl implements WxMpService {
} }
public void menuDelete(String menuid) throws WxErrorException { 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); execute(new SimpleGetRequestExecutor(), url, "menuid=" + menuid);
} }
@ -264,11 +264,11 @@ public class WxMpServiceImpl implements WxMpService {
} }
public WxMenu menuTryMatch(String userid) throws WxErrorException { public WxMenu menuTryMatch(String userid) throws WxErrorException {
String url = "https://api.weixin.qq.com/cgi-bin/menu/trymatch"; String url = "https://api.weixin.qq.com/cgi-bin/menu/trymatch";
try { try {
String resultContent = execute(new SimpleGetRequestExecutor(), url, "user_id=" + userid); String resultContent = execute(new SimpleGetRequestExecutor(), url, "user_id=" + userid);
return WxMenu.fromJson(resultContent); return WxMenu.fromJson(resultContent);
} catch (WxErrorException e) { } catch (WxErrorException e) {
// 46003 不存在的菜单数据 46002 不存在的菜单版本 // 46003 不存在的菜单数据 46002 不存在的菜单版本
if (e.getError().getErrorCode() == 46003 || e.getError().getErrorCode() == 46002) { if (e.getError().getErrorCode() == 46003 || e.getError().getErrorCode() == 46002) {
return null; return null;