修改中西汇通和中医学平级,中医学vip可看

This commit is contained in:
wuchunlei
2025-03-11 10:46:03 +08:00
parent 9c189eddf7
commit b753a93a40
5 changed files with 27 additions and 6 deletions

View File

@@ -35,6 +35,8 @@ public class PsycheHomeController {
private CourseCatalogueService courseCatalogueService;
@Autowired
private ShopProductService shopProductService;
@Autowired
private com.peanut.modules.book.service.ShopProductService spService;
//获取标签列表
@RequestMapping("/getPsycheLabels")
@@ -80,6 +82,11 @@ public class PsycheHomeController {
wrapper.orderByAsc(ShopProductToPsycheMarket::getSort);
Page<ShopProduct> shopProductPage = shopProductService.page(new Page<>(
Long.parseLong(params.get("page").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
for (ShopProduct shopProduct:shopProductPage.getRecords()){
if (shopProduct.getIsVipPrice()==1){
shopProduct.setVipPrice(spService.getVipPrice(shopProduct));
}
}
return R.ok().put("shopProductPage",shopProductPage);
}