|
@@ -1564,7 +1564,7 @@
|
|
|
<if test="status != null">
|
|
|
and status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
- union
|
|
|
+ union all
|
|
|
select ncs.* from course_schedule cs left join course_schedule ncs on ncs.id_ = cs.new_course_id_
|
|
|
where cs.new_course_id_ > 0 and cs.class_group_id_ = #{classGroupId}
|
|
|
<if test="status != null">
|
|
@@ -3339,7 +3339,7 @@
|
|
|
(SELECT cs.type_ course_type_,SUM(TIMESTAMPDIFF(MINUTE,STR_TO_DATE(concat(cs.class_date_,' ',cs.start_class_time_),'%Y-%m-%d %H:%i:%s'),
|
|
|
STR_TO_DATE(concat(cs.class_date_,' ',cs.end_class_time_),'%Y-%m-%d %H:%i:%s'))) remain_minutes_
|
|
|
from course_schedule cs where FIND_IN_SET(cs.class_group_id_,#{classgroupId}) and cs.status_ = 'NOT_START' and (cs.new_course_id_ is null or cs.new_course_id_ = 0) group by cs.type_
|
|
|
- UNION
|
|
|
+ UNION all
|
|
|
SELECT ncs.type_ course_type_,SUM(TIMESTAMPDIFF(MINUTE,STR_TO_DATE(concat(ncs.class_date_,' ',ncs.start_class_time_),'%Y-%m-%d %H:%i:%s'),
|
|
|
STR_TO_DATE(concat(ncs.class_date_,' ',ncs.end_class_time_),'%Y-%m-%d %H:%i:%s'))) remain_minutes_ FROM course_schedule cs LEFT JOIN course_schedule ncs ON ncs.id_ = cs.new_course_id_
|
|
|
WHERE FIND_IN_SET(cs.class_group_id_,#{classgroupId}) and cs.new_course_id_ > 0 AND ncs.status_ = 'NOT_START' GROUP BY ncs.type_) a
|