Commit 66e8245381777d5298b83618fd6c6b79b80afb11
1 parent
c472aa11
购物车总价计算update
Showing
1 changed file
with
1 additions
and
1 deletions
myapp-web/src/main/java/com/b2c/myapp/service/impl/ShoppingCartServiceImpl.java
... | ... | @@ -153,7 +153,7 @@ public class ShoppingCartServiceImpl extends BaseServiceImpl<ShoppingCart, Long> |
153 | 153 | shoppingCartOutput.setCid(product.getCid()); |
154 | 154 | shoppingCartOutput.setProductName(product.getName()); |
155 | 155 | shoppingCartOutput.setSaleUnit(UnitEnum.getNameById(sku.getStoreUnit())); |
156 | - totalPrice += shoppingCartOutput.getCurrentPrice(); | |
156 | + totalPrice += shoppingCartOutput.getCurrentPrice()*shoppingCartOutput.getQuantity(); | |
157 | 157 | } |
158 | 158 | |
159 | 159 | CartInfo cartInfo = new CartInfo(); |
... | ... |