|
@@ -60,7 +60,7 @@
|
|
sum(if(a.end_time_ <= now(),1,0)) as expTime,
|
|
sum(if(a.end_time_ <= now(),1,0)) as expTime,
|
|
sum(if(a.end_time_ > now(),1,0)) as unExpTime
|
|
sum(if(a.end_time_ > now(),1,0)) as unExpTime
|
|
from course_schedule a
|
|
from course_schedule a
|
|
- where a.lock_ = 0 and a.type_ in ('PRACTICE','PIANO_ROOM_CLASS','VIP','LIVE')
|
|
|
|
|
|
+ where a.lock_ = 0 and a.type_ in ('PRACTICE','PIANO_ROOM_CLASS','VIP','LIVE','GROUP')
|
|
<if test="userId != null and userId != ''">
|
|
<if test="userId != null and userId != ''">
|
|
and a.teacher_id_ = #{userId}
|
|
and a.teacher_id_ = #{userId}
|
|
</if>
|
|
</if>
|
|
@@ -73,7 +73,7 @@
|
|
avg (b.score_) as starGrade
|
|
avg (b.score_) as starGrade
|
|
from course_schedule a
|
|
from course_schedule a
|
|
join course_schedule_replied b on a.id_ = b.course_schedule_id_
|
|
join course_schedule_replied b on a.id_ = b.course_schedule_id_
|
|
- where a.lock_ = 0 and a.type_ in ('PRACTICE','PIANO_ROOM_CLASS','VIP','LIVE') and b.score_ is not null
|
|
|
|
|
|
+ where a.lock_ = 0 and a.type_ in ('PRACTICE','PIANO_ROOM_CLASS','VIP','LIVE','GROUP') and b.score_ is not null
|
|
<if test="userId != null and userId != ''">
|
|
<if test="userId != null and userId != ''">
|
|
and a.teacher_id_ = #{userId}
|
|
and a.teacher_id_ = #{userId}
|
|
</if>
|
|
</if>
|
|
@@ -93,7 +93,7 @@
|
|
from student t
|
|
from student t
|
|
left join course_schedule_student_payment a on t.user_id_ = a.user_id_
|
|
left join course_schedule_student_payment a on t.user_id_ = a.user_id_
|
|
left join course_schedule b on a.course_id_ = b.id_
|
|
left join course_schedule b on a.course_id_ = b.id_
|
|
- where b.lock_ = 0 and b.type_ in ('PRACTICE','PIANO_ROOM_CLASS','VIP','LIVE')
|
|
|
|
|
|
+ where b.lock_ = 0 and b.type_ in ('PRACTICE','PIANO_ROOM_CLASS','VIP','LIVE','GROUP')
|
|
<if test="userId != null and userId != ''">
|
|
<if test="userId != null and userId != ''">
|
|
and t.user_id_ = #{userId}
|
|
and t.user_id_ = #{userId}
|
|
</if>
|
|
</if>
|
|
@@ -306,7 +306,7 @@
|
|
FROM course_group g
|
|
FROM course_group g
|
|
LEFT JOIN course_schedule s ON g.id_=s.course_group_id_
|
|
LEFT JOIN course_schedule s ON g.id_=s.course_group_id_
|
|
WHERE g.teacher_id_=#{teacherId}
|
|
WHERE g.teacher_id_=#{teacherId}
|
|
- AND g.type_='LIVE'
|
|
|
|
|
|
+ AND g.type_ in ('LIVE','GROUP')
|
|
AND g.status_ IN ('COMPLETE','ING')
|
|
AND g.status_ IN ('COMPLETE','ING')
|
|
<![CDATA[ AND s.class_date_ >= #{startDate} ]]>
|
|
<![CDATA[ AND s.class_date_ >= #{startDate} ]]>
|
|
<![CDATA[ AND s.class_date_ <= #{endDate} ]]>
|
|
<![CDATA[ AND s.class_date_ <= #{endDate} ]]>
|
|
@@ -382,7 +382,7 @@
|
|
WHERE cs.lock_=0
|
|
WHERE cs.lock_=0
|
|
AND cs.status_ IN ('ING','COMPLETE','NOT_START')
|
|
AND cs.status_ IN ('ING','COMPLETE','NOT_START')
|
|
AND g.status_ IN ('ING', 'COMPLETE')
|
|
AND g.status_ IN ('ING', 'COMPLETE')
|
|
- AND cs.type_ IN ('LIVE','PIANO_ROOM_CLASS')
|
|
|
|
|
|
+ AND cs.type_ IN ('LIVE','PIANO_ROOM_CLASS','GROUP')
|
|
AND cs.teacher_id_=#{param.teacherId}
|
|
AND cs.teacher_id_=#{param.teacherId}
|
|
AND cs.class_date_=#{param.classDate}
|
|
AND cs.class_date_=#{param.classDate}
|
|
AND cs.id_ IN(
|
|
AND cs.id_ IN(
|
|
@@ -392,7 +392,7 @@
|
|
AND p.course_group_id_ = c.course_group_id_
|
|
AND p.course_group_id_ = c.course_group_id_
|
|
AND c.teacher_id_=#{param.teacherId}
|
|
AND c.teacher_id_=#{param.teacherId}
|
|
AND c.class_date_=#{param.classDate}
|
|
AND c.class_date_=#{param.classDate}
|
|
- AND c.type_ IN ('LIVE','PIANO_ROOM_CLASS')
|
|
|
|
|
|
+ AND c.type_ IN ('LIVE','PIANO_ROOM_CLASS','GROUP')
|
|
)
|
|
)
|
|
UNION
|
|
UNION
|
|
SELECT
|
|
SELECT
|
|
@@ -552,7 +552,7 @@
|
|
AND s.status_ IN ('ING','NOT_START','COMPLETE')
|
|
AND s.status_ IN ('ING','NOT_START','COMPLETE')
|
|
AND g.status_ IN ('ING', 'COMPLETE','APPLY','OUT_SALE')
|
|
AND g.status_ IN ('ING', 'COMPLETE','APPLY','OUT_SALE')
|
|
AND s.id_ IN
|
|
AND s.id_ IN
|
|
- (SELECT course_id_ FROM course_schedule_student_payment WHERE user_id_ = #{param.studentId} AND course_type_ IN ('LIVE','PIANO_ROOM_CLASS'))
|
|
|
|
|
|
+ (SELECT course_id_ FROM course_schedule_student_payment WHERE user_id_ = #{param.studentId} AND course_type_ IN ('LIVE','PIANO_ROOM_CLASS','GROUP'))
|
|
AND s.class_date_ = #{param.classDate}
|
|
AND s.class_date_ = #{param.classDate}
|
|
ORDER BY startTime
|
|
ORDER BY startTime
|
|
</select>
|
|
</select>
|
|
@@ -999,7 +999,7 @@
|
|
FROM course_schedule_teacher_salary ts
|
|
FROM course_schedule_teacher_salary ts
|
|
LEFT JOIN course_group g ON ts.course_group_id_ = g.id_
|
|
LEFT JOIN course_group g ON ts.course_group_id_ = g.id_
|
|
LEFT JOIN course_schedule_student_payment sp ON ts.course_schedule_id_ = sp.course_id_
|
|
LEFT JOIN course_schedule_student_payment sp ON ts.course_schedule_id_ = sp.course_id_
|
|
- WHERE ts.course_group_type_ in ('PRACTICE','VIP')
|
|
|
|
|
|
+ WHERE ts.course_group_type_ in ('PRACTICE','VIP','GROUP')
|
|
AND ts.status_ = 'WAIT'
|
|
AND ts.status_ = 'WAIT'
|
|
<![CDATA[ AND DATE_FORMAT(ts.update_time_,'%Y-%m-%d') <= #{day}]]>
|
|
<![CDATA[ AND DATE_FORMAT(ts.update_time_,'%Y-%m-%d') <= #{day}]]>
|
|
</select>
|
|
</select>
|