public ResultType createMenu(Menu menu) {
        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, menu.toJsonString());
        return ResultType.get(response.getErrcode());
    }
public ResultType createMenu ( Menu menu ) { 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 , menu . toJsonString ( ) ) ; return ResultType . get ( response . getErrcode ( ) ) ; }
创建菜单
1.3.7开始支持个性化菜单

@param menu 菜单对象
@return 调用结果