diff --git a/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbMajorClassServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbMajorClassServiceImpl.java index 151970ceed3adb4e586f6afcf57e4e02c2d42657..433a813fae4e879c663279c3f7f151212bed8e26 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbMajorClassServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/hezhi/service/impl/TbMajorClassServiceImpl.java @@ -231,8 +231,9 @@ public class TbMajorClassServiceImpl implements ITbMajorClassService Map majorCourseInfo = tbMajorClassMapper.getMajorCourseInfo(params); if (!majorCourseInfo.isEmpty()) { long courseId = MapUtils.getLong(majorCourseInfo, "courseId"); - majorCourseInfo.put("courseSyllabus", courseChapterService.getCourseChapterTreeList(courseId)); - + if (majorCourseInfo.get("courseSyllabus") == null) { + majorCourseInfo.put("courseSyllabus", courseChapterService.getCourseChapterTreeList(courseId)); + } HashMap map = new HashMap<>(); map.put("courseId", courseId); majorCourseInfo.put("teacherList", tbTeacherCourseService.getTeacherList(map)); diff --git a/ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml b/ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml index 1533be9c399ee8a5f20d09ddc0762aa28db94590..8e0be841b5614af33d5409e456dc5652e4810328 100644 --- a/ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/hezhi/TbMajorClassMapper.xml @@ -279,6 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" CONVERT(IFNULL(tc.course_details, ''), CHAR) AS courseDetails, CONVERT(IFNULL(tc.course_overview, ''), CHAR) AS courseOverview, + CONVERT(IFNULL(tc.course_syllabus, ''), CHAR) AS courseSyllabus, CONVERT(IFNULL(tc.course_knowledge, ''), CHAR) AS courseKnowledge, CONVERT(IFNULL(tc.course_certificate, ''), CHAR) AS courseCertificate, CONVERT(IFNULL(tc.course_information, ''), CHAR) AS courseInformation diff --git a/ruoyi-ui/src/views/hezhi/notice/index.vue b/ruoyi-ui/src/views/hezhi/notice/index.vue index 9d7199207f0aed739c640f2245c71e77b536c64c..18d7c2709a3e467defaf443d1df83d035751f775 100644 --- a/ruoyi-ui/src/views/hezhi/notice/index.vue +++ b/ruoyi-ui/src/views/hezhi/notice/index.vue @@ -303,7 +303,19 @@ export default { publicationTime: [ { required: true, message: "发布时间不能为空", trigger: "blur" }, ], - content: [{ required: true, message: "内容不能为空", trigger: "blur" }], + content: [ + { required: true, message: "内容不能为空", trigger: "blur" }, + { + validator: (rule, value, callback) => { + if (!value || value.replace(/<[^>]+>/g, '').trim() === '') { + callback(new Error('请输入有效内容')); + } else { + callback(); + } + }, + trigger: 'blur' + } + ], updateTime: [ { required: true, message: "更新时间不能为空", trigger: "blur" }, ], @@ -361,7 +373,7 @@ export default { showImg: null, publisher: this.$store.getters.name, publicationTime: null, - content: null, + content: undefined, createTime: null, createBy: null, updateTime: null, @@ -414,10 +426,10 @@ export default { if (this.form.type !== 1) { this.form.typeTwo = 0; } - if (this.form.content.length <= 11) { - this.$modal.msgError('内容不能为空') - return - } + // if (this.form.content.length <= 11) { + // this.$modal.msgError('内容不能为空') + // return + // } if (this.form.noticeId != null) { updateNotice(this.form).then((response) => {