|
@@ -103,7 +103,7 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
appCoursesPriceRulesMapper.selectList(Wrappers.<AppCoursesPriceRules>lambdaQuery()
|
|
|
.eq(AppCoursesPriceRules::getCoursesId, courseInfoVO.getId())).forEach(appCourses -> {
|
|
|
CourseInfoVO.CourseDetailVO courseDetailVO = new CourseInfoVO.CourseDetailVO();
|
|
|
- BeanUtils.copyProperties(courseDetailVO, appCourses);
|
|
|
+ BeanUtils.copyProperties(appCourses,courseDetailVO);
|
|
|
courseDetailVOList.add(courseDetailVO);
|
|
|
});
|
|
|
courseInfoVO.setCourseDetail(courseDetailVOList);
|
|
@@ -111,18 +111,20 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<PlaceInfoVO.CourseInfoVO> courseInfoVOList(String type, String id) {
|
|
|
+ public List<PlaceInfoVO.CourseInfoVO> courseInfoVOList(String categoryId,String id) {
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
List<PlaceInfoVO.CourseInfoVO> courseInfoVOList = new ArrayList<>();
|
|
|
appCoursesMapper.selectList(Wrappers.<AppCourses>lambdaQuery()
|
|
|
.eq(AppCourses::getSiteId, id)
|
|
|
+ .like(AppCourses::getCategoryId, categoryId)
|
|
|
.eq(AppCourses::getStatus, 0)
|
|
|
.eq(AppCourses::getDelFlag, 0)).forEach(appCourses -> {
|
|
|
PlaceInfoVO.CourseInfoVO courseInfoVO = new PlaceInfoVO.CourseInfoVO();
|
|
|
- BeanUtils.copyProperties(courseInfoVO, appCourses);
|
|
|
+ BeanUtils.copyProperties(appCourses, courseInfoVO);
|
|
|
courseInfoVO.setSales(getCourseSalesCount(appCourses.getId()));
|
|
|
courseInfoVO.setSalesYear(getCourseSales(appCourses.getId()));
|
|
|
courseInfoVO.setPriceType(isFirstPurchase(user.getId()));
|
|
|
+ courseInfoVO.setAddress(appSiteMapper.selectById(appCourses.getSiteId()).getAddress());
|
|
|
courseInfoVOList.add(courseInfoVO);
|
|
|
});
|
|
|
return courseInfoVOList;
|
|
@@ -143,6 +145,14 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
.setTimeSlot(collect);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<AppCategory> getAllCategory(String id) {
|
|
|
+ AppSite appSite = appSiteMapper.selectById(id);
|
|
|
+ return appCategoryMapper.selectList(Wrappers.<AppCategory>lambdaQuery()
|
|
|
+ .eq(AppCategory::getStatus,0).eq(AppCategory::getOrgCode,appSite.getOrgCode())
|
|
|
+ .eq(AppCategory::getDelFlag,0));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @return
|
|
|
* @Author SheepHy
|