admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
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
package com.yeshi.fanli.service.inter.lable;
 
import java.util.List;
 
import com.yeshi.fanli.entity.bus.lable.LabelGoods;
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.exception.goods.quality.LabelClassException;
import com.yeshi.fanli.exception.goods.quality.LabelGoodsException;
 
public interface LabelGoodsService {
 
    /**
     * 插入对象
     * 
     * @param record
     * @return
     * @throws LabelGoodsException
     */
    public int insertSelective(LabelGoods record) throws LabelGoodsException;
 
    /**
     * 根据id删除当前对象
     * 
     * @param id
     * @return
     * @throws LabelGoodsException
     */
    public int deleteByPrimaryKey(Long id) throws LabelGoodsException;
 
    /**
     * 根据id查找当前对象
     * 
     * @param id
     * @return
     * @throws LabelGoodsException
     */
    public LabelGoods selectByPrimaryKey(Long id) throws LabelGoodsException;
 
 
    /**
     * 根据id批量删除
     * 
     * @param ids
     */
    public int deleteBatchById(long[] ids) throws LabelGoodsException;
 
 
    /**
     * 根据商品id 删除商品对应的所有标签信息
     * 
     * @param ids
     * @throws LabelGoodsException
     */
    public void deleteByGoodsId(List<String> ids) throws LabelGoodsException;
 
 
    /**
     * 获取标签商品关联数量
     * 
     * @param labelId
     * @return
     * @throws LabelGoodsException
     */
    public Long getRelationNum(Long labelId) throws LabelGoodsException;
 
 
    public Long isExistence(Long goodsId, Long labId);
 
    public int deleteByGoodsIdAndLabId(Long goodsId, Long labId);
 
    /**
     * 查询商品对应标签 --分页
     * 
     * @param start
     * @param count
     * @param goodsId
     * @return
     * @throws LabelClassException
     */
    public List<LabelGoods> queryByGoodsId(int start, int count, Long goodsId) throws LabelClassException;
 
    public int getCountQueryByGoodsId(Long goodsId);
    
    
    /**
     * 统计商品的标签数量
     * @param goodsId
     * @return
     */
    public int getCountByGoodsId(Long goodsId);
    
 
    /**
     * 商品选择标签添加入库
     * @param taoBaoGoodsBrief
     * @param labIdList
     * @param admin
     * @throws Exception
     */
    public void addBatchByLabId(TaoBaoGoodsBrief taoBaoGoodsBrief, List<String> labIdList, AdminUser admin) throws Exception;
    
    /**
     * 批量商品贴上标签  
     * @param goodsIdList  商品id
     * @param labIdList    标签id
     * @param admin
     * @throws Exception
     */
    public void batchGoodsAddLables(List<Long> goodsIdList, List<Long> labIdList, AdminUser admin) throws Exception;
 
    /**
     * 单个商品贴标签
     * @param goodsId
     * @param labIdList
     * @param admin
     * @throws Exception
     */
    public void singleGoodsAddLables(Long goodsId, List<Long> labIdList, AdminUser admin) throws Exception;
    
}