|
@@ -14,12 +14,9 @@ import com.zhongzheng.modules.course.bo.CourseMenuAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseMenuListAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseQueryBo;
|
|
|
-import com.zhongzheng.modules.course.domain.CourseSectionWatchPer;
|
|
|
+import com.zhongzheng.modules.course.domain.*;
|
|
|
import com.zhongzheng.modules.course.mapper.CourseMapper;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseMenuService;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseModuleChapterService;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseSectionWatchPerService;
|
|
|
+import com.zhongzheng.modules.course.service.*;
|
|
|
import com.zhongzheng.modules.course.vo.*;
|
|
|
import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
|
|
@@ -90,6 +87,18 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
@Autowired
|
|
|
private ICourseSectionWatchPerService iCourseSectionWatchPerService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ICourseEducationTypeService iCourseEducationTypeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICourseProjectTypeService iCourseProjectTypeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICourseBusinessService iCourseBusinessService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICourseSubjectService iCourseSubjectService;
|
|
|
+
|
|
|
@Override
|
|
|
public GoodsVo queryById(Long goodsId){
|
|
|
Goods db = this.baseMapper.selectById(goodsId);
|
|
@@ -204,7 +213,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
lqw.like(StrUtil.isNotBlank(bo.getGoodsName()), Goods::getGoodsName, bo.getGoodsName());
|
|
|
lqw.eq(bo.getStandPrice() != null, Goods::getStandPrice, bo.getStandPrice());
|
|
|
lqw.eq(bo.getLowestPrice() != null, Goods::getLowestPrice, bo.getLowestPrice());
|
|
|
- lqw.eq(bo.getStatus() != null, Goods::getStatus, bo.getStatus());
|
|
|
+ lqw.in(bo.getStatus() != null, Goods::getStatus, bo.getStatus());
|
|
|
lqw.eq(bo.getValidityStartTime() != null, Goods::getValidityStartTime, bo.getValidityStartTime());
|
|
|
lqw.eq(bo.getValidityEndTime() != null, Goods::getValidityEndTime, bo.getValidityEndTime());
|
|
|
lqw.eq(bo.getStudyStartTime() != null, Goods::getStudyStartTime, bo.getStudyStartTime());
|
|
@@ -599,4 +608,63 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
return moduleExamList;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<GoodsJzsVo> selectRjJzsList(GoodsQueryBo bo) {
|
|
|
+ CourseEducationType educationType = iCourseEducationTypeService.getOne(new LambdaQueryWrapper<CourseEducationType>().eq(CourseEducationType::getStatus, 1).eq(CourseEducationType::getEducationName,"继续教育").last("limit 1"));
|
|
|
+ CourseProjectType projectType = iCourseProjectTypeService.getOne(new LambdaQueryWrapper<CourseProjectType>().eq(CourseProjectType::getStatus, 1).eq(CourseProjectType::getEducationId,educationType.getId()).eq(CourseProjectType::getProjectName,"建造师").last("limit 1"));
|
|
|
+ CourseBusiness business = iCourseBusinessService.getOne(new LambdaQueryWrapper<CourseBusiness>().eq(CourseBusiness::getStatus, 1).eq(CourseBusiness::getProjectId,projectType.getId()).eq(CourseBusiness::getBusinessName,"二级").last("limit 1"));
|
|
|
+ GoodsQueryBo goodsQueryBo = new GoodsQueryBo();
|
|
|
+ goodsQueryBo.setEducationTypeId(educationType.getId());
|
|
|
+ goodsQueryBo.setBusinessId(business.getId());
|
|
|
+ goodsQueryBo.setGoodsStatus(1);
|
|
|
+ goodsQueryBo.setStatus(new ArrayList<Integer>(Arrays.asList(1)));
|
|
|
+ List<GoodsVo> goodsVoList = queryList(goodsQueryBo);
|
|
|
+ List<GoodsJzsVo> jzsVoList = new ArrayList<>();
|
|
|
+ for(GoodsVo goodsVo : goodsVoList){
|
|
|
+ GoodsJzsVo jzsVo = new GoodsJzsVo();
|
|
|
+ jzsVo.setGoodsId(goodsVo.getGoodsId());
|
|
|
+ jzsVo.setGoodsName(goodsVo.getGoodsName());
|
|
|
+ CourseSubject courseSubject = iCourseSubjectService.getOne(new LambdaQueryWrapper<CourseSubject>().eq(CourseSubject::getId, goodsVo.getSubjectIds()).last("limit 1"));
|
|
|
+ if(Validator.isNotEmpty(courseSubject)){
|
|
|
+ jzsVo.setSubjectName(courseSubject.getSubjectName());
|
|
|
+ }
|
|
|
+ List<GoodsJzsChapterVo> jzsChapterVoList = new ArrayList<>();
|
|
|
+ GoodsCourseQueryBo goodsCourseQueryBo = new GoodsCourseQueryBo();
|
|
|
+ goodsCourseQueryBo.setGoodsId(goodsVo.getGoodsId());
|
|
|
+ List<CourseVo> courseVoList = iGoodsCourseService.selectList(goodsCourseQueryBo);
|
|
|
+ for(CourseVo courseVo : courseVoList){
|
|
|
+ CourseMenuQueryBo menuQueryBo = new CourseMenuQueryBo();
|
|
|
+ menuQueryBo.setCourseId(courseVo.getCourseId());
|
|
|
+ List<CourseMenuVo> courseMenuVoList = iCourseMenuService.selectList(menuQueryBo);
|
|
|
+ courseMenuVoList.forEach(courseMenuVo -> {
|
|
|
+ if(courseMenuVo.getType()==1){
|
|
|
+ //获取章信息
|
|
|
+ List<CourseModuleChapterVo> courseModuleChapterVoList = iCourseModuleChapterService.getListById(courseMenuVo.getMenuId());
|
|
|
+ courseModuleChapterVoList.forEach(courseModuleChapterVo -> {
|
|
|
+ //获取节信息
|
|
|
+ List<CourseChapterSectionVo> courseChapterSectionVoList = iCourseChapterSectionService.getListById(courseModuleChapterVo.getChapterId());
|
|
|
+ GoodsJzsChapterVo jzsChapterVo = new GoodsJzsChapterVo();
|
|
|
+ jzsChapterVo.setChapterId(courseModuleChapterVo.getChapterId());
|
|
|
+ jzsChapterVo.setChapterName(courseModuleChapterVo.getName());
|
|
|
+ List<GoodsJzsSectionVo> sectionList = new ArrayList<>();
|
|
|
+ courseChapterSectionVoList.forEach(sectionVo -> {
|
|
|
+ GoodsJzsSectionVo sectionItem = new GoodsJzsSectionVo();
|
|
|
+ sectionItem.setSectionId(sectionVo.getSectionId());
|
|
|
+ sectionItem.setSectionName(sectionVo.getName());
|
|
|
+ sectionItem.setSectionUrl(sectionVo.getRecordingUrl());
|
|
|
+ sectionList.add(sectionItem);
|
|
|
+
|
|
|
+ });
|
|
|
+ jzsChapterVo.setSectionList(sectionList);
|
|
|
+ jzsChapterVoList.add(jzsChapterVo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ jzsVo.setChapterList(jzsChapterVoList);
|
|
|
+ jzsVoList.add(jzsVo);
|
|
|
+ }
|
|
|
+ return jzsVoList;
|
|
|
+ }
|
|
|
+
|
|
|
}
|