From 76a64c586c8768a8dd857a962dea2f9985e8e2a7 Mon Sep 17 00:00:00 2001 From: apan Date: Fri, 5 Aug 2022 14:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/power/views.py | 5 +++-- db_logic/module_relation.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/power/views.py b/apps/power/views.py index e8829fe..e392ce9 100644 --- a/apps/power/views.py +++ b/apps/power/views.py @@ -93,10 +93,11 @@ def get_power_list(): # 思路:角色表角色id->模块权限表(object_id)-> 终端权限表() # | | # role_id=object_id module_id=module_id - page = int(request.values.get("page")) - page_size = int(request.values.get("page_size")) + page = int(request.values.get("page", 1)) + page_size = int(request.values.get("page_size", 15)) page_param = PageParam(page, page_size) data_list = BllModuleRelation().get_role_module(page_param) + return jsonify(Utils.true_return(data=Utils.msyql_table_model(data_list))) # 通过角色id查询角色列表 diff --git a/db_logic/module_relation.py b/db_logic/module_relation.py index 04f761e..27fd87c 100644 --- a/db_logic/module_relation.py +++ b/db_logic/module_relation.py @@ -90,7 +90,8 @@ class BllModuleRelation(Repository): count_number = 0 page_param.totalRecords=count_number page_sql_data = Utils.sql_paging_assemble(sql_all, page_param) - return page_sql_data + + return self.execute(page_sql_data).fetchall() def add_inster_user_moduele(self): role_id = "a699ff99-117b-11ed-a086-f47b094925e5"