|
@@ -286,7 +286,7 @@
|
|
|
</if>
|
|
|
update_time_ = NOW()
|
|
|
</set>
|
|
|
- WHERE user_id_ = #{item.userId} and tenant_id_ = #{tenantId}
|
|
|
+ WHERE user_id_ = #{item.userId} and tenant_id_ = #{item.tenantId}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<update id="updateStudentServiceOrOperatingTag">
|
|
@@ -609,17 +609,19 @@
|
|
|
FROM course_schedule_student_payment cssp
|
|
|
LEFT JOIN course_schedule cs ON cssp.course_schedule_id_=cs.id_
|
|
|
LEFT JOIN student stu ON cssp.user_id_ = stu.user_id_
|
|
|
- WHERE stu.service_tag_=1
|
|
|
+ WHERE stu.service_tag_=1 and cssp.tenant_id_ = #{tenantId}
|
|
|
AND (stu.service_tag_update_time_ IS NULL OR stu.service_tag_update_time_<#{nextMonday})
|
|
|
AND (cs.del_flag_ IS NULL OR cs.del_flag_=0)
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
|
|
|
AND cs.class_date_>=#{monday}
|
|
|
AND cs.type_ IN ('SINGLE', 'TRAINING_SINGLE', 'VIP', 'MIX', 'TRAINING_MIX', 'PRACTICE')
|
|
|
AND cssp.create_time_<#{nextMonday}
|
|
|
+ <if test="studentIds!=null and studentIds.size()>0">
|
|
|
AND cssp.user_id_ IN
|
|
|
<foreach collection="studentIds" item="studentId" open="(" close=")" separator=",">
|
|
|
#{studentId}
|
|
|
</foreach>
|
|
|
+ </if>
|
|
|
ORDER BY cssp.user_id_,course_start_time_
|
|
|
</select>
|
|
|
|
|
@@ -634,14 +636,16 @@
|
|
|
LEFT JOIN student stu ON sr.user_id_ = stu.user_id_
|
|
|
LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
|
|
|
WHERE
|
|
|
- mg.del_flag_ = 0
|
|
|
+ mg.del_flag_ = 0 and sr.tenant_id_ = #{tenantId}
|
|
|
AND mg.organ_id_ IS NOT NULL
|
|
|
AND mg.status_ = 'PROGRESS'
|
|
|
AND sr.music_group_status_ = 'NORMAL'
|
|
|
- AND sr.user_id_ IN
|
|
|
- <foreach collection="noCourseStudentIds" item="noCourseStudentId" open="(" close=")" separator=",">
|
|
|
- #{noCourseStudentId}
|
|
|
+ <if test="studentIds!=null and studentIds.size()>0">
|
|
|
+ AND cssp.user_id_ IN
|
|
|
+ <foreach collection="studentIds" item="studentId" open="(" close=")" separator=",">
|
|
|
+ #{studentId}
|
|
|
</foreach>
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getStudentNames" resultType="string">
|