admin
2024-01-23 81da61b828e29b7745e1382dfbbaeb685dc083ef
fanli/src/main/java/com/yeshi/fanli/service/inter/lable/LabelService.java
@@ -1,202 +1,202 @@
package com.yeshi.fanli.service.inter.lable;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import org.springframework.web.multipart.MultipartFile;
import com.yeshi.fanli.entity.bus.lable.Label;
import com.yeshi.fanli.entity.bus.lable.LabelGoods;
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.exception.goods.quality.LabelException;
public interface LabelService {
   /**
    * 插入对象
    * @param record
    * @return
    * @throws LabelException
    */
   public int insertSelective(Label record) throws LabelException;
   /**
    * 更新当前对象所有数据
    * @param record
    * @return
    * @throws LabelException
    */
   public int updateByPrimaryKey(Label record) throws LabelException;
   /**
    * 选择性更新内容——不为空则更新该字段
    * @param record
    * @return
    * @throws LabelException
    */
   public int updateByPrimaryKeySelective(Label record) throws LabelException;
   /**
    * 根据id查找当前对象
    * @param id
    * @return
    * @throws LabelException
    */
   public Label selectByPrimaryKey(Long id) throws LabelException;
   /**
    * 根据id批量删除
    * @param ids
    */
   public int deleteBatchById(long[] ids) throws LabelException;
   /**
    * 查询标签
    * @param pageIndex 页码
    * @param pageSize  页面条数
    * @param key      搜索条件
    * @param startTime 起始时间
    * @param endTime   结束时间
    * @return
    */
   public List<Label> query(int pageIndex, int pageSize, String key,String startTime,
         String endTime, String orderMode) throws LabelException;
   public int getQueryCount(String key, String startTime, String endTime) throws LabelException;
   /**
    * excel上传
    * @param in
    * @param admin
    * @throws Exception
    */
   public void analysisExcel(InputStream in, AdminUser admin) throws Exception;
   /**
    * 批量插入数据
    * @param records
    * @param admin
    * @throws LabelException
    */
   public void insertList(List<Label> records, AdminUser admin) throws LabelException;
   /**
    * 上传标签图片
    * @param file
    * @param admin
    * @return
    * @throws LabelException
    */
   public int uploadPicture(MultipartFile file,Label label ) throws Exception;
   /**
    * 统计今日录入总数
    * @return
    */
   public long getCountToday() throws LabelException;
   public List<Label> selectByTitle(String title) throws LabelException;
   public void deleteBatchByPrimaryKey(List<Long> ids) throws LabelException;
   public void updateList(List<Label> records) throws LabelException;
   public void insertSingle(Label label, AdminUser admin, MultipartFile file)
         throws Exception;
   /**
    * 删除图片
    * @param label
    * @return
    * @throws Exception
    */
   public int deleteImg(Label label) throws LabelException;
   /**
    * 统计所有
    * @return
    */
   public long getCount();
   /**
    * 查询一级分类 标签候选项- 分页
    * @param classId
    * @return
    */
   public List<Label> queryClassCandidate(int start, int count, String key, Long classId) throws LabelException;
   public int getCountQueryClassCandidate(String key, Long classId) throws LabelException;
   /**
    * 查询子级分类 标签候选项- 分页
    * @param subClassId
    * @return
    */
   public List<Label> querySubClassCandidate(int start, int count, String key, Long subClassId) throws LabelException;
   public int getCountQuerySubClassCandidate(String key, Long subClassId) throws LabelException;
   /**
    * 商品标签添加候选项(已排除存在标签)
    * @param goodsId
    * @return
    * @throws LabelException
    */
   public List<Label> queryGoodsCandidate(int start, int count, String key, Long classId) throws LabelException;
   public int getCountQueryGoodsCandidate(String key, Long classId) throws LabelException;
   /**
    * 根据录入方式统计
    * @return
    * @throws LabelException
    */
   public Map<String, Object> getCountByEntryMode() throws LabelException;
   /**
    * 查询商品对应标签
    * @param goodsId
    * @return
    */
   public List<LabelGoods> getByGoodsId(Long goodsId);
   public Label getByTitleCache(String labKey, String title) throws LabelException;
   /**
    * 新建标签
    * @param lableNames 空格隔开
    * @param admin
    * @return
    */
   public List<Label> addBatchByNames(String lableNames, AdminUser admin)  throws LabelException;
   /**
    * 多个标签查询
    * @param list
    * @return
    */
   public List<Label> listByTitlesCache(List<String> list);
}
package com.yeshi.fanli.service.inter.lable;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import org.springframework.web.multipart.MultipartFile;
import com.yeshi.fanli.entity.bus.lable.Label;
import com.yeshi.fanli.entity.bus.lable.LabelGoods;
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.exception.goods.quality.LabelException;
public interface LabelService {
   /**
    * 插入对象
    * @param record
    * @return
    * @throws LabelException
    */
   public int insertSelective(Label record) throws LabelException;
   /**
    * 更新当前对象所有数据
    * @param record
    * @return
    * @throws LabelException
    */
   public int updateByPrimaryKey(Label record) throws LabelException;
   /**
    * 选择性更新内容——不为空则更新该字段
    * @param record
    * @return
    * @throws LabelException
    */
   public int updateByPrimaryKeySelective(Label record) throws LabelException;
   /**
    * 根据id查找当前对象
    * @param id
    * @return
    * @throws LabelException
    */
   public Label selectByPrimaryKey(Long id) throws LabelException;
   /**
    * 根据id批量删除
    * @param ids
    */
   public int deleteBatchById(long[] ids) throws LabelException;
   /**
    * 查询标签
    * @param pageIndex 页码
    * @param pageSize  页面条数
    * @param key      搜索条件
    * @param startTime 起始时间
    * @param endTime   结束时间
    * @return
    */
   public List<Label> query(int pageIndex, int pageSize, String key,String startTime,
         String endTime, String orderMode) throws LabelException;
   public int getQueryCount(String key, String startTime, String endTime) throws LabelException;
   /**
    * excel上传
    * @param in
    * @param admin
    * @throws Exception
    */
   public void analysisExcel(InputStream in, AdminUser admin) throws Exception;
   /**
    * 批量插入数据
    * @param records
    * @param admin
    * @throws LabelException
    */
   public void insertList(List<Label> records, AdminUser admin) throws LabelException;
   /**
    * 上传标签图片
    * @param file
    * @param admin
    * @return
    * @throws LabelException
    */
   public int uploadPicture(MultipartFile file,Label label ) throws Exception;
   /**
    * 统计今日录入总数
    * @return
    */
   public long getCountToday() throws LabelException;
   public List<Label> selectByTitle(String title) throws LabelException;
   public void deleteBatchByPrimaryKey(List<Long> ids) throws LabelException;
   public void updateList(List<Label> records) throws LabelException;
   public void insertSingle(Label label, AdminUser admin, MultipartFile file)
         throws Exception;
   /**
    * 删除图片
    * @param label
    * @return
    * @throws Exception
    */
   public int deleteImg(Label label) throws LabelException;
   /**
    * 统计所有
    * @return
    */
   public long getCount();
   /**
    * 查询一级分类 标签候选项- 分页
    * @param classId
    * @return
    */
   public List<Label> queryClassCandidate(int start, int count, String key, Long classId) throws LabelException;
   public int getCountQueryClassCandidate(String key, Long classId) throws LabelException;
   /**
    * 查询子级分类 标签候选项- 分页
    * @param subClassId
    * @return
    */
   public List<Label> querySubClassCandidate(int start, int count, String key, Long subClassId) throws LabelException;
   public int getCountQuerySubClassCandidate(String key, Long subClassId) throws LabelException;
   /**
    * 商品标签添加候选项(已排除存在标签)
    * @param goodsId
    * @return
    * @throws LabelException
    */
   public List<Label> queryGoodsCandidate(int start, int count, String key, Long classId) throws LabelException;
   public int getCountQueryGoodsCandidate(String key, Long classId) throws LabelException;
   /**
    * 根据录入方式统计
    * @return
    * @throws LabelException
    */
   public Map<String, Object> getCountByEntryMode() throws LabelException;
   /**
    * 查询商品对应标签
    * @param goodsId
    * @return
    */
   public List<LabelGoods> getByGoodsId(Long goodsId);
   public Label getByTitleCache(String labKey, String title) throws LabelException;
   /**
    * 新建标签
    * @param lableNames 空格隔开
    * @param admin
    * @return
    */
   public List<Label> addBatchByNames(String lableNames, AdminUser admin)  throws LabelException;
   /**
    * 多个标签查询
    * @param list
    * @return
    */
   public List<Label> listByTitlesCache(List<String> list);
}