create_by/update_by 为 BIGINT(非 varchar),del_flag 为 character(1 char)/char(1)(非 integer),新增 create_dept BIGINTtenant_id(BIGINT),非多租户表不含doc/ecs-course-requirements.md 生成前端代码src/api/ecs/course/types.ts:新增 CourseTeacherVO 从表类型、teacherNames 字段、courseType/dataSource 查询条件src/api/ecs/course/index.ts:新增导入导出接口(exportTemplate/importData/exportCourse)src/views/ecs/course/index.vue:完整列表页,含 course_type/data_source 双字典、导入导出按钮、dataSource 第三方数据锁定src/views/ecs/course/form.vue:新增表单页(替代旧 detail.vue),含从表教师多选表格、字典下拉、必填校验relativeURL.replace is not a functionproxy?.download(url, params, fileName) 的第一个参数期望是 URL 字符串,但生成代码把 axios response 对象传了进去
const res = await exportTemplate(); proxy?.download(res, 'xxx.xlsx')download 函数(来自 @/utils/request)会内部调用 service.post(url, ...),所以不需要先发请求再传结果proxy?.download
proxy?.download('ecs/course/exportTemplate', {}, '课程导入模板_xxx.xlsx')proxy?.download('ecs/course/export', { ...queryParams }, '课程数据_xxx.xlsx')API清理:删除 api/ecs/course/index.ts 中的 exportTemplate、importData、exportCourse 三个函数(导入用 el-upload 的 action 方式,导出/模板用 proxy.download 方式)
问题:A.4 代码生成模板节只列了主表 VO 映射,从表 VO 未列出,导致从表生成的 Vo 类缺少 @AutoMapper 注解
修复:A.4 节拆分为「主表」和「从表」两部分,明确从表复用 Vo.java.template(含 @AutoMapper),并加了 ⚠️ 强调说明
模板本身无需修改:Vo.java.template 第5行已有 import io.github.linpeilie.annotations.AutoMapper,第22行已有 @AutoMapper(target = ${ClassName}.class),只需按正确类名填充即可
EcsCourseBo/EcsCourseVo 中从表字段名为 teacherList,前端 types.ts 中为 courseTeacherList,JSON 序列化/反序列化不一致从表关联字段(Bo/Vo)→ private List<{SubName}Vo> {Name}{Sub}List;EcsCourseVo.java:teacherList → courseTeacherListEcsCourseBo.java:teacherList → courseTeacherListEcsCourseServiceImpl.java:5处引用全部更新为 setCourseTeacherList/getCourseTeacherList{Name}{Sub}List(主表名首字母小写 + 从表名 + List),例如 EcsCourse + Teacher = courseTeacherListEcsCourseTeacherVo.java:第21行新增 @AutoMapper(target = EcsCourseTeacher.class),第7行导入 EcsCourseTeacherEcsCourseVo.java 第25行 @AutoMapper(target = EcsCourse.class) → 结构完全一致/dev 生成从表 VO 时会用 Vo.java.template 正确填充 @AutoMapper(target = {SubName}.class)templates/view-list.vue:新增"更多"下拉菜单(下载模板/导入数据/导出数据)+ upload reactive + 导入弹窗 + 所有处理方法SKILL.md:api/index.ts 示例去掉 export 函数,新增导入导出说明块references/api-style.md:导出改为 proxy?.download(),新增完整的导出导入规范章节references/vue-style.md:列表页工具栏增加"更多"下拉,script 增加 upload + 导入导出方法proxy?.download(url, params, fileName) 方式el-upload action 属性 + globalHeaders() + ImportOption reactivelockRule:当某字段值决定行级操作权限时使用{ lockValue: 值, lockActions: [edit, delete], tip: 提示文案 }dataSource=1(第三方同步)时禁止编辑和删除references/requirements-template.md:字段属性速查表增加 lockRule 行 + lockRule 格式说明 + 示例字段SKILL.md:字段通用默认值增加 lockRule、解析规则"来源"增加 lockRule 推断、VO结构说明增加"有lockRule的字段必须加入VO"、注意事项第8条doc/ecs-course-requirements.md:dataSource 字段改为 inTable=false/inQuery=false,增加 lockRule 配置,备注增加锁定规则说明inQuery=false/inTable=falseindex.vue:删除搜索栏 dataSource 下拉、删除 data_source 字典引用、删除 queryParams.dataSourcetypes.ts:删除 CourseQuery.dataSource 字段form.vue:保留 dataSource 字段和 data_source 字典(表单仍需要)dataSource.inForm=false/inAdd=false/inEdit=false,删除 required/dictType/componentform.vue:删除 dataSource 表单项、删除 data_source 字典引用、删除 formData.dataSource、删除 formRules.dataSourcetypes.ts:CourseForm 中删除 dataSource 字段(CourseVO 保留,供列表页操作列判断)SKILL.md:types.ts 映射增加 lockRule 注释、注意事项第6条references/vue-style.md:操作列增加 lockRule 注释示例 + 新增完整的 lockRule 规范章节