|
@@ -18,6 +18,7 @@ import com.zhongzheng.modules.base.bo.ConsoleQueryBo;
|
|
|
import com.zhongzheng.modules.base.domain.ShoppingCart;
|
|
|
import com.zhongzheng.modules.base.service.IShoppingCartService;
|
|
|
import com.zhongzheng.modules.course.mapper.CourseMapper;
|
|
|
+import com.zhongzheng.modules.course.mapper.CourseMenuMapper;
|
|
|
import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
|
|
|
import com.zhongzheng.modules.course.service.ICourseMenuService;
|
|
|
import com.zhongzheng.modules.course.service.ICourseSectionService;
|
|
@@ -32,6 +33,7 @@ import com.zhongzheng.modules.exam.vo.ExamApplyGoodsVo;
|
|
|
import com.zhongzheng.modules.goods.bo.CheckGoodsStatusBo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsCourseQueryBo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
|
|
|
+import com.zhongzheng.modules.goods.bo.GoodsSectionListBo;
|
|
|
import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsCourseService;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
@@ -147,6 +149,9 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
@Autowired
|
|
|
private IShoppingCartService iShoppingCartService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CourseMenuMapper courseMenuMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public OrderGoodsVo queryById(Long orderGoodsId) {
|
|
|
OrderGoods db = this.baseMapper.selectById(orderGoodsId);
|
|
@@ -642,8 +647,22 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<GoodsSectionListVo> getGoodsSectionList(Long goodsId) {
|
|
|
- return baseMapper.getGoodsSectionList(goodsId);
|
|
|
+ public List<GoodsSectionListVo> getGoodsSectionList(GoodsSectionListBo bo) {
|
|
|
+ List<GoodsSectionListVo> resultVos = baseMapper.getGoodsSectionList(bo.getGoodsId());
|
|
|
+ if (CollectionUtils.isEmpty(resultVos)){
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ if (ObjectUtils.isNull(bo.getRebuild()) || bo.getRebuild() == 0){
|
|
|
+ return resultVos;
|
|
|
+ }
|
|
|
+ //获取需要重修的节
|
|
|
+ resultVos.forEach(item -> {
|
|
|
+ Integer rebuild = courseMenuMapper.rebuildSectionCheck(item.getSectionId(),item.getModuleId(), item.getChapterId(),bo.getGradeId(), bo.getUserId(),item.getCourseId());
|
|
|
+ if (rebuild > 0) {
|
|
|
+ item.setRebuild(1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return resultVos.stream().filter(s -> s.getRebuild() != null && s.getRebuild().equals(1)).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
private boolean checkUnique(Long GoodsId,Long UserId) {
|