众妙之门游客模式

This commit is contained in:
wuchunlei
2024-10-08 17:05:45 +08:00
parent 36f828ee9f
commit c44390aa74

View File

@@ -13,6 +13,7 @@ import com.peanut.modules.common.service.MessageService;
import com.peanut.modules.common.to.ParamTo;
import com.peanut.modules.medical.service.CourseMedicalService;
import com.peanut.modules.medical.service.CourseService;
import com.peanut.modules.sociology.service.CourseSociologyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -46,10 +47,14 @@ public class VisitorController {
@Autowired
private CourseMedicalService medicalService;
@Autowired
private CourseSociologyService sociologyService;
@Autowired
private com.peanut.modules.medical.service.ShopProductService productService;
@Autowired
private CourseService courseService;
@Autowired
private com.peanut.modules.sociology.service.CourseService sociologyCourseService;
@Autowired
private MessageService messageService;
@Autowired
private com.peanut.modules.sociology.service.ShopProductService medicineShopProductService;
@@ -228,4 +233,32 @@ public class VisitorController {
Map<String, Object> detail = medicineShopProductService.getProductDetail(map.get("productId"));
return R.ok().put("data",detail);
}
//获取国学标签树
@RequestMapping("/getCourseSociologyTree")
public R getCourseSociologyTree(){
List<CourseSociologyEntity> labelsTree = sociologyService.getCourseSociologyTree();
return R.ok().put("labels",labelsTree);
}
/**
* 国学营销标签下商品列表
*/
@RequestMapping("/getSociologyMarketShopProductList")
public R getSociologyMarketShopProductList(@RequestBody Map params){
MPJLambdaWrapper<ShopProduct> wrapper = new MPJLambdaWrapper();
wrapper.selectAll(ShopProduct.class);
wrapper.rightJoin(ShopProductToSociologyMarket.class,ShopProductToSociologyMarket::getProductId,ShopProduct::getProductId);
if (params.containsKey("sociologyMarketId")&&!"".equals(params.get("sociologyMarketId").toString())){
wrapper.eq(ShopProductToSociologyMarket::getSociologyMarketId,params.get("sociologyMarketId").toString());
}
Page<ShopProduct> page = productService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
return R.ok().put("result", page);
}
//获取国学营销标签下的课程列表
@RequestMapping("/getSociologyMarketCourseList")
public R getSociologyMarketCourseList(@RequestBody ParamTo param){
Page<CourseEntity> marketCourseList = sociologyCourseService.getMarketCourseList(param);
return R.ok().put("courseList",marketCourseList);
}
}