|
@@ -482,16 +482,19 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
|
|
|
@Override
|
|
|
public TableDataInfo<CourseLiveVo> getLiveList(PageDomain pageDomain, Long userId) {
|
|
|
+ TableDataInfo<CourseLiveVo> info = new TableDataInfo<>();
|
|
|
+ info.setCode(HttpStatus.HTTP_OK);
|
|
|
+ info.setMsg("查询成功");
|
|
|
//获取所有直播课程ID
|
|
|
List<Long> courseIds = orderGoodsMapper.getCourseIdByLive(userId);
|
|
|
if (CollectionUtils.isEmpty(courseIds)){
|
|
|
- return new TableDataInfo<>();
|
|
|
+ return info;
|
|
|
}
|
|
|
//课程目录
|
|
|
List<CourseMenu> menus = courseMenuService.list(new LambdaQueryWrapper<CourseMenu>()
|
|
|
.in(CourseMenu::getCourseId, courseIds));
|
|
|
if (CollectionUtils.isEmpty(menus)){
|
|
|
- return new TableDataInfo<>();
|
|
|
+ return info;
|
|
|
}
|
|
|
|
|
|
//节ID
|
|
@@ -515,7 +518,7 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
}
|
|
|
}
|
|
|
if (CollectionUtils.isEmpty(sectionIds)){
|
|
|
- return new TableDataInfo<>();
|
|
|
+ return info;
|
|
|
}
|
|
|
|
|
|
//分页查询节直播信息
|
|
@@ -524,7 +527,7 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
.in(CourseSection::getSectionId, sectionIds)
|
|
|
.orderByAsc(CourseSection::getLiveStartTime));
|
|
|
if (CollectionUtils.isEmpty(page.getRecords())){
|
|
|
- return new TableDataInfo<>();
|
|
|
+ return info;
|
|
|
}
|
|
|
List<CourseLiveVo> list = page.getRecords().stream().map(item -> BeanUtil.copyProperties(item, CourseLiveVo.class)).collect(Collectors.toList());
|
|
|
//获取保利威直播状态
|
|
@@ -549,11 +552,8 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- TableDataInfo<CourseLiveVo> info = new TableDataInfo<>();
|
|
|
info.setTotal(page.getTotal());
|
|
|
info.setRows(list);
|
|
|
- info.setCode(HttpStatus.HTTP_OK);
|
|
|
- info.setMsg("查询成功");
|
|
|
return info;
|
|
|
}
|
|
|
|