// TODO-Shunli: now update group always failed, tip system error, check later public static JsonRtn updateGroup(License license, Group group) { if (group == null) { return JsonRtnUtil.buildFailureJsonRtn(JsonRtn.class, "missing group"); } return HttpUtil.postBodyRequest( WechatRequest.UPDATE_GROUP, license, new GroupWarpper(group), GroupJsonRtn.class); }
public static GroupIdJsonRtn getGroupIdByOpenId(License license, String openId) { if (StringUtils.isEmpty(openId)) { return JsonRtnUtil.buildFailureJsonRtn(GroupIdJsonRtn.class, "missing openId"); } return HttpUtil.postBodyRequest( WechatRequest.GET_GROUP_BY_OPEN_ID, license, new OpenId(openId), GroupIdJsonRtn.class); }
public static JsonRtn moveMember(License license, String openId, int toGroupId) { if (StringUtils.isEmpty(openId)) { return JsonRtnUtil.buildFailureJsonRtn(JsonRtn.class, "missing openId"); } return HttpUtil.postBodyRequest( WechatRequest.MOVE_MEMBER_GROUP, license, new MemberMovement(openId, toGroupId), GroupJsonRtn.class); }
public static GroupJsonRtn createGroup(License license, String groupName) { if (StringUtils.isEmpty(groupName)) { return JsonRtnUtil.buildFailureJsonRtn(GroupJsonRtn.class, "missing groupName"); } return HttpUtil.postBodyRequest( WechatRequest.CREATE_GROUP, license, new GroupWarpper(new Group(groupName)), GroupJsonRtn.class); }
public static GroupsJsonRtn getGroups(License license) { return HttpUtil.getRequest(WechatRequest.GET_GROUPS, license, GroupsJsonRtn.class); }