|
|
@@ -12,6 +12,7 @@ import com.github.pagehelper.Page;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.modules.base.vo.BaseFilterVo;
|
|
|
+import com.zhongzheng.modules.base.vo.Education;
|
|
|
import com.zhongzheng.modules.course.bo.*;
|
|
|
import com.zhongzheng.modules.course.domain.CourseEducationTier;
|
|
|
import com.zhongzheng.modules.course.domain.CourseEducationType;
|
|
|
@@ -30,9 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Collection;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
@@ -221,4 +220,26 @@ public class CourseEducationTypeServiceImpl extends ServiceImpl<CourseEducationT
|
|
|
public CourseEducationType getEducationByIdtenant(Long educationTypeId, Long tenantId) {
|
|
|
return baseMapper.getEducationTypeByIdtenant(educationTypeId, tenantId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<CourseEducationTypeVo> listEdu() {
|
|
|
+ List<CourseEducationType> list = list(new LambdaQueryWrapper<CourseEducationType>()
|
|
|
+ .eq(CourseEducationType::getStatus, 1).orderByAsc(CourseEducationType::getSort));
|
|
|
+ if (CollectionUtils.isEmpty(list)){
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ //获取业务层次
|
|
|
+ List<CourseEducationTypeVo> collect = list.stream().map(item -> {
|
|
|
+ CourseEducationTypeVo vo = BeanUtil.toBean(item, CourseEducationTypeVo.class);
|
|
|
+ CourseBusinessQueryBo bo = new CourseBusinessQueryBo();
|
|
|
+ bo.setStatus(Arrays.asList(1));
|
|
|
+ bo.setEducationId(item.getId());
|
|
|
+ List<CourseBusinessVo> courseBusinessVos = iCourseBusinessService.queryList(bo);
|
|
|
+ if (CollectionUtils.isNotEmpty(courseBusinessVos)) {
|
|
|
+ vo.setBusinessList(courseBusinessVos);
|
|
|
+ }
|
|
|
+ return vo;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ return collect;
|
|
|
+ }
|
|
|
}
|