def get_all_permission(): query_data = g.json_data start, pagesize = HttpHelper.get_page_info() if query_data: paginated_obj = AuthPermission.get_pagination(start, pagesize, **query_data) else: paginated_obj = AuthPermission.get_pagination(start, pagesize) return HttpHelper.normal_handler(pagination_to_dict(paginated_obj))
def get_all_roles(): """ 获取Role全部列表,因为内容不多,不进行分页展示 :return: """ query_data = g.json_data start, pagesize = HttpHelper.get_page_info() if query_data: paginated_obj = AuthRole.get_pagination(start, pagesize, **query_data) else: paginated_obj = AuthRole.get_pagination(start, pagesize) return HttpHelper.normal_handler(pagination_to_dict(paginated_obj))
def get_users(): """ 获取用户列表,分页返回 :return: json """ query_data = g.json_data start, pagesize = HttpHelper.get_page_info() if query_data: paginated_user = User.get_pagination_user(start, pagesize, **query_data) else: paginated_user = User.get_pagination_user(start, pagesize) return HttpHelper.normal_handler(pagination_to_dict(paginated_user))