yujian
2019-09-03 2ddf5b8a1290123e2d1c05bcc851ec35cd217afc
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
package com.yeshi.fanli.service.inter.goods;
 
 
import java.util.List;
 
import org.springframework.web.multipart.MultipartFile;
 
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
import com.yeshi.fanli.exception.goods.GoodsSubClassException;
 
 
public interface  GoodsSubClassService {
    
    public int deleteByPrimaryKey(Long id);
 
    public int insert(GoodsSubClass record);
 
    public int insertSelective(GoodsSubClass record);
 
    public GoodsSubClass selectByPrimaryKey(Long id);
 
    public int updateByPrimaryKeySelective(GoodsSubClass record);
 
    
    /**
     * 批量删除
     * @param recordIds
     * @return
     */
    public void deleteByPrimaryKeyBatch(List<String> recordIds) throws Exception ;
 
 
    /**
     * 删除图片文件  并更新对象信息
     * @param record
     * @return
     * @throws Exception
     */
    public int removePicture(GoodsSubClass record) throws Exception;
    
    
    /**
     * 查询一级之下的所有二级分类
     * @param rootId  一级id
     * @return
     * @throws Exception
     */
    public List<GoodsSubClass> queryByRootId(Long rootId, Integer state) throws Exception;
 
    /**
     *  查询二级分类之下其他分类
     * @param rootId  一级id
     * @return
     */
    public List<GoodsSubClass> queryByPid(Long pid, Integer state) throws Exception;
 
    /**
     * 删除类别 同时删除相应所有子类
     * @param recordId
     * @throws Exception
     */
    public void deleteSub(Long recordId) throws Exception;
 
    public void deleteByRootId(Long id) throws Exception;
 
    
    /**
     * 二级分类
     * @param rootId
     * @return
     * @throws Exception
     */
    public List<GoodsSubClass> getGoodsSecondClass(Long rootId, Integer state,Integer month) throws Exception;
 
    public List<GoodsSubClass> queryByRootIdAndWeight(Long rootId, int type, int weight) throws Exception;
 
    public List<GoodsSubClass> queryByPidAndWeight(Long pid, int type, int weight) throws Exception;
 
    public int countByRootId(Long rootId);
 
    public int countByPid(Long pid);
 
 
    /**
     * 获取二级分类+ 加入缓存
     * @param rootId
     * @param state
     * @return
     * @throws Exception
     */
    public List<GoodsSubClass> getSubClassCache(Long rootId, Integer state,Integer month) throws Exception;
 
    /**
     * 统计前端 点击次数
     * @param acceptData
     * @param record
     */
    public void countClick(AcceptData acceptData, GoodsSubClass record);
 
    
    /**
     * 根据id获取 + 缓存
     * @param id
     * @return
     * @throws Exception
     */
    public GoodsSubClass getSubClassByPrimaryKeyCache(Long id) throws Exception;
 
    /**
     * 查询一级下的子类
     * @param list
     * @return
     */
    public List<GoodsSubClass> queryByListCid(List<Long> list);
 
    /**
     * 保存分类信息
     * @param file
     * @param record
     * @param type
     * @param pid
     * @throws GoodsSubClassException
     * @throws Exception
     */
    public void saveObject(MultipartFile file,MultipartFile file2,  GoodsSubClass record, Integer type, Long pid,Long labelId)
            throws GoodsSubClassException, Exception;
 
}