vip优惠商品添加用户是否vip判断
This commit is contained in:
@@ -37,6 +37,8 @@ public class PsycheHomeController {
|
||||
private ShopProductService shopProductService;
|
||||
@Autowired
|
||||
private com.peanut.modules.book.service.ShopProductService spService;
|
||||
@Autowired
|
||||
private UserVipService userVipService;
|
||||
|
||||
//获取标签列表
|
||||
@RequestMapping("/getPsycheLabels")
|
||||
@@ -83,7 +85,7 @@ public class PsycheHomeController {
|
||||
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){
|
||||
if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
||||
shopProduct.setVipPrice(spService.getVipPrice(shopProduct));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user