Преглед на файлове

MOD:获取公众号名,投手名

cxyu преди 3 години
родител
ревизия
80c95c5df9
променени са 2 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 4 4
      data_manage/operate.py
  2. 2 2
      model/UserAuthUtils.py

+ 4 - 4
data_manage/operate.py

@@ -85,7 +85,7 @@ def get_channel(arg):
         sql = f"select id,nick_name from t_mp_account where nick_name like '%{name}%' and del_flag=0"
         return db.zx.getData_json(sql)
     # 普通权限------java,获取本人对应拥有的公众号
-    rsp = requests.get(f'http://api.zanxiangnet.com/system/api/mp/mpAccount/subAccountWithUser/{user_id}')
+    rsp = requests.get(f'http://api.zanxiangnet.com/system/api/mp/mpAccount/subAccountWithUser/3/{user_id}')
     channel_list = rsp.json()['data']
     data1 = []
     for _ in channel_list:
@@ -112,14 +112,14 @@ def get_pitcher(arg):
     user_id = arg.get('user_id')
     if user_id in super_auth():
         user_list = []
-        url = 'http://api.zanxiangnet.com/erp/api/user/allPutUser'
+        url = 'http://api.zanxiangnet.com/system/api/mp/mpAccount/allPutUser/3'
         rsp = requests.get(url)
         for _ in rsp.json()['data']:
             user_list.append({'user_id': _['userId'], 'nick_name': _['nickName']})
         return user_list
 
     user_list = []
-    rsp = requests.get(url=f'http://api.zanxiangnet.com/erp/api/user/subUser/{user_id}')
+    rsp = requests.get(url=f'http://api.zanxiangnet.com/erp/api/user/subUser/3/{user_id}')
     for _ in rsp.json()['data']:
         user_list.append({'user_id': _['userId'], 'nick_name': _['nickName']})
 
@@ -127,7 +127,7 @@ def get_pitcher(arg):
 
 
 def get_user_name_by_id(user_id):
-    rsp = requests.get(url=f'http://api.zanxiangnet.com/erp/api/user/subUser/{user_id}')
+    rsp = requests.get(url=f'http://api.zanxiangnet.com/erp/api/user/subUser/3/{user_id}')
     nick_name = None
     for _ in rsp.json()['data']:
         if str(_['userId']) == str(user_id):

+ 2 - 2
model/UserAuthUtils.py

@@ -4,7 +4,7 @@ import requests
 
 def get_auth_user(user_id):
     """获取用户拥有所有用户(包括自己)的权限"""
-    rsp = requests.get(url=f'http://api.zanxiangnet.com/erp/api/user/subUser/{user_id}')
+    rsp = requests.get(url=f'http://api.zanxiangnet.com/erp/api/user/subUser/3/{user_id}')
     nick_name_list = []
     for _ in rsp.json()['data']:
         nick_name_list.append(_['nickName'])
@@ -15,7 +15,7 @@ def get_auth_channel(user_id):
 
     db = MysqlUtils()
     # 普通权限------java,获取本人对应拥有的公众号
-    rsp = requests.get(f'http://api.zanxiangnet.com/system/api/mp/mpAccount/subAccountWithUser/{user_id}')
+    rsp = requests.get(f'http://api.zanxiangnet.com/system/api/mp/mpAccount/subAccountWithUser/3/{user_id}')
     channel_list = rsp.json()['data']
     data1 = []
     for _ in channel_list: