1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- package com.caimei.mapper;
- import com.caimei.model.dto.CartDto;
- import com.caimei.model.po.CmCartPo;
- import com.caimei.model.vo.CartProductVo;
- import com.caimei.model.vo.ShopVo;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import java.util.List;
- /**
- * Description
- *
- * @author : plf
- * @date : 2021/3/23
- */
- @Mapper
- public interface ShoppingCartMapper {
- /**
- * 查询购物车
- *
- * @param userId 机构id
- * @param productId 组织商品id
- * @return
- */
- CmCartPo findCartProduct(@Param("userId") Integer userId, @Param("productId") Integer productId);
- /**
- * 保存购物车
- *
- * @param cart
- */
- void insertCart(CartDto cart);
- /**
- * 修改购物车数量
- *
- * @param cartId
- * @param productCount
- */
- void updateByProductCount(@Param("cartId") Integer cartId, @Param("productCount") int productCount);
- /**
- * 查询购物车数量
- *
- * @param userId
- * @return
- */
- Integer getCartQuantity(Integer userId);
- /**
- * 查询购物车对应供应商
- *
- * @param userId
- * @return
- */
- List<ShopVo> findCartShop(Integer userId);
- /**
- * 查询购物车该供应商下商品
- *
- * @param shopId
- * @param userId
- * @return
- */
- List<CartProductVo> findByShopCartProduct(@Param("shopId") Integer shopId, @Param("userId") Integer userId);
- /**
- * 查询失效购物车商品
- *
- * @param userId
- * @return
- */
- List<CartProductVo> findExpiredGoods(Integer userId);
- /**
- * 删除购物车
- *
- * @param cartId
- */
- void deleteCart(String cartId);
- }
|