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.setProductName(shopProduct.getProductName());
|
||||||
goodsResponseVo.setProductImage(shopProduct.getProductImages());
|
goodsResponseVo.setProductImage(shopProduct.getProductImages());
|
||||||
goodsResponseVo.setProductPrice(shopProduct.getPrice());
|
goodsResponseVo.setProductPrice(shopProduct.getPrice());
|
||||||
if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
// if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
||||||
goodsResponseVo.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
// goodsResponseVo.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
||||||
}else {
|
// }else {
|
||||||
goodsResponseVo.setVipPrice(BigDecimal.ZERO);
|
goodsResponseVo.setVipPrice(BigDecimal.ZERO);
|
||||||
}
|
// }
|
||||||
goodsResponseVo.setQuantity(buyOrderProduct.getQuantity());
|
goodsResponseVo.setQuantity(buyOrderProduct.getQuantity());
|
||||||
goodsResponseVo.setProductId(shopProduct.getProductId());
|
goodsResponseVo.setProductId(shopProduct.getProductId());
|
||||||
QueryWrapper<ExpressOrder> expressOrderQueryWrapper = new QueryWrapper<>();
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -66,9 +67,10 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
|
|||||||
public Map<String, Object> getProductDetail(Integer productId) {
|
public Map<String, Object> getProductDetail(Integer productId) {
|
||||||
ShopProduct product = this.getById(productId);
|
ShopProduct product = this.getById(productId);
|
||||||
HashMap<String, Object> flag = new HashMap<>();
|
HashMap<String, Object> flag = new HashMap<>();
|
||||||
if (userVipService.isVip()&&product.getIsVipPrice()==1){
|
// if (userVipService.isVip()&&product.getIsVipPrice()==1){
|
||||||
product.setVipPrice(shopProductService.getVipPrice(product));
|
// product.setVipPrice(shopProductService.getVipPrice(product));
|
||||||
}
|
// }
|
||||||
|
product.setVipPrice(BigDecimal.ZERO);
|
||||||
flag.put("detail",product);//基础信息
|
flag.put("detail",product);//基础信息
|
||||||
//查询包含的书
|
//查询包含的书
|
||||||
MPJLambdaWrapper<ShopProductBookEntity> shopProductBookEntityMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
MPJLambdaWrapper<ShopProductBookEntity> shopProductBookEntityMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
||||||
@@ -123,9 +125,10 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
|
|||||||
List<ShopProduct> shopProducts = (List)flag.get("GLProducts");
|
List<ShopProduct> shopProducts = (List)flag.get("GLProducts");
|
||||||
if (shopProducts.size()>0){
|
if (shopProducts.size()>0){
|
||||||
for (ShopProduct shopProduct : shopProducts) {
|
for (ShopProduct shopProduct : shopProducts) {
|
||||||
if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
shopProduct.setVipPrice(BigDecimal.ZERO);
|
||||||
shopProduct.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
// if (userVipService.isVip()&&shopProduct.getIsVipPrice()==1){
|
||||||
}
|
// shopProduct.setVipPrice(shopProductService.getVipPrice(shopProduct));
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user