| | |
| | | package com.yeshi.fanli.dao.mybatis.goods; |
| | | |
| | | import com.yeshi.fanli.goods.CollectionGoodsV2; |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2; |
| | | |
| | | public interface CollectionGoodsV2Mapper { |
| | | |
| | |
| | | int updateByPrimaryKeySelective(CollectionGoodsV2 record); |
| | | |
| | | int updateByPrimaryKey(CollectionGoodsV2 record); |
| | | |
| | | /** |
| | | * 根据用户ID和商品ID获取收藏记录 |
| | | * |
| | | * @param uid |
| | | * @param commonGoodsId |
| | | * @return |
| | | */ |
| | | CollectionGoodsV2 selectByUidAndCommonGoodsId(@Param("uid") Long uid, @Param("commonGoodsId") Long commonGoodsId); |
| | | |
| | | /** |
| | | * 根据用户ID获取收藏记录,按照收藏时间倒叙 |
| | | * |
| | | * @param uid |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<CollectionGoodsV2> selectByUidOrderByCreateTimeDesc(@Param("uid") Long uid, @Param("start") long start, |
| | | @Param("count") int count); |
| | | |
| | | /** |
| | | * 获取收藏的数量 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | long selectCountByUid(@Param("uid") Long uid); |
| | | |
| | | /** |
| | | * 根据用户ID,商品ID,商品类型查询商品 |
| | | * |
| | | * @param id |
| | | * @param goodsType |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | CollectionGoodsV2 selectByUidAndGoodsTypeAndGoodsId(@Param("uid") Long uid, @Param("goodsType") int goodsType, |
| | | @Param("goodsId") Long goodsId); |
| | | |
| | | /** |
| | | * 根据UID删除收藏 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | int deleteByUid(@Param("uid") Long uid); |
| | | |
| | | } |