|
@@ -36,8 +36,8 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
List<AppCourese> appCoureseFree = appCoureseMapper.selectList(Wrappers.<AppCourese>lambdaQuery()
|
|
List<AppCourese> appCoureseFree = appCoureseMapper.selectList(Wrappers.<AppCourese>lambdaQuery()
|
|
.eq(AppCourese::getPriceType, 1).last("limit 3"));
|
|
.eq(AppCourese::getPriceType, 1).last("limit 3"));
|
|
List<CoureseVO> courseVO = new ArrayList<>();
|
|
List<CoureseVO> courseVO = new ArrayList<>();
|
|
-// courseVO.addAll(convertToCoureseVOList(appCoureseFine));
|
|
|
|
-// courseVO.addAll(convertToCoureseVOList(appCoureseFree));
|
|
|
|
|
|
+ courseVO.addAll(convertToCoureseVOList(appCoureseFine));
|
|
|
|
+ courseVO.addAll(convertToCoureseVOList(appCoureseFree));
|
|
return new HomeVO().setBannerList(appBanners.stream()
|
|
return new HomeVO().setBannerList(appBanners.stream()
|
|
.map(banner -> new AppBannerVO()
|
|
.map(banner -> new AppBannerVO()
|
|
.setId(banner.getId())
|
|
.setId(banner.getId())
|
|
@@ -49,12 +49,19 @@ public class AppHomeServiceImpl implements IAppHomeService {
|
|
.setCourseList(courseVO);
|
|
.setCourseList(courseVO);
|
|
}
|
|
}
|
|
|
|
|
|
-// private List<CoureseVO> convertToCoureseVOList(List<AppCourese> appCoureseList) {
|
|
|
|
-// return appCoureseList.stream()
|
|
|
|
-// .map(courese -> new CoureseVO()
|
|
|
|
-// .setId(courese.getId()).setCover(courese.getCover())
|
|
|
|
-// .setPriceType(courese.getPriceType())
|
|
|
|
-// .setSellingPrice(appCoursesPriceRulesMapper.selectById(courese.getId()).get))
|
|
|
|
-// .collect(Collectors.toList());
|
|
|
|
-// }
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @Author SheepHy
|
|
|
|
+ * @Description 合并课程信息
|
|
|
|
+ * @Date 9:14 2025/7/4
|
|
|
|
+ * @Param appCoureseList {@link List<AppCourese>}
|
|
|
|
+ * @return List<CoureseVO> {@link List<CoureseVO>}
|
|
|
|
+ **/
|
|
|
|
+ private List<CoureseVO> convertToCoureseVOList(List<AppCourese> appCoureseList) {
|
|
|
|
+ return appCoureseList.stream()
|
|
|
|
+ .map(courese -> new CoureseVO()
|
|
|
|
+ .setId(courese.getId()).setCover(courese.getCover())
|
|
|
|
+ .setPriceType(courese.getPriceType())
|
|
|
|
+ .setSellingPrice(appCoursesPriceRulesMapper.selectById(courese.getId()).get))
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
+ }
|
|
}
|
|
}
|