|
@@ -56,7 +56,7 @@
|
|
|
<if test="operatingTempTag != null">
|
|
|
operating_temp_tag_,
|
|
|
</if>
|
|
|
- teacher_id_,create_time_,update_time_)
|
|
|
+ teacher_id_,create_time_,update_time_,service_tag_update_time_)
|
|
|
VALUES
|
|
|
(#{userId},#{subjectIdList},
|
|
|
<if test="serviceTag != null">
|
|
@@ -65,7 +65,7 @@
|
|
|
<if test="operatingTag != null">
|
|
|
#{operatingTag},
|
|
|
</if>
|
|
|
- #{teacherId},NOW(),NOW())
|
|
|
+ #{teacherId},NOW(),NOW(),NOW())
|
|
|
</insert>
|
|
|
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.Student">
|
|
@@ -86,12 +86,8 @@
|
|
|
<if test="teacherId != null">
|
|
|
teacher_id_=#{teacherId},
|
|
|
</if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time_ = #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="updateTime == null">
|
|
|
- update_time_ = NOW()
|
|
|
- </if>
|
|
|
+ update_time_ = NOW(),
|
|
|
+ service_tag_update_time_=IF(service_tag_ = #{serviceTag}, service_tag_update_time_, NOW())
|
|
|
</set>
|
|
|
WHERE user_id_ = #{userId}
|
|
|
</update>
|
|
@@ -196,7 +192,8 @@
|
|
|
<if test="serviceTag != null">
|
|
|
service_tag_ = #{serviceTag},
|
|
|
</if>
|
|
|
- update_time_ = NOW()
|
|
|
+ update_time_ = NOW(),
|
|
|
+ service_tag_update_time_ = IF(service_tag_=#{serviceTag}, service_tag_update_time_, NOW())
|
|
|
</set>
|
|
|
WHERE
|
|
|
service_tag_=0
|
|
@@ -455,4 +452,14 @@
|
|
|
LEFT JOIN sys_user su ON stu.user_id_=su.id_
|
|
|
WHERE service_tag_=1 AND su.del_flag_=0
|
|
|
</select>
|
|
|
+ <select id="getServeStudentCourseStartTimes" resultType="com.ym.mec.biz.dal.dto.StudentServeCourseDto">
|
|
|
+ SELECT
|
|
|
+ cssp.user_id_ studentId,
|
|
|
+ stu.service_tag_update_time_ serviceTagUpdateTime,
|
|
|
+ CONCAT(cs.class_date_, ' ', cs.start_class_time_) courseStartTime
|
|
|
+ FROM course_schedule_student_payment cssp
|
|
|
+ LEFT JOIN course_schedule cs ON cs.id_=cssp.course_schedule_id_
|
|
|
+ LEFT JOIN student stu ON cssp.user_id_ = stu.user_id_
|
|
|
+ WHERE stu.service_tag_=1 AND class_date_>=#{monday}
|
|
|
+ </select>
|
|
|
</mapper>
|