mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
refactor: 完成系统架构升级与模块拆分
本次提交进行了大规模的系统重构: 1. 拆分租户相关模块到platform平台层,重构租户表名与关联关系 2. 迁移日志、工单、插件等模块到对应层级,统一代码结构 3. 重构批量操作接口路径,从/available/setting改为/status/batch 4. 新增批量删除基础模型,统一处理批量操作逻辑 5. 优化导入导出接口,修正路由方法与描述信息 6. 修复循环引用问题,重构依赖注入与类型导入 7. 更新初始化脚本与路由注册,新增平台管理路由 8. 重构岗位模型,新增岗位编码字段与校验 9. 完善部门删除逻辑,新增子部门删除限制 10. 更新初始化数据与配置文件,适配新架构
This commit is contained in:
@@ -262,6 +262,28 @@ class ParamsService:
|
||||
log.error(f"删除系统配置失败: {e}")
|
||||
raise CustomException(msg="删除字典类型失败")
|
||||
|
||||
@classmethod
|
||||
async def batch_set_status_service(cls, auth: AuthSchema, ids: list[int], status: str) -> None:
|
||||
"""
|
||||
批量设置系统参数状态
|
||||
|
||||
参数:
|
||||
- auth (AuthSchema): 认证信息模型
|
||||
- ids (list[int]): 系统参数ID列表
|
||||
- status (str): 状态值
|
||||
|
||||
返回:
|
||||
- None
|
||||
"""
|
||||
if not ids:
|
||||
raise CustomException(msg="请选择要操作的数据")
|
||||
|
||||
await ParamsCRUD(auth).update_obj_crud(
|
||||
ids=ids,
|
||||
data={"status": status},
|
||||
)
|
||||
log.info(f"批量设置系统参数状态成功: ids={ids}, status={status}")
|
||||
|
||||
@classmethod
|
||||
async def export_obj_service(cls, data_list: list[dict]) -> bytes:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user