| | |
| | | Long skuId = null; |
| | | Long styleId = null; |
| | | MallShoppingCart cartGoods = null; |
| | | |
| | | if (addCartDto.getType() == null) { |
| | | addCartDto.setType(1); |
| | | } |
| | | |
| | | if (addCartDto.getType() == 1) { |
| | | MallGoodsSku sku = mallGoodsSkuMapper.selectById(addCartDto.getSkuId()); |
| | | |
| | |
| | | LambdaQueryWrapper<MallShoppingCart> cartQuery = new LambdaQueryWrapper<>(); |
| | | cartQuery.eq(MallShoppingCart::getGoodsId, goodsId) |
| | | .eq(MallShoppingCart::getMemberId, memberId) |
| | | .apply("limit 1"); |
| | | .last("limit 1"); |
| | | cartGoods = this.baseMapper.selectOne(cartQuery); |
| | | } |
| | | |