| | |
| | | package com.gkhy.exam.institutionalaccess.service.serviceImpl; |
| | | |
| | | import com.gkhy.exam.institutionalaccess.entity.ThBatchCourse; |
| | | import com.gkhy.exam.institutionalaccess.entity.ThCourse; |
| | | import com.gkhy.exam.institutionalaccess.entity.ThCourseChapter; |
| | | import com.gkhy.exam.institutionalaccess.entity.ThStudentBatch; |
| | | import com.gkhy.exam.institutionalaccess.entity.*; |
| | | import com.gkhy.exam.institutionalaccess.enums.CourseStatus; |
| | | import com.gkhy.exam.institutionalaccess.enums.FinishStatus; |
| | | import com.gkhy.exam.institutionalaccess.model.query.ThCourseQuery; |
| | | import com.gkhy.exam.institutionalaccess.model.resp.ThCourseChapterRespDTO; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | return respDTOS; |
| | | } |
| | | |
| | | //课程审核 |
| | | @Override |
| | | public Boolean updateByCourse(ThCourseDTO thCourseDTO) { |
| | | if (StringUtils.isEmpty(thCourseDTO.getStatus()) || StringUtils.isEmpty(thCourseDTO.getId())){ |
| | | return false; |
| | | } |
| | | ThCourse byUuid = courseService.getById(thCourseDTO.getId()); |
| | | if (!byUuid.getStatus().equals(CourseStatus.REVIEWED.getStatus())){ |
| | | return false; |
| | | } |
| | | ThCourse thCourse = new ThCourse(); |
| | | thCourse.setId(thCourseDTO.getId()); |
| | | thCourse.setStatus(thCourseDTO.getStatus()); |
| | | return courseService.updateById(thCourse); |
| | | } |
| | | |
| | | //获取章节 |
| | | private List<ThCourseChapterRespDTO> getChildren(List<ThCourseChapterVO> courseChapterVOS, String parentUuid) { |
| | | List<ThCourseChapterRespDTO> chapterList = courseChapterVOS |