refactor(backend): 重构控制器和信息服务方法命名

- 更新了多个控制器文件中的函数命名,增加了 _controller 后缀
- 更新了多个服务文件中的函数命名,增加了 _service 后缀
- 统一了命名格式,提高了代码的可读性和可维护性
This commit is contained in:
zhangtao
2025-04-15 03:03:45 +08:00
parent 6e0e1303e1
commit da957dca55
45 changed files with 606 additions and 641 deletions
@@ -14,7 +14,7 @@ class OnlineService:
"""在线用户管理模块服务层"""
@classmethod
async def get_online_list(cls, request: Request, search: OnlineQueryParams) -> List[Dict]:
async def get_online_list_service(cls, request: Request, search: OnlineQueryParams) -> List[Dict]:
"""获取在线用户列表信息"""
# 获取所有在线用户信息
token_keys = await RedisCURD(request.app.state.redis).get_keys(f'{RedisInitKeyConfig.ONLINE_USER.key}*')
@@ -46,7 +46,7 @@ class OnlineService:
return online_list
@classmethod
async def delete_online(cls, request: Request, username: str) -> bool:
async def delete_online_service(cls, request: Request, username: str) -> bool:
"""强制下线在线用户"""
if not username:
raise CustomException(msg='传入username不能为空')