(cls, app, menuid=None)
return list(q.all())
获取数据库中公众号菜单配置
获取数据库中公众号菜单配置
获取数据库中公众号菜单配置
def get_menus(cls, app, menuid=None):
        """获取数据库中公众号菜单配置"""
        q = app.menus.filter(parent_id__isnull=True)
        q = q.filter(menuid=menuid) if menuid else q.filter(menuid__isnull=True)
        return list(q.all())
def get_menus ( cls , app , menuid = None ) : q = app . menus . filter ( parent_id__isnull = True ) q = q . filter ( menuid = menuid ) if menuid else q . filter ( menuid__isnull = True ) return list ( q . all ( ) )