Commit 722e35b6401e86d1499d7319204d8a4ee6c263e8

Authored by fengliang
1 parent 130d83b8

update:购物车增加数量异常修复

etrade-order/src/main/java/com/diligrp/etrade/order/service/impl/ShopCartImpl.java
... ... @@ -269,7 +269,7 @@ public class ShopCartImpl implements IShopCartService {
269 269 throw new OrderException(OrderErrorCode.PARAM_ERROR,"该宝贝不能购买更多哦~");
270 270 }
271 271 }else{
272   - if(stocks.get(0).getStock().compareTo(new BigDecimal(shopCartMessageDto.getWeight()))<0){
  272 + if(stocks.get(0).getStock().multiply(NumberTransform.ONE_HUNDERD).compareTo(new BigDecimal(shopCartMessageDto.getWeight()))<0){
273 273 throw new OrderException(OrderErrorCode.PARAM_ERROR,"该宝贝不能购买更多哦~");
274 274 }
275 275 }
... ...