Commit 3789137e by ping.wu

报错修改

parent 27c777da
...@@ -2171,7 +2171,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -2171,7 +2171,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if (CollectionUtils.isNotEmpty(allCartGoodsList)) { if (CollectionUtils.isNotEmpty(allCartGoodsList)) {
if (Objects.equals(CouponTypeEnum.TYPE_0.getCode(), couponProductDto.getType()) if (Objects.equals(CouponTypeEnum.TYPE_0.getCode(), couponProductDto.getType())
|| Objects.equals(CouponTypeEnum.TYPE_4.getCode(), couponProductDto.getType())) { || Objects.equals(CouponTypeEnum.TYPE_4.getCode(), couponProductDto.getType())) {
int sum = allCartGoodsList.stream().filter(p -> p.getCouponCode().equals(couponCode)).mapToInt(CartGoods::getQty).sum(); int sum = allCartGoodsList.stream().filter(p -> Objects.equals(p.getCouponCode(),couponCode)).mapToInt(CartGoods::getQty).sum();
//今日可用次数判断 //今日可用次数判断
if (sum + cartGoods.getQty() > todayAvailableTimes) { if (sum + cartGoods.getQty() > todayAvailableTimes) {
throw new ServiceException(ResponseResult.SHOPPING_CART_GOODS_COUPON_CAN_NOT_USE); throw new ServiceException(ResponseResult.SHOPPING_CART_GOODS_COUPON_CAN_NOT_USE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment