Browse Source

1、更新时间调整

Joburgess 5 years ago
parent
commit
a24eb2d56a

+ 7 - 4
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -650,7 +650,7 @@
 
     <!-- 增加实际学生人数 -->
     <update id="addStudentNum" parameterType="com.ym.mec.biz.dal.entity.ClassGroup">
-        UPDATE class_group SET student_num_ = student_num_+1,update_time_=#{classGroup.updateTime}
+        UPDATE class_group SET student_num_ = student_num_+1,update_time_ = NOW()
         WHERE id_ = #{classGroup.id} AND
         student_num_=#{classGroup.studentNum}
     </update>
@@ -663,7 +663,8 @@
     </update>
     <update id="batchUpdateClassGroupCourseTimes" parameterType="map">
         <foreach collection="classGroupCourseTimes.entrySet()" index="key" item="value" open="" close="" separator=";">
-            UPDATE class_group SET total_class_times_=#{value} WHERE id_=#{key}
+            UPDATE class_group SET total_class_times_=#{value},update_time_ = NOW()
+            WHERE id_=#{key}
         </foreach>
     </update>
 
@@ -867,13 +868,15 @@
     </select>
 
     <update id="batchUpdateStudentNumMinusOne" parameterType="java.util.List">
-		update class_group set student_num_ = (student_num_ - 1),update_time_ = now() where id_ IN
+		update class_group set student_num_ = (student_num_ - 1),update_time_ = now()
+		where id_ IN
       <foreach collection="classGroupIds" item="classGroupId" open="(" close=")" separator=",">
           #{classGroupId}
       </foreach>
 	</update>
     <update id="updateTest">
-      update class_group set del_flag_=#{delFlag,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} where id_=1
+      update class_group set del_flag_=#{delFlag,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},update_time_ = NOW()
+      where id_=1
     </update>
 
 </mapper>

+ 6 - 3
mec-biz/src/main/resources/config/mybatis/ClassGroupStudentMapperMapper.xml

@@ -155,15 +155,18 @@
     </select>
 
     <update id="deleteStudentByMusicGroupId" parameterType="map">
-        update class_group_student_mapper set status_ = 'QUIT' where class_group_id_ in (select id_ from class_group where music_group_id_ = #{musicGroupId}) and user_id_ = #{userId}
+        update class_group_student_mapper set status_ = 'QUIT',update_time_ = NOW()
+        where class_group_id_ in (select id_ from class_group where music_group_id_ = #{musicGroupId}) and user_id_ = #{userId}
     </update>
 
     <update id="deleteStudentByClassGroupId">
-        update class_group_student_mapper set status_ = 'QUIT' WHERE class_group_id_=#{classGroupId} AND user_id_=#{userId}
+        update class_group_student_mapper set status_ = 'QUIT',update_time_ = NOW()
+        WHERE class_group_id_=#{classGroupId} AND user_id_=#{userId}
     </update>
 
     <update id="updateVipGroupStudentStatus">
-        update class_group_student_mapper set status_ = #{status} where music_group_id_=#{groupId} and group_type_=#{groupType}
+        update class_group_student_mapper set status_ = #{status},update_time_ = NOW()
+        where music_group_id_=#{groupId} and group_type_=#{groupType}
     </update>
 
     <select id="findClassStudentMapperByUserIdAndClassGroupId" resultMap="ClassGroupStudentMapper">

+ 10 - 12
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -169,9 +169,6 @@
             <if test="teacherId != null">
                 teacher_id_ = #{teacherId},
             </if>
-            <if test="updateTime != null">
-                update_time_ = NOW(),
-            </if>
             <if test="studentNum != null">
                 student_num_ = #{studentNum},
             </if>
@@ -181,6 +178,7 @@
             <if test="schoolId != null">
                 schoole_id_ = #{schoolId},
             </if>
+            update_time_ = NOW()
         </set>
         WHERE id_ = #{id}
     </update>
@@ -195,11 +193,11 @@
     </delete>
     
     <update id="logicDeleteCourseSchedulesByMusicGroupID">
-    	update course_schedule set del_flag_ = '1' WHERE music_group_id_=#{musicGroupID} AND group_type_='MUSIC' and status_ = 'NOT_START'
+    	update course_schedule set del_flag_ = '1',update_time_ = NOW() WHERE music_group_id_=#{musicGroupID} AND group_type_='MUSIC' and status_ = 'NOT_START'
     </update>
     
     <update id="resumeCourseScheduleByMusicGroupId">
-    	update course_schedule set del_flag_ = '0' WHERE music_group_id_=#{musicGroupID} AND group_type_='MUSIC' and status_ = 'NOT_START' and del_flag_ = '1'
+    	update course_schedule set del_flag_ = '0',update_time_ = NOW() WHERE music_group_id_=#{musicGroupID} AND group_type_='MUSIC' and status_ = 'NOT_START' and del_flag_ = '1'
     </update>
 
     <delete id="batchDeleteCourseSchedules">
@@ -932,9 +930,6 @@
                 <if test="item.teacherId != null">
                     teacher_id_ = #{item.teacherId},
                 </if>
-                <if test="item.updateTime != null">
-                    update_time_ = #{item.updateTime},
-                </if>
                 <if test="item.studentNum != null">
                     student_num_ = #{item.studentNum},
                 </if>
@@ -944,25 +939,28 @@
                 <if test="item.schoolId != null">
                     schoole_id_ = #{item.schoolId},
                 </if>
+                update_time_ = NOW()
             </set>
             WHERE id_ = #{item.id}
         </foreach>
     </update>
     <update id="updateByMusicGroupId">
-        UPDATE course_schedule cs SET cs.schoole_id_ = #{schoolId}
+        UPDATE course_schedule cs SET cs.schoole_id_ = #{schoolId},update_time_ = NOW()
         WHERE cs.class_group_id_ IN (SELECT cg.id_ FROM class_group cg WHERE cg.music_group_id_ = #{musicGroupId} AND cg.group_type_ = 'MUSIC' )
     </update>
 
     <update id="updateCourscheduleStatus">
-        UPDATE course_schedule SET status_ = #{status}
+        UPDATE course_schedule SET status_ = #{status},update_time_ = NOW()
         WHERE id_=#{courseScheduleId}
     </update>
     <update id="updateCourseScheduleSchool">
-        UPDATE course_schedule cs SET cs.schoole_id_ = #{schoolId} WHERE cs.music_group_id_ = #{musicGroupId}
+        UPDATE course_schedule cs SET cs.schoole_id_ = #{schoolId},update_time_ = NOW()
+        WHERE cs.music_group_id_ = #{musicGroupId}
         AND cs.group_type_ = 'MUSIC' AND NOW() &lt; CONCAT(cs.class_date_," ",cs.start_class_time_);
     </update>
     <update id="updateCourseSchoolByGroup">
-        UPDATE course_schedule cs SET cs.schoole_id_ = #{schoolId} WHERE cs.music_group_id_ = #{groupType}
+        UPDATE course_schedule cs SET cs.schoole_id_ = #{schoolId},,update_time_ = NOW()
+        WHERE cs.music_group_id_ = #{groupType}
         AND cs.group_type_ = #{groupType} AND NOW() &lt; CONCAT(cs.class_date_," ",cs.start_class_time_);
     </update>
 

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -324,7 +324,7 @@
 	</update>
     <update id="batchUpdateTeacherExpectSalary">
 		UPDATE course_schedule_teacher_salary
-		SET expect_salary_ = 0
+		SET expect_salary_ = 0,update_time_ = NOW()
 		WHERE
 			course_schedule_id_ = #{courseScheduleId}
 			AND user_id_ IN