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
91
92
93
94
95
96
97
98
package com.yeshi.fanli.service.inter.goods;
 
import java.util.List;
 
import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
import com.yeshi.fanli.entity.goods.ScanHistoryV2;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.exception.goods.CommonGoodsException;
import com.yeshi.fanli.exception.goods.ScanHistoryException;
 
public interface ScanHistoryV2Service {
    /**
     * 添加浏览记录
     * 
     * @param uid
     * @param device
     * @param goods
     */
    public void addScanHistory(Long uid, String device, TaoBaoGoodsBrief goods)
            throws CommonGoodsException, ScanHistoryException;
 
    /**
     * 添加浏览记录
     * 
     * @param history
     * @throws CommonGoodsException
     * @throws ScanHistoryException
     */
    public void addScanHistory(ScanHistoryV2 history) throws CommonGoodsException, ScanHistoryException;
 
    /**
     * 根据设备或者用户ID获取浏览记录
     * 
     * @param uid
     * @param device
     * @param page
     * @param pageSize
     * @return
     */
    public List<ScanHistoryV2> getScanHistoryByDeviceOrUid(Long uid, String device, int page, int pageSize, 
            Integer source, boolean notBackSuVip);
 
    /**
     * 根据设备或者用户ID获取浏览记录数量
     * 
     * @param uid
     * @param device
     * @return
     */
    public long getCountByDeviceOrUid(Long uid, String device, Integer source, boolean notBackSuVip);
 
    /**
     * 根据用户或者设备删除浏览记录
     * 
     * @param uid
     * @param device
     */
    public void deleteByDeviceOrUid(Long uid, String device);
 
    /**
     * 根据用户或者设备和淘宝商品ID删除浏览记录
     * 
     * @param uid
     * @param device
     * @param auctionId
     */
    public void deleteByAuctionIdAndDeviceOrUid(Long uid, String device, Long auctionId);
 
    /**
     * 添加京东商品足迹记录
     * @param uid
     * @param device
     * @param goods
     * @throws CommonGoodsException
     * @throws ScanHistoryException
     */
    public void addJDScanHistory(Long uid, String device, JDGoods goods) throws CommonGoodsException, ScanHistoryException;
 
    /**
     * 添加拼多多商品足迹记录
     * @param uid
     * @param device
     * @param pddGoods
     * @throws CommonGoodsException
     * @throws ScanHistoryException
     */
    public void addPDDScanHistory(Long uid, String device, PDDGoodsDetail pddGoods)
            throws CommonGoodsException, ScanHistoryException;
 
    /**
     * 根据简版商品ID删除
     * @param uid
     * @param device
     * @param commonId
     */
    public void deleteByCommonIdAndDeviceOrUid(Long uid, String device, Long commonId);
}