|
@@ -686,4 +686,51 @@
|
|
<select id="queryVipGroupTeachereClassTimesByMonth" resultType="map" parameterType="map">
|
|
<select id="queryVipGroupTeachereClassTimesByMonth" resultType="map" parameterType="map">
|
|
SELECT vp.organ_id_ organ_id_,cs.actual_teacher_id_ teacher_id_,count(cs.id_) times FROM course_schedule cs left join vip_group_class_group_mapper vgm on cs.class_group_id_ = vgm.class_group_id_ left join vip_group vp on vgm.vip_group_id_ = vp.id_ where cs.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} and date_format(#{monthDate} , '%Y%m' ) = date_format(cs.class_date_, '%Y%m' ) group by vp.organ_id_,cs.actual_teacher_id_
|
|
SELECT vp.organ_id_ organ_id_,cs.actual_teacher_id_ teacher_id_,count(cs.id_) times FROM course_schedule cs left join vip_group_class_group_mapper vgm on cs.class_group_id_ = vgm.class_group_id_ left join vip_group vp on vgm.vip_group_id_ = vp.id_ where cs.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} and date_format(#{monthDate} , '%Y%m' ) = date_format(cs.class_date_, '%Y%m' ) group by vp.organ_id_,cs.actual_teacher_id_
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="queryFinishedWithNoUpdateStatus" resultMap="CourseSchedule">
|
|
|
|
+ select * from course_schedule where CONCAT(class_date_,' ',end_class_time_) <= now() and status_ != 'OVER'
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <update id="batchUpdate" parameterType="com.ym.mec.biz.dal.entity.CourseSchedule">
|
|
|
|
+ UPDATE course_schedule
|
|
|
|
+ <set>
|
|
|
|
+ <if test="classDate != null">
|
|
|
|
+ class_date_ = #{classDate},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="endClassTime != null">
|
|
|
|
+ end_class_time_ = #{endClassTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type != null">
|
|
|
|
+ type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="actualTeacherId != null">
|
|
|
|
+ actual_teacher_id_ = #{actualTeacherId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="subsidy != null">
|
|
|
|
+ subsidy_ = #{subsidy},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="classGroupId != null">
|
|
|
|
+ class_group_id_ = #{classGroupId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startClassTime != null">
|
|
|
|
+ start_class_time_ = #{startClassTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="teacherId != null">
|
|
|
|
+ teacher_id_ = #{teacherId},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ update_time_ = #{updateTime},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="studentNum != null">
|
|
|
|
+ student_num_ = #{studentNum},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="leaveStudentNum != null">
|
|
|
|
+ leave_student_num_ = #{leaveStudentNum},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ WHERE id_ = #{id}
|
|
|
|
+ </update>
|
|
</mapper>
|
|
</mapper>
|