use of io.github.zutherb.appstash.shop.repository.cart.model.CartItem in project the-app by devops-dojo.
the class RedisMicroserviceCartFulfillmentProviderImpl method addItem.
@Override
public CartItemInfo addItem(ProductInfo productInfo) {
synchronized (lock) {
CartItemInfo cartItemInfo = createCartItemInfo(productInfo);
CartItem map = mapToCartItem(cartItemInfo);
if (StringUtils.isEmpty(cartId)) {
cartId = strip(cartRepository.create(map), "\"");
} else {
cartRepository.add(cartId, map);
}
return cartItemInfo;
}
}
Aggregations