refactor: 清理代码质量和移除未使用文件

- 移除未使用的导入语句和变量
- 修复代码风格问题(空格、格式化等)
- 删除备份文件和测试文件
- 改进异常处理链式调用
- 添加权限系统数据库模型和配置
- 更新版本号至6.4.4
- 优化SQL查询使用正确的布尔表达式
This commit is contained in:
雅诺狐
2025-08-24 22:11:20 +08:00
parent 702112fdc4
commit f308adcf5b
26 changed files with 1664 additions and 677 deletions

View File

@@ -19,7 +19,7 @@ def add_new_plans(plans: List[str], month: str):
# 1. 获取当前有效计划数量
current_plan_count = session.query(MonthlyPlan).filter(
MonthlyPlan.target_month == month,
MonthlyPlan.is_deleted == False
not MonthlyPlan.is_deleted
).count()
# 2. 从配置获取上限
@@ -62,7 +62,7 @@ def get_active_plans_for_month(month: str) -> List[MonthlyPlan]:
try:
plans = session.query(MonthlyPlan).filter(
MonthlyPlan.target_month == month,
MonthlyPlan.is_deleted == False
not MonthlyPlan.is_deleted
).all()
return plans
except Exception as e: