众妙之门vip商品优惠
This commit is contained in:
@@ -43,6 +43,11 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
|
||||
wrapper.eq(ShopProductToSociologyMarket::getSociologyMarketId,param.getId());
|
||||
wrapper.orderByAsc(ShopProductToSociologyMarket::getSort);
|
||||
Page<ShopProduct> shopProductPage = this.getBaseMapper().selectJoinPage(new Page<>(param.getPage(), param.getLimit()), ShopProduct.class, wrapper);
|
||||
for (ShopProduct shopProduct:shopProductPage.getRecords()){
|
||||
if (shopProduct.getIsVipPrice()==1){
|
||||
shopProduct.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
||||
}
|
||||
}
|
||||
return shopProductPage;
|
||||
}
|
||||
|
||||
@@ -61,7 +66,7 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
|
||||
public Map<String, Object> getProductDetail(Integer productId) {
|
||||
ShopProduct product = this.getById(productId);
|
||||
HashMap<String, Object> flag = new HashMap<>();
|
||||
if (!userVipService.noVip()&&product.getIsVipPrice()==1){
|
||||
if (product.getIsVipPrice()==1){
|
||||
product.setVipPrice(shopProductService.getVipPrice(product));
|
||||
}
|
||||
flag.put("detail",product);//基础信息
|
||||
|
||||
Reference in New Issue
Block a user