|
@@ -11,6 +11,7 @@ import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
|
import com.ym.mec.biz.dal.page.CourseScheduleQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
|
|
|
+import com.ym.mec.biz.dal.page.VipGroupQueryInfo;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
@@ -1020,6 +1021,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
return courseScheduleDao.findNoStartCoursesByClassGroupId(classGroupId);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public void studentCoursesScheduleRemind() {
|
|
|
List<Mapper> mapperList = courseScheduleDao.queryStudentCoursesTimesOfTomorrow();
|
|
@@ -1097,4 +1100,36 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
}
|
|
|
return courseScheduleDao.findByClassGroups(classGroupIds);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PageInfo findVipGroupCourseSchedules(VipGroupQueryInfo queryInfo) {
|
|
|
+ PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
+
|
|
|
+ if(Objects.isNull(queryInfo.getVipGroupId())){
|
|
|
+ throw new BizException("请指定vip课程");
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
+
|
|
|
+ VipGroup vipGroup = vipGroupDao.get(queryInfo.getVipGroupId());
|
|
|
+ if(Objects.isNull(vipGroup)){
|
|
|
+ throw new BizException("指定的vip课不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<CourseSchedule> dataList;
|
|
|
+ if(StringUtils.isNotEmpty(vipGroup.getCourseSchedulesJson())){
|
|
|
+ dataList=JSON.parseArray(vipGroup.getCourseSchedulesJson(),CourseSchedule.class);
|
|
|
+ }else{
|
|
|
+ dataList=courseScheduleDao.findVipGroupCourseSchedules(vipGroup.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ int count=dataList.size();
|
|
|
+ if(count>0){
|
|
|
+ pageInfo.setTotal(count);
|
|
|
+ dataList=dataList.stream().skip(pageInfo.getOffset()).limit(pageInfo.getLimit()).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ pageInfo.setRows(dataList);
|
|
|
+ return pageInfo;
|
|
|
+ }
|
|
|
}
|