Bladeren bron

增加查询条件

hgw 3 jaren geleden
bovenliggende
commit
6e7150163b

+ 1 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -146,6 +146,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         param.put("endDate", lastDay.toString());
         param.put("teacherId", getSysUser().getId());
         param.put("type", CourseScheduleEnum.LIVE.getCode());
+        param.put("groupState", String.join(",", CourseGroupEnum.ING.getCode(), CourseGroupEnum.COMPLETE.getCode()));
         log.info("queryTeacherLiveCourse:{}", param);
         Page<TeacherLiveCourseInfoVo> pageInfo = PageUtil.getPageInfo(param);
         pageInfo.setAsc("a.start_time_");

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

@@ -161,6 +161,9 @@
         AND a.type_ = #{param.type}
         <![CDATA[ AND a.class_date_  >= #{param.startDate} ]]>
         <![CDATA[ AND a.class_date_  <= #{param.endDate} ]]>
+        <if test="param.groupState !=null and param.groupState !=''">
+            AND  find_in_set(b.status_, #{param.groupState})
+        </if>
         <if test="param.status !=null and param.status !=''">
             AND a.status_ = #{param.status}
         </if>