众妙之门vip商品优惠

This commit is contained in:
wuchunlei
2025-03-12 13:07:42 +08:00
parent 2f6abefc4a
commit 32af78fca4

View File

@@ -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);//基础信息