refactor(repo): 收敛 base_model 双轨,删除函数统一走 repo.batch_delete_r

- shared/base_repository.py 新增 batch_delete_r(返回 R,等价原 base_model 语义)
- 20 个模块删除函数从 Model.batch_delete_r 改为 x_repo.batch_delete_r
- shared/base_model.py 移除 classmethod(get_by_id/get_by_ids/get_all_active/exists/batch_delete_r),只留字段 + to_dict
- 清理 base_model 多余 imports
- 实测 dept 删除、批量删除及多模块读接口正常

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2026-08-07 11:28:25 +08:00
co-authored by Claude
parent 2cb71cc50d
commit ae2e141713
17 changed files with 46 additions and 99 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ def update_dept(request, data: DeptForm):
# 删除部门
def delete_dept(dept_id):
return Dept.batch_delete_r(dept_id)
return dept_repo.batch_delete_r(dept_id)
# 获取部门列表
def get_dept_list():