From b1cbc3fc45df1560adccf6df8c84e8e7fefa025b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=B8=85?= Date: Mon, 27 Oct 2025 11:26:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E3=80=90=E4=B8=93=E4=B8=9A=E4=BB=8B=E7=BB=8D?= =?UTF-8?q?=E3=80=91=E7=AD=896=E4=B8=AA=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E4=BF=A1=E6=81=AF=E7=A7=BB=E5=8A=A8=E8=87=B3?= =?UTF-8?q?=E3=80=90=E8=81=8C=E4=B8=9A=E4=BF=A1=E6=81=AF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hezhi/controller/TbCourseController.java | 16 ++++ .../java/com/ruoyi/hezhi/domain/TbCourse.java | 18 ++++ .../com/ruoyi/hezhi/domain/TbMajorClass.java | 18 ---- .../ruoyi/hezhi/service/ITbCourseService.java | 8 ++ .../service/impl/TbCourseServiceImpl.java | 14 ++++ .../resources/mapper/hezhi/TbCourseMapper.xml | 13 +++ .../mapper/hezhi/TbMajorClassMapper.xml | 2 +- ruoyi-ui/src/api/hezhi/course.js | 9 ++ ruoyi-ui/src/views/hezhi/course/index.vue | 83 ++++++++++++++++++- ruoyi-ui/src/views/hezhi/majorClass/index.vue | 36 ++++---- 10 files changed, 178 insertions(+), 39 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/hezhi/controller/TbCourseController.java b/ruoyi-admin/src/main/java/com/ruoyi/hezhi/controller/TbCourseController.java index 87d508b..5e266d5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/hezhi/controller/TbCourseController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/hezhi/controller/TbCourseController.java @@ -114,6 +114,22 @@ public class TbCourseController extends BaseController return AjaxResult.success(); } + /** + * 新增课程 + */ + @PreAuthorize("@ss.hasPermi('hezhi:course:add')") + @Log(title = "课程-专业介绍", businessType = BusinessType.INSERT) + @PostMapping("/addCourseMajor") + public AjaxResult addCourseMajor(@RequestBody TbCourse tbCourse) + { + TbCourse course = tbCourseService.selectTbCourseByCourseId(tbCourse.getCourseId()); + if (null == course) { + return AjaxResult.error("课程不存在,请检查后重试"); + } + tbCourseService.updateTbCourseById(tbCourse); + return AjaxResult.success(); + } + /** * 修改课程 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/hezhi/domain/TbCourse.java b/ruoyi-system/src/main/java/com/ruoyi/hezhi/domain/TbCourse.java index c503eef..8205169 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/hezhi/domain/TbCourse.java +++ b/ruoyi-system/src/main/java/com/ruoyi/hezhi/domain/TbCourse.java @@ -174,4 +174,22 @@ public class TbCourse extends BaseEntity @Excel(name = "参考资料") private String courseInformation; + /** 专业介绍 */ + private String majorDetails; + + /** 研究方向 */ + private String majorOverview; + + /** 实践环节 */ + private String majorSyllabus; + + /** 就业方向 */ + private String majorKnowledge; + + /** 政策支持 */ + private String majorCertificate; + + /** 证书样本 */ + private String majorInformation; + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/hezhi/domain/TbMajorClass.java b/ruoyi-system/src/main/java/com/ruoyi/hezhi/domain/TbMajorClass.java index 3484894..fdab18f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/hezhi/domain/TbMajorClass.java +++ b/ruoyi-system/src/main/java/com/ruoyi/hezhi/domain/TbMajorClass.java @@ -83,24 +83,6 @@ public class TbMajorClass extends TreeEntity /** 删除标记(0-正常,1-删除) */ private Integer delFlag; - /** 专业详情 */ - private String majorDetails; - - /** 专业概述 */ - private String majorOverview; - - /** 专业大纲 */ - private String majorSyllabus; - - /** 预备知识 */ - private String majorKnowledge; - - /** 证书要求 */ - private String majorCertificate; - - /** 参考资料 */ - private String majorInformation; - private List childrenList; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/ITbCourseService.java b/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/ITbCourseService.java index ecf1e29..3fe795d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/ITbCourseService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/ITbCourseService.java @@ -56,6 +56,14 @@ public interface ITbCourseService */ public int updateTbCourse(TbCourse tbCourse); + /** + * 修改课程 + * + * @param tbCourse 课程 + * @return 结果 + */ + public int updateTbCourseById(TbCourse tbCourse); + /** * 批量删除课程 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbCourseServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbCourseServiceImpl.java index 2d6765d..7feea38 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbCourseServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbCourseServiceImpl.java @@ -133,6 +133,20 @@ public class TbCourseServiceImpl implements ITbCourseService return tbCourseMapper.updateTbCourse(tbCourse); } + + /** + * 修改课程 + * + * @param tbCourse 课程 + * @return 结果 + */ + @Override + public int updateTbCourseById(TbCourse tbCourse) + { + tbCourse.setUpdateTime(DateUtils.getNowDate()); + return tbCourseMapper.updateTbCourse(tbCourse); + } + /** * 批量删除课程 * diff --git a/ruoyi-system/src/main/resources/mapper/hezhi/TbCourseMapper.xml b/ruoyi-system/src/main/resources/mapper/hezhi/TbCourseMapper.xml index 7ebbd6d..80a4e2f 100644 --- a/ruoyi-system/src/main/resources/mapper/hezhi/TbCourseMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/hezhi/TbCourseMapper.xml @@ -45,6 +45,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + @@ -56,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" tc.course_arrange, tc.participate_num, tc.course_details, tc.course_overview, tc.course_syllabus, tc.course_knowledge, tc.course_team, tc.tag_name, tc.teacher_ids, tc.remarks, tc.sort, tc.status, tc.publication_time, tc.publisher, tc.create_time, tc.create_by, tc.update_time, tc.update_by, tc.delete_time, tc.delete_by, tc.del_flag, + tc.major_details, tc.major_overview, tc.major_syllabus, tc.major_knowledge, tc.major_certificate, tc.major_information, ( select GROUP_CONCAT(tct.type_name SEPARATOR '、') from tb_type_course ttc @@ -242,6 +249,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" is_recommend = #{isRecommend}, course_certificate = #{courseCertificate}, course_information = #{courseInformation}, + major_details = #{majorDetails}, + major_overview = #{majorOverview}, + major_syllabus = #{majorSyllabus}, + major_knowledge = #{majorKnowledge}, + major_certificate = #{majorCertificate}, + major_information = #{majorInformation}, where course_id = #{courseId} diff --git a/ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml b/ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml index 1103208..9af4c26 100644 --- a/ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml @@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select major_id, pid, level, type, major_name, major_logo_one, major_logo_two, is_recommend, remarks, sort, status, publication_time, publisher, create_time, create_by, update_time, update_by, delete_time, delete_by, del_flag, major_details, major_overview, major_syllabus, major_knowledge, major_certificate, major_information from tb_major_class + select major_id, pid, level, type, major_name, major_logo_one, major_logo_two, is_recommend, remarks, sort, status, publication_time, publisher, create_time, create_by, update_time, update_by, delete_time, delete_by, del_flag from tb_major_class