liujunchi 3 years ago
parent
commit
d24fc9fb23

+ 2 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -802,8 +802,8 @@
     <select id="queryCourseHomeOfMonth" parameterType="map"
             resultType="com.yonge.cooleshow.biz.dal.vo.CourseHomeVo$CourseHomeInfoVo">
         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
         where type_ = #{param.type}
           and status_ in ('NOT_START', 'ING', 'COMPLETE')