From 17715043feb55460402d1a991a74051f99cd6812 Mon Sep 17 00:00:00 2001
From: jack_rabbit <376168706@qq.com>
Date: Thu, 19 Dec 2019 09:47:09 +0800
Subject: [PATCH] 1.修复可重复任课bug 2.修改文案
---
WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp | 2 +-
resources/mybatis1/sunvote/CourseManagementMapper.xml | 4 ++--
src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java | 7 +++++--
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp b/WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp
index 70eaff7..782d8ba 100644
--- a/WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp
+++ b/WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp
@@ -100,7 +100,7 @@
${myelfun:findClassName(var.class_id)}
- 年级平均
+ 班级平均
diff --git a/resources/mybatis1/sunvote/CourseManagementMapper.xml b/resources/mybatis1/sunvote/CourseManagementMapper.xml
index 5ca8d23..f00cf29 100644
--- a/resources/mybatis1/sunvote/CourseManagementMapper.xml
+++ b/resources/mybatis1/sunvote/CourseManagementMapper.xml
@@ -119,8 +119,8 @@
where
1 =1
and TEACHER_ID = #{TEACHER_ID}
- and CLASS_ID= #{TEACHER_ID}
- and SUBJECT_ID= #{TEACHER_ID}
+ and CLASS_ID= #{CLASS_ID}
+
limit 0,1
diff --git a/src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java b/src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java
index 4880ef9..e0ebba4 100644
--- a/src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java
+++ b/src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java
@@ -96,11 +96,14 @@ public class CourseManagementController extends BaseController {
pd.put("SUBJECT_ID", tpd.get("SUBJECT_IDS"));
if(coursemanagementService.findByCourse(pd) == null){
coursemanagementService.save(pd);
+ mv.addObject("msg","success");
+ mv.setViewName("save_result2");
}else{
//TODO
+ mv.addObject("msg","不能重复任课,请检查后再试");
+ mv.setViewName("save_result2");
}
- mv.addObject("msg","success");
- mv.setViewName("save_result2");
+
return mv;
}
--
libgit2 0.21.4
|