Score
0
Watch 727 Star 1.7K Fork 733

GVPsd4324530 / fastweixinJavaApache-2.0

创建 Menu 不够方便

Open
jorneyr  Opened this issue

感觉 MenuApi.createMenu() 创建菜单不够方便,希望提供一个结构,MenuApi.createMenu() 直接接受 Menu 的 JSON 字符串创建菜单,例如

public ResultType createMenu(String menuJson) {
    BeanUtil.requireNonNull(menu, "menu is null");
    String url = BASE_API_URL;
    if (BeanUtil.isNull(menu.getMatchrule())) {
        //普通菜单
        LOG.debug("创建普通菜单.....");
        url += "cgi-bin/menu/create?access_token=#";
    } else {
        //个性化菜单
        LOG.debug("创建个性化菜单.....");
        url += "cgi-bin/menu/addconditional?access_token=#";
    }
    BaseResponse response = executePost(url, menuJson);
    return ResultType.get(response.getErrcode());
}

total 1 participants

Comments (0)

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/pyinjava/fastweixin.git
git@gitee.com:pyinjava/fastweixin.git
pyinjava
fastweixin
fastweixin

Help Search