|
@@ -10,6 +10,7 @@ def get_auth_user(user_id):
|
|
|
nick_name_list.append(_['nickName'])
|
|
|
return nick_name_list
|
|
|
|
|
|
+
|
|
|
def get_auth_channel(user_id):
|
|
|
"""获取用户拥有的所有公众号权限"""
|
|
|
|
|
@@ -39,12 +40,21 @@ def get_auth_channel(user_id):
|
|
|
|
|
|
def super_auth():
|
|
|
"获取超级数据权限的用户列表"
|
|
|
- db = MysqlUtils()
|
|
|
- sql = "select user_id from t_sys_user_role where role_id =39"
|
|
|
- return db.zx.getOneList(sql)
|
|
|
+ rsp = requests.get('http://api.zanxiangnet.com/erp/api/user/search/3?powerLevelMin=99')
|
|
|
+ user_list = []
|
|
|
+ for _ in rsp.json()['data']:
|
|
|
+ user_list.append(_['userId'])
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
# print(get_auth_channel(109))
|
|
|
# print(get_role(78))
|
|
|
- print(f"ssed{tuple([1, 3, 4])}")
|
|
|
+ # print(f"ssed{tuple([1, 3, 4])}")
|
|
|
+ # super_auth()
|
|
|
+ rsp = requests.get('http://api.zanxiangnet.com/system/api/mp/mpAccount/search/1')
|
|
|
+ channel_list = []
|
|
|
+ for _ in rsp.json()['data']:
|
|
|
+ # print(_['data'])
|
|
|
+ channel_list.append((_['id'], _['nickName']))
|
|
|
+ print(type(_['id']))
|
|
|
+ print(channel_list)
|