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
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;
 
 
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);
 
    public int updateByPrimaryKey(GoodsSubClass record);
    
    /**
     * 批量删除
     * @param recordIds
     * @return
     */
    public void deleteByPrimaryKeyBatch(List<String> recordIds) throws Exception ;
 
    /**
     * 保存分类信息
     * @param record
     * @param file
     * @throws Exception
     */
    public int save(GoodsSubClass record, MultipartFile file) throws Exception;
 
    
    /**
     * 上传图片文件  并更新对象信息
     * @param file 
     * @param record
     * @return
     * @throws Exception
     */
    public int uploadPicture(GoodsSubClass record, MultipartFile file)    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) 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  一级id
     * @returnL
     */
    public int getMaxWeightByRootId(Long rootId);
 
    /**
     *  统计二级分类之下其他分类最大权重
     * @param rootId  一级id
     * @return
     */
    public int getMaxWeightByPid(Long pid);
 
    /**
     * 获取二级分类+ 加入缓存
     * @param rootId
     * @param state
     * @return
     * @throws Exception
     */
    public List<GoodsSubClass> getSubClassCache(Long rootId, Integer state) 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;
 
}