parent
58a2c4c9c0
commit
811afd4093
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- encoding: utf-8 -*-
|
||||
'''
|
||||
@Date:2022/08/09 17:38:47
|
||||
'''
|
||||
import sys
|
||||
sys.path.append('.')
|
||||
|
||||
from db_logic.db_base import Repository
|
||||
from models.client_models import EntityClientCell
|
||||
from Common.Utils import Utils
|
||||
|
||||
class BllClientCell(Repository):
|
||||
|
||||
def __init__(self, entityType=EntityClientCell):
|
||||
super().__init__(entityType)
|
||||
|
||||
# 展示抽屉权限用户
|
||||
def get_drawer_power_user_list(self, drawer_id, page_param):
|
||||
sql_all = f"""
|
||||
select a.real_name, a.user_id,
|
||||
CASE WHEN b.id is not null THEN 1 ELSE 0 END drawer_type
|
||||
from rms_user as a LEFT JOIN (
|
||||
select * from rms_client_cell_user where client_cell_id='{drawer_id}'
|
||||
) as b on a.user_id=b.user_id
|
||||
"""
|
||||
try:
|
||||
count_number = len(self.execute(sql_all).fetchall())
|
||||
except Exception:
|
||||
count_number = 0
|
||||
page_param.totalRecords = count_number
|
||||
page_sql = Utils.sql_paging_assemble(sql_all, page_param)
|
||||
return self.execute(page_sql).fetchall()
|
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- encoding: utf-8 -*-
|
||||
'''
|
||||
@Date:2022/08/09 17:41:46
|
||||
'''
|
||||
import sys
|
||||
sys.path.append('.')
|
||||
|
||||
from db_logic.db_base import Repository
|
||||
from models.client_models import EntityClientCellUser
|
||||
|
||||
#用户操作业务逻辑类
|
||||
class BllClientCellUser(Repository):
|
||||
|
||||
def __init__(self, entityType=EntityClientCellUser):
|
||||
super().__init__(entityType)
|
||||
|
Loading…
Reference in new issue