|
@@ -802,8 +802,8 @@
|
|
<select id="queryCourseHomeOfMonth" parameterType="map"
|
|
<select id="queryCourseHomeOfMonth" parameterType="map"
|
|
resultType="com.yonge.cooleshow.biz.dal.vo.CourseHomeVo$CourseHomeInfoVo">
|
|
resultType="com.yonge.cooleshow.biz.dal.vo.CourseHomeVo$CourseHomeInfoVo">
|
|
select class_date_ as `date`,
|
|
select class_date_ as `date`,
|
|
- ifnull(case when status_ in ('NOT_START', 'ING') then count(1) end, 0) as undoneCount,
|
|
|
|
- ifnull(case when status_ = 'COMPLETE' then count(1) end, 0) as doneCount
|
|
|
|
|
|
+ sum( CASE WHEN status_ IN ( 'NOT_START', 'ING' ) THEN 1 else 0 END ) AS undoneCount,
|
|
|
|
+ sum( CASE WHEN status_ = 'COMPLETE' THEN 1 else 0 END ) AS doneCount
|
|
from course_schedule
|
|
from course_schedule
|
|
where type_ = #{param.type}
|
|
where type_ = #{param.type}
|
|
and status_ in ('NOT_START', 'ING', 'COMPLETE')
|
|
and status_ in ('NOT_START', 'ING', 'COMPLETE')
|