yujian
2020-05-23 28cf328a098334b51a3e9d2d56f983fb8c862211
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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("notBackSuVip") boolean notBackSuVip);
 
    /**
     * 获取收藏的数量
     * 
     * @param uid
     * @return
     */
    long selectCountByUid(@Param("uid") Long uid, @Param("source")Integer source, @Param("notBackSuVip") boolean notBackSuVip);
 
    
    /**
     * 根据用户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);
 
}