yonge 5 years ago
parent
commit
45f1808f99

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java

@@ -61,6 +61,8 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
      */
     int batchDeleteCourseSchedules(@Param("courseScheduleIds") List<Long> courseScheduleIds);
 
+    int batchDeleteAllCourseSchedules(@Param("courseScheduleIds") List<Long> courseScheduleIds);
+
     /**
      * @param courseScheduleIds: 课程计划编号
      * @return java.util.List<java.lang.Long>

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -638,7 +638,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			}
 		}
 
-		courseScheduleDao.batchDeleteCourseSchedules(courseScheduleIds);
+		courseScheduleDao.batchDeleteAllCourseSchedules(courseScheduleIds);
 		courseScheduleTeacherSalaryDao.batchDeleteByCourseScheduleIds(courseScheduleIds);
 		courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
 		// 删除考勤

+ 8 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -279,6 +279,14 @@
         </foreach>
     </delete>
 
+    <delete id="batchDeleteAllCourseSchedules">
+        DELETE FROM course_schedule
+        WHERE id_ IN
+        <foreach collection="courseScheduleIds" item="courseScheduleId" open="(" close=")" separator=",">
+            #{courseScheduleId}
+        </foreach>
+    </delete>
+
     <select id="filterNotStartCourseIdsWithIds" resultType="long">
         SELECT id_ FROM course_schedule
         WHERE