59 lines
2.0 KiB
Markdown
59 lines
2.0 KiB
Markdown
# 班级信息「所在校区」Implementation Plan
|
|
|
|
> **For agentic workers:** Implement task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
|
|
**Goal:** 为班级信息增加选填「所在校区」,支持列表筛选、单条维护、批量设置、导入模板下拉与导入解析。
|
|
|
|
**Architecture:** `xg_class_msg` 增加 `campus_id` + `campus_name`;增改/批量由服务端按 `xg_dorm_campus` 回填名称;导入按校区名称解析;前端复用 `listDormCampus`。
|
|
|
|
**Tech Stack:** Spring Boot 3 + MyBatis-Plus、Vue 3 + Element Plus、FastExcel 下拉
|
|
|
|
**Spec:** `docs/superpowers/specs/2026-09-01-class-msg-campus-design.md`
|
|
|
|
---
|
|
|
|
## File map
|
|
|
|
| File | Responsibility |
|
|
|------|----------------|
|
|
| `docs/数据库脚本/2026-09-01-xg_class_msg-add-campus.sql` | 加列+索引 |
|
|
| `XgClassMsg.java` / Bo / Vo / ImportVo | 字段与 Excel 列 |
|
|
| `XgClassCampusBatchBo.java` | 批量请求体 |
|
|
| `XgClassMsgController` / Service / Impl | 筛选、回填、batch、模板下拉 |
|
|
| `XgClassMsgImportListener` | 导入解析校区 |
|
|
| `XgClassMsgMapper.xml` | resultMap + select 补字段 |
|
|
| `web/.../classMsg/types.ts` + `index.ts` | 类型与 batch API |
|
|
| `web/.../classMsg/index.vue` | 搜索/列/表单/批量弹窗 |
|
|
|
|
---
|
|
|
|
### Task 1: 数据库
|
|
|
|
- [ ] 编写并(在可连库时)执行增量 SQL
|
|
|
|
### Task 2: 后端领域模型 + Mapper
|
|
|
|
- [ ] Entity/Bo/Vo 加 `campusId`/`campusName`;Vo 导出 Excel 列「所在校区」
|
|
- [ ] ImportVo 插入「所在校区」列并顺延后续 index
|
|
- [ ] Mapper.xml 补字段
|
|
|
|
### Task 3: 服务与接口
|
|
|
|
- [ ] `buildQueryWrapper` 支持 `campusId`
|
|
- [ ] insert/update 前校验并回填 `campusName`(空则清空)
|
|
- [ ] `updateCampusBatch` + Controller `PUT /campus/batch`
|
|
- [ ] importTemplate 增加校区下拉
|
|
|
|
### Task 4: 导入监听
|
|
|
|
- [ ] 按校区名称解析;空跳过;0/多匹配失败
|
|
|
|
### Task 5: 前端
|
|
|
|
- [ ] types + `updateClassCampusBatch`
|
|
- [ ] 搜索、表格列、表单、批量弹窗
|
|
|
|
### Task 6: 文档
|
|
|
|
- [ ] 更新 spec 状态为已实现;按需补业务/API 说明
|