bug
This commit is contained in:
@@ -22,6 +22,7 @@ import com.peanut.modules.book.vo.UserOrderVo;
|
|||||||
import com.peanut.modules.book.vo.request.BuyOrderListRequestVo;
|
import com.peanut.modules.book.vo.request.BuyOrderListRequestVo;
|
||||||
import com.peanut.modules.book.vo.response.*;
|
import com.peanut.modules.book.vo.response.*;
|
||||||
import com.peanut.modules.common.entity.*;
|
import com.peanut.modules.common.entity.*;
|
||||||
|
import com.peanut.modules.common.vo.CourseCatalogueVo;
|
||||||
import com.peanut.modules.oss.service.OssService;
|
import com.peanut.modules.oss.service.OssService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -86,6 +87,10 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ShopProductBookService shopProductBookService;
|
private ShopProductBookService shopProductBookService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private ShopProductCourseDao shopProductCourseDao;
|
||||||
|
@Autowired
|
||||||
|
private CourseCatalogueDao courseCatalogueDao;
|
||||||
|
@Autowired
|
||||||
private PayZfbOrderService payZfbOrderService;
|
private PayZfbOrderService payZfbOrderService;
|
||||||
|
|
||||||
protected Logger logger = LoggerFactory.getLogger(BuyOrderServiceImpl.class);
|
protected Logger logger = LoggerFactory.getLogger(BuyOrderServiceImpl.class);
|
||||||
@@ -484,7 +489,6 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
b.setExpressList(expressOrders);
|
b.setExpressList(expressOrders);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return buyOrderPage;
|
return buyOrderPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -782,6 +786,18 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
List<BookEntity> bookByProductId = shopProductBookService.getBookByProductId(buyOrderProduct.getProductId());
|
List<BookEntity> bookByProductId = shopProductBookService.getBookByProductId(buyOrderProduct.getProductId());
|
||||||
goodsResponseVo.setBooks(bookByProductId);
|
goodsResponseVo.setBooks(bookByProductId);
|
||||||
|
|
||||||
|
//设置商品对应的课程目录
|
||||||
|
List<Integer> collect = shopProductCourseDao.selectList(new LambdaQueryWrapper<ShopProductCourseEntity>().eq(ShopProductCourseEntity::getProductId, buyOrderProduct.getProductId())).stream().map(ShopProductCourseEntity::getCatalogueId).collect(Collectors.toList());
|
||||||
|
if(collect.size()>0){
|
||||||
|
MPJLambdaWrapper<CourseCatalogueEntity> courseCatalogueEntityMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
||||||
|
courseCatalogueEntityMPJLambdaWrapper.selectAs(CourseEntity::getId,"courseId");
|
||||||
|
courseCatalogueEntityMPJLambdaWrapper.selectAs(CourseCatalogueEntity::getId,"catalogueId");
|
||||||
|
courseCatalogueEntityMPJLambdaWrapper.selectAs(CourseEntity::getTitle,"courseTitle");
|
||||||
|
courseCatalogueEntityMPJLambdaWrapper.selectAs(CourseCatalogueEntity::getTitle,"CourseCatalogueTitle");
|
||||||
|
courseCatalogueEntityMPJLambdaWrapper.selectAs(CourseEntity::getImage,"image");
|
||||||
|
List<CourseCatalogueVo> courseCatalogueVos = courseCatalogueDao.selectJoinList(CourseCatalogueVo.class, courseCatalogueEntityMPJLambdaWrapper);
|
||||||
|
goodsResponseVo.setCourseCatalogueList(courseCatalogueVos);
|
||||||
|
}
|
||||||
goodsResponseVoList.add(goodsResponseVo);
|
goodsResponseVoList.add(goodsResponseVo);
|
||||||
}
|
}
|
||||||
responseVo.setGoodsList(goodsResponseVoList);
|
responseVo.setGoodsList(goodsResponseVoList);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.peanut.modules.book.vo.response;
|
package com.peanut.modules.book.vo.response;
|
||||||
|
|
||||||
import com.peanut.modules.common.entity.BookEntity;
|
import com.peanut.modules.common.entity.BookEntity;
|
||||||
|
import com.peanut.modules.common.entity.CourseCatalogueEntity;
|
||||||
|
import com.peanut.modules.common.entity.CourseEntity;
|
||||||
|
import com.peanut.modules.common.vo.CourseCatalogueVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -40,4 +43,8 @@ public class GoodsResponseVo {
|
|||||||
* 对应的书list
|
* 对应的书list
|
||||||
*/
|
*/
|
||||||
private List<BookEntity> books;
|
private List<BookEntity> books;
|
||||||
|
/**
|
||||||
|
* 对应的课程目录list
|
||||||
|
*/
|
||||||
|
private List<CourseCatalogueVo> courseCatalogueList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.peanut.modules.common.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CourseCatalogueVo {
|
||||||
|
|
||||||
|
private Integer courseId;
|
||||||
|
|
||||||
|
private Integer catalogueId;
|
||||||
|
|
||||||
|
private String courseTitle;
|
||||||
|
|
||||||
|
private String CourseCatalogueTitle;
|
||||||
|
|
||||||
|
private String image;
|
||||||
|
}
|
||||||
@@ -75,6 +75,18 @@ public class CourseCatalogueChapterVideoServiceImpl extends ServiceImpl<CourseCa
|
|||||||
}
|
}
|
||||||
UserCourseVideoPositionEntity videoPosition = getVideoPosition(video, uId);
|
UserCourseVideoPositionEntity videoPosition = getVideoPosition(video, uId);
|
||||||
video.setUserCourseVideoPositionEntity(videoPosition);
|
video.setUserCourseVideoPositionEntity(videoPosition);
|
||||||
|
if (video.getType() == 0) {
|
||||||
|
String s_str = "";
|
||||||
|
if (video.getVideo().startsWith("common/")) {
|
||||||
|
s_str = "https://ehh-private-01.oss-cn-beijing.aliyuncs.com/video/";
|
||||||
|
} else if (video.getVideo().startsWith("article/")) {
|
||||||
|
s_str = "https://ehh-private-01.oss-cn-beijing.aliyuncs.com/video/";
|
||||||
|
} else {
|
||||||
|
s_str = "https://ehh-private-01.oss-cn-beijing.aliyuncs.com/video/taiHuClass/";
|
||||||
|
}
|
||||||
|
video.setVideoUrl(s_str + video.getVideo());
|
||||||
|
}
|
||||||
|
|
||||||
return video;
|
return video;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user