yujian
2019-01-22 88b54772dbcf5ecab1e2316e4e4626ac901b8908
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
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 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);
 
}