admin
2020-05-06 24a8d17e007545f7426c48352109aa1a9c6587ee
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
package com.yeshi.fanli.service.inter.taobao;
 
import java.util.Date;
import java.util.List;
 
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsUpdateException;
 
/**
 * 淘宝商品更新
 * 
 * @author Administrator
 *
 */
public interface TaoBaoGoodsUpdateService {
    // 更新商品库
    // 更新动态商品
    // 更新首页的推荐
    // 精选库更新
 
    /**
     * 开始更新淘宝商品库信息 按照更新时间升序排列 只更新最近2个小时未更新的数据
     */
    public void startUpdate();
 
    /**
     * 删除创建时间过长的商品
     */
    public void deleteOutOfDate();
 
    /**
     * 淘宝商品更新
     * 
     * @param goods
     *            需要携带券信息
     */
    public void updateTaoBaoGoods(TaoBaoGoodsBrief goods) throws TaobaoGoodsUpdateException;
 
    /**
     * 淘宝商品批量更新
     * 
     * @param goods
     *            需要携带券信息
     */
    public void updateTaoBaoGoods(List<TaoBaoGoodsBrief> goodsList) throws TaobaoGoodsUpdateException;
 
    /**
     * 删除淘宝的商品数据和对应的依赖数据
     * 
     * @param auctionId
     */
 
    public void deleteTaoBaoGoods(Long auctionId);
 
    /**
     * 下架某个商品的数据
     * 
     * @param auctionId
     */
    public void offlineTaoBaoGoods(Long auctionId);
 
    /**
     * 淘宝商品更新信息
     * 
     * @param taoBaoGoodsBrief
     * @return
     */
    public TaoBaoGoodsBrief getUpdateTaoBaoGoodsBrief(TaoBaoGoodsBrief taoBaoGoodsBrief);
 
    /**
     * 队列更新商品
     * 
     * @param start
     * @param count
     * @param hour
     * @return
     */
    public List<Long> listNeedUpdateGoodsId(long start, int count, int hour);
 
    /**
     * 根据taoke更新商品信息
     * 
     * @param id
     */
    public void updateByTaoKeGoodsDetail(Long id);
 
    /**
     * 批量加入更新队列
     * 
     * @param goodsList
     */
    public void addUpdateQueueAsync(List<TaoBaoGoodsBrief> goodsList);
 
    /**
     * 添加到更新队列
     * 
     * @param auctionId
     */
    public void addUpdateQueueAsync(Long auctionId);
 
    /**
     * 更新淘宝重要的商品
     * 
     * @param goods
     */
    public void updateImplTBGoods(TaoBaoGoodsBrief goods);
 
    /**
     * 过滤淘宝商品
     * 
     * @param goodsList
     * @return
     */
    public List<TaoBaoGoodsBrief> filterImportantTaoBaoGoods(List<TaoBaoGoodsBrief> goodsList);
 
    /**
     * 根据最大的更新时间移除
     * 
     * @param maxTime
     * @return
     */
    public int listAndRemoveByMaxUpdateTime(Date maxTime,int page,int pageSize);
 
    /**
     * 根据最大更新时间计算
     * @param maxTime
     * @return
     */
    public long countByMaxUpdateTime(Date maxTime);
 
}