Administrator
2018-10-30 c0c91fbda1ba601c4c8cb6d12fd43dfbe02eea5d
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
package com.yeshi.fanli.service.inter.goods;
 
import java.math.BigDecimal;
import java.util.List;
 
import com.yeshi.fanli.entity.bus.recommend.RecommendSectionGoods;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.exception.ExistObjectException;
import com.yeshi.fanli.exception.NotExistObjectException;
import com.yeshi.fanli.exception.ShareGoodsException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
 
public interface TaoBaoGoodsBriefService {
 
    public void save(TaoBaoGoodsBrief taoBaoGoodsBrief) throws ExistObjectException;
 
    public List<TaoBaoGoodsBrief> getTBList(int i, String key);
 
    public int getCount(String key);
 
    public TaoBaoGoodsBrief getTaoBao(long id);
 
    public TaoBaoGoodsBrief getTaoBaoByAuctionId(long id);
 
    public void deleteTaoBaoGoods(long id);
 
    public void addRecommendSectionGoods(long rsid, long tbid) throws NotExistObjectException, ExistObjectException;
 
    public void addClassRecommendGoods(long gcid, long tbid) throws NotExistObjectException, ExistObjectException;
 
    public TaoBaoGoodsBrief getTaoBaoByAuctionId(String tbid);
 
    public void updateTBGoods(TaoBaoGoodsBrief tb) throws NotExistObjectException;
 
    /**
     * 更新最新的商品数据到数据库
     * 
     * @param tb
     * @throws NotExistObjectException
     */
    public void updateTBGoodsWithNewInfo(TaoBaoGoodsBrief tb) throws NotExistObjectException;
 
    public List<TaoBaoGoodsBrief> getAllTaoBao();
 
    public void getUpdateTaoBao();
 
    public int getInvalidCount();
 
    public List<TaoBaoGoodsBrief> getInvalidTB(int pageIndex);
 
    public void updateTaoBaoGoods(TaoBaoGoodsBrief taoBaoGoodsBrief) throws TaobaoGoodsDownException;
 
    public List<RecommendSectionGoods> listRecommendSectionGoods();
 
    public void addEveryDayTask(long tbid) throws NotExistObjectException, ExistObjectException;
 
    /**
     * 获取单个商品用户能够分得的红包
     * 
     * @param goods
     * @return
     */
    public String getGoodsUserHongBao(TaoBaoGoodsBrief goods);
 
    /**
     * 获取分享商品所能得到的红包
     * 
     * @param goods
     * @return
     */
    public BigDecimal getShareGoodsUserHongBao(TaoBaoGoodsBrief goods);
 
    /**
     * 根据auctionId 查询商品信息
     * 
     * @param auctionId
     * @return
     */
    List<TaoBaoGoodsBrief> queryByAuctionId(Long auctionId);
 
    /**
     * 选择行插入数据
     * 
     * @param taoBaoGoodsBrief
     * @return
     */
    public int insertSelective(TaoBaoGoodsBrief taoBaoGoodsBrief);
 
    public TaoBaoGoodsBrief selectByPrimaryKey(Long id);
 
    /**
     * 更新商品信息与淘宝信息一致
     * 
     * @param taoBaoGoodsBrief
     * @throws TaobaoGoodsDownException
     */
    public void updateTaoBaoGoodsByMybatis(TaoBaoGoodsBrief taoBaoGoodsBrief) throws TaobaoGoodsDownException;
 
    /**
     * 选择性更新数据--mybatis
     * 
     * @param taoBaoGoodsBrief
     * @throws TaobaoGoodsDownException
     */
    public void updateByPrimaryKeySelective(TaoBaoGoodsBrief taoBaoGoodsBrief) throws TaobaoGoodsDownException;
 
    /**
     * 设置默认值
     * 
     * @param goodsBrief
     * @return
     */
    public void setGoodsBriefDefault(TaoBaoGoodsBrief goodsBrief);
 
    /**
     * 获取商品详情(用于分享)
     * 
     * @param auctionId
     * @param info
     * @return 返回的淘宝链接是通过转链了的
     */
    public TaoBaoGoodsBrief getTaoBaoGoodsDetailForShare(Long auctionId, Long uid) throws ShareGoodsException;
 
 
    public int updateByPrimaryKey(TaoBaoGoodsBrief taoBaoGoodsBrief);
 
    
    /**
     * 批量插入商品
     * @param list
     * @return
     */
    public int insertBatch(List<TaoBaoGoodsBrief> list);
 
    
    /**
     * 批量更新商品
     * @param list
     */
    public void updateBatchSelective(List<TaoBaoGoodsBrief> list);
 
    
    /**
     * 批量查询根据AuctionId
     * @param list
     * @return
     */
    public List<TaoBaoGoodsBrief> listQueryByAuctionId(List<Long> list);
 
 
 
}