| | |
| | | package com.yeshi.fanli.dao.mybatis.goods; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2; |
| | | |
| | | public interface CollectionGoodsV2Mapper { |
| | | |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(CollectionGoodsV2 record); |
| | | |
| | | int insertSelective(CollectionGoodsV2 record); |
| | | |
| | | CollectionGoodsV2 selectByPrimaryKey(Long id); |
| | | |
| | | 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("source")Integer source); |
| | | |
| | | /** |
| | | * 获取收藏的数量 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | long selectCountByUid(@Param("uid") Long uid, @Param("source")Integer source); |
| | | |
| | | /** |
| | | * 根据用户ID,商品ID,商品类型查询商品 |
| | | * |
| | | * @param id |
| | | * @param goodsType |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | CollectionGoodsV2 selectByUidAndGoodsId(@Param("uid") Long uid, @Param("goodsId") Long goodsId); |
| | | |
| | | |
| | | /** |
| | | * 根据用户ID,商品ID,商品类型查询商品 |
| | | * |
| | | * @param id |
| | | * @param goodsType |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | CollectionGoodsV2 selectByUidAndGoodsType(@Param("uid") Long uid, @Param("goodsId") Long goodsId, |
| | | @Param("goodsType") Integer goodsType); |
| | | |
| | | /** |
| | | * 根据UID删除收藏 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | int deleteByUid(@Param("uid") Long uid); |
| | | |
| | | /** |
| | | * 用户id/收藏简版商品id |
| | | * @param uid |
| | | * @param commonId |
| | | * @return |
| | | */ |
| | | List<CollectionGoodsV2> getByUidAndCommonId(@Param("uid") Long uid, @Param("commonId") Long commonId); |
| | | |
| | | package com.yeshi.fanli.dao.mybatis.goods;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2;
|
| | |
|
| | | public interface CollectionGoodsV2Mapper {
|
| | |
|
| | | int deleteByPrimaryKey(Long id);
|
| | |
|
| | | int insert(CollectionGoodsV2 record);
|
| | |
|
| | | int insertSelective(CollectionGoodsV2 record);
|
| | |
|
| | | CollectionGoodsV2 selectByPrimaryKey(Long id);
|
| | |
|
| | | 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("source")Integer source);
|
| | |
|
| | | /**
|
| | | * 获取收藏的数量
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | long selectCountByUid(@Param("uid") Long uid, @Param("source")Integer source);
|
| | |
|
| | | |
| | | /**
|
| | | * 根据用户ID,商品ID,商品类型查询商品
|
| | | * |
| | | * @param id
|
| | | * @param goodsType
|
| | | * @param goodsId
|
| | | * @return
|
| | | */
|
| | | CollectionGoodsV2 selectByUidAndGoodsId(@Param("uid") Long uid, @Param("goodsId") Long goodsId);
|
| | | |
| | | |
| | | /**
|
| | | * 根据用户ID,商品ID,商品类型查询商品
|
| | | * |
| | | * @param id
|
| | | * @param goodsType
|
| | | * @param goodsId
|
| | | * @return
|
| | | */
|
| | | CollectionGoodsV2 selectByUidAndGoodsType(@Param("uid") Long uid, @Param("goodsId") Long goodsId,
|
| | | @Param("goodsType") Integer goodsType);
|
| | |
|
| | | /**
|
| | | * 根据UID删除收藏
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | int deleteByUid(@Param("uid") Long uid);
|
| | | |
| | | /**
|
| | | * 用户id/收藏简版商品id
|
| | | * @param uid
|
| | | * @param commonId
|
| | | * @return
|
| | | */
|
| | | List<CollectionGoodsV2> getByUidAndCommonId(@Param("uid") Long uid, @Param("commonId") Long commonId);
|
| | |
|
| | | } |