refactor: 重构服务层方法命名规范

fix: 修复文件下载和删除功能
fix: 修复Redis哈希获取方法返回值类型
fix: 修复权限检查逻辑

perf: 优化部门和服务详情查询性能
perf: 优化角色数据范围显示

style: 清理无用导入和注释
style: 统一CRUD方法命名

docs: 更新main.py中的命令说明

chore: 移动IP定位工具类位置
chore: 更新.gitignore忽略迁移版本文件
This commit is contained in:
zhangtao
2025-10-03 03:31:45 +08:00
parent 7b9d8d7854
commit 119964e6f9
42 changed files with 326 additions and 545 deletions
+3 -3
View File
@@ -89,7 +89,7 @@ async def clear_monitor_cache_name_controller(
"""清除指定缓存名称下的所有缓存"""
result = await CacheService.clear_cache_monitor_cache_name_service(redis=redis, cache_name=cache_name)
if not result:
raise CustomException(message='清除缓存失败', data=result)
raise CustomException(msg='清除缓存失败', data=result)
logger.info(f'清除缓存{cache_name}成功')
return SuccessResponse(msg=f'{cache_name}对应键值清除成功', data=result)
@@ -107,7 +107,7 @@ async def clear_monitor_cache_key_controller(
"""清除指定缓存键"""
result = await CacheService.clear_cache_monitor_cache_key_service(redis=redis, cache_key=cache_key)
if not result:
raise CustomException(message='清除缓存失败', data=result)
raise CustomException(msg='清除缓存失败', data=result)
logger.info(f'清除缓存键{cache_key}成功')
return SuccessResponse(msg=f'{cache_key}清除成功', data=result)
@@ -124,6 +124,6 @@ async def clear_monitor_cache_all_controller(
"""清除所有缓存"""
result = await CacheService.clear_cache_monitor_all_service(redis=redis)
if not result:
raise CustomException(message='清除缓存失败', data=result)
raise CustomException(msg='清除缓存失败', data=result)
logger.info('清除所有缓存成功')
return SuccessResponse(msg='所有缓存清除成功', data=result)