refactor: P4c 最终批次-2 dictionary 模块(dict+dict_item 合并服务)

【修复合并遗留】
- 重命名重名函数(_apply_dict_item_filters/get_dict_item_info/
  _build_dict_item_page_data),修复 get_info 调用点
- router 双 blueprint 合并导入、dict_item 视图函数重命名
- schema/service/models 中部重复 import 行级去重
- 修复 schema typo DictItemItem
- models.py 误改后从 git 恢复(P4c 不需改 models)

【教训】regex 改复杂合并文件易误伤(.*?跨 docstring 匹配删了顶部导入),
已恢复并改用精确行级去重

【验收】flake8 零告警;应用启动;dict/dict_item 分页运行时正常;12 passed

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
DjangoAdmin Dev
2026-08-07 16:26:33 +08:00
co-authored by Claude
parent a054b14485
commit 9acbf6275e
7 changed files with 288 additions and 426 deletions
+15
View File
@@ -0,0 +1,15 @@
"""
Dict 仓储模块
=============================================================
数据访问层,继承 BaseRepository 获得通用 CRUD 能力。
"""
from src.common.base_repository import BaseRepository
from src.modules.dictionary.models import Dict
class DictRepository(BaseRepository):
"""Dict 仓储"""
model = Dict