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;
|
|
}
|