|
@@ -284,6 +284,9 @@ public class PageServiceImpl implements PageService {
|
|
|
// 直播宣传图
|
|
|
String liveAdvertisingImage = pageMapper.getLiveAdvertisingImage();
|
|
|
map.put("liveImage", liveAdvertisingImage);
|
|
|
+ // 热门百科导航
|
|
|
+ List <BaikeProductVo> baikeList = pageMapper.getSidebarBaike();
|
|
|
+ map.put("baikeList", baikeList);
|
|
|
return ResponseJson.success(map);
|
|
|
}
|
|
|
|
|
@@ -1214,4 +1217,21 @@ public class PageServiceImpl implements PageService {
|
|
|
authProduct.setParamList(pageMapper.getAuthProductParams(productId));
|
|
|
return ResponseJson.success(authProduct);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResponseJson<List<BaikeTypeVo>> getBaikeTypeData(Integer commodityType) {
|
|
|
+ // 分类列表
|
|
|
+ List<BaikeTypeVo> baikeTypeList = pageMapper.getBaikeTypeList(commodityType);
|
|
|
+ baikeTypeList.forEach(baikeType->{
|
|
|
+ // 产品/仪器列表
|
|
|
+ List<BaikeProductVo> productList = pageMapper.getBaikeTypeProducts(baikeType.getId());
|
|
|
+ productList.forEach(product ->{
|
|
|
+ // 问题列表
|
|
|
+ List<String> questionList = pageMapper.getBaikeQuestionList(product.getProductId());
|
|
|
+ product.setQuestionList(questionList);
|
|
|
+ });
|
|
|
+ baikeType.setProductList(productList);
|
|
|
+ });
|
|
|
+ return ResponseJson.success(baikeTypeList);
|
|
|
+ }
|
|
|
}
|