vip 价格 shiro bug
This commit is contained in:
@@ -765,11 +765,11 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
goodsResponseVo.setProductName(shopProduct.getProductName());
|
||||
goodsResponseVo.setProductImage(shopProduct.getProductImages());
|
||||
goodsResponseVo.setProductPrice(shopProduct.getPrice());
|
||||
if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
||||
goodsResponseVo.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
||||
}else {
|
||||
// if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
||||
// goodsResponseVo.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
||||
// }else {
|
||||
goodsResponseVo.setVipPrice(BigDecimal.ZERO);
|
||||
}
|
||||
// }
|
||||
goodsResponseVo.setQuantity(buyOrderProduct.getQuantity());
|
||||
goodsResponseVo.setProductId(shopProduct.getProductId());
|
||||
QueryWrapper<ExpressOrder> expressOrderQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -66,9 +67,10 @@ 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.isVip()&&product.getIsVipPrice()==1){
|
||||
product.setVipPrice(shopProductService.getVipPrice(product));
|
||||
}
|
||||
// if (userVipService.isVip()&&product.getIsVipPrice()==1){
|
||||
// product.setVipPrice(shopProductService.getVipPrice(product));
|
||||
// }
|
||||
product.setVipPrice(BigDecimal.ZERO);
|
||||
flag.put("detail",product);//基础信息
|
||||
//查询包含的书
|
||||
MPJLambdaWrapper<ShopProductBookEntity> shopProductBookEntityMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
||||
@@ -123,9 +125,10 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
|
||||
List<ShopProduct> shopProducts = (List)flag.get("GLProducts");
|
||||
if (shopProducts.size()>0){
|
||||
for (ShopProduct shopProduct : shopProducts) {
|
||||
if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
||||
shopProduct.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
||||
}
|
||||
shopProduct.setVipPrice(BigDecimal.ZERO);
|
||||
// if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
||||
// shopProduct.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user