|
@@ -169,7 +169,8 @@ class MySQLUserRelationManager(UserRelationManager):
|
|
return []
|
|
return []
|
|
|
|
|
|
def list_staff_users(self):
|
|
def list_staff_users(self):
|
|
- sql = f"SELECT third_party_user_id, wxid FROM {self.agent_staff_table} WHERE status = 1"
|
|
|
|
|
|
+ sql = (f"SELECT third_party_user_id, wxid FROM {self.agent_staff_table} WHERE status = 1"
|
|
|
|
+ f" AND third_party_user_id = '1688854492669990'")
|
|
agent_staff_data = self.agent_db.select(sql, pymysql.cursors.DictCursor)
|
|
agent_staff_data = self.agent_db.select(sql, pymysql.cursors.DictCursor)
|
|
if not agent_staff_data:
|
|
if not agent_staff_data:
|
|
return []
|
|
return []
|
|
@@ -191,7 +192,7 @@ class MySQLUserRelationManager(UserRelationManager):
|
|
sql = f"SELECT union_id FROM {self.user_table} WHERE id IN {str(user_ids)} AND union_id is not null"
|
|
sql = f"SELECT union_id FROM {self.user_table} WHERE id IN {str(user_ids)} AND union_id is not null"
|
|
user_data = self.wecom_db.select(sql, pymysql.cursors.DictCursor)
|
|
user_data = self.wecom_db.select(sql, pymysql.cursors.DictCursor)
|
|
if not user_data:
|
|
if not user_data:
|
|
- logging.error(f"staff[{wxid}] users not found in wecom database")
|
|
|
|
|
|
+ logging.warning(f"staff[{wxid}] users not found in wecom database")
|
|
continue
|
|
continue
|
|
user_union_ids = tuple(user['union_id'] for user in user_data)
|
|
user_union_ids = tuple(user['union_id'] for user in user_data)
|
|
batch_size = 100
|
|
batch_size = 100
|