|
@@ -292,7 +292,6 @@ class MySQLUserManager(UserManager):
|
|
|
"data": staff_list
|
|
|
}
|
|
|
|
|
|
-
|
|
|
class LocalUserRelationManager(UserRelationManager):
|
|
|
def __init__(self):
|
|
|
pass
|
|
@@ -434,25 +433,3 @@ class MySQLUserRelationManager(UserRelationManager):
|
|
|
except Exception as e:
|
|
|
logger.error(f"stop_user_daily_push failed: {e}")
|
|
|
return False
|
|
|
-
|
|
|
-
|
|
|
-if __name__ == '__main__':
|
|
|
- config = configs.get()
|
|
|
- user_db_config = config['storage']['user']
|
|
|
- staff_db_config = config['storage']['staff']
|
|
|
- user_manager = MySQLUserManager(user_db_config['mysql'], user_db_config['table'], staff_db_config['table'])
|
|
|
- user_profile = user_manager.get_user_profile('7881301263964433')
|
|
|
- print(user_profile)
|
|
|
-
|
|
|
- wecom_db_config = config['storage']['user_relation']
|
|
|
- user_relation_manager = MySQLUserRelationManager(
|
|
|
- user_db_config['mysql'], wecom_db_config['mysql'],
|
|
|
- config['storage']['staff']['table'],
|
|
|
- user_db_config['table'],
|
|
|
- wecom_db_config['table']['staff'],
|
|
|
- wecom_db_config['table']['relation'],
|
|
|
- wecom_db_config['table']['user']
|
|
|
- )
|
|
|
- # all_staff_users = user_relation_manager.list_staff_users()
|
|
|
- user_tags = user_relation_manager.get_user_tags('7881302078008656')
|
|
|
- print(user_tags)
|