admin
2021-09-13 8ce7c720e4e7a604b0ff770349b5556f39d37759
fanli/src/main/java/com/yeshi/fanli/service/inter/lable/LabelGoodsService.java
@@ -1,161 +1,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.LabelClassException;
import com.yeshi.fanli.exception.LabelGoodsException;
public interface LabelGoodsService {
   /**
    * 插入对象
    *
    * @param record
    * @return
    * @throws LabelGoodsException
    */
   public int insert(LabelGoods record) throws LabelGoodsException;
   /**
    * 更新当前对象所有数据
    *
    * @param record
    * @return
    * @throws LabelGoodsException
    */
   public int updateByPrimaryKey(LabelGoods record) throws LabelGoodsException;
   /**
    * 选择性更新内容——不为空则更新该字段
    *
    * @param record
    * @return
    * @throws LabelGoodsException
    */
   public int updateByPrimaryKeySelective(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;
   /**
    * 商品贴标签
    *
    * @param arrtitle
    * @param ids
    * @param admin
    * @return
    * @throws LabelGoodsException
    */
   public void setGoodsLabel(String[] arrtitle, List<String> goodsIds, AdminUser admin) throws Exception;
   /**
    * 根据商品id 删除商品对应的所有标签信息
    *
    * @param ids
    * @throws LabelGoodsException
    */
   public void deleteByGoodsId(List<String> ids) throws LabelGoodsException;
   /**
    * 批量添加商品标签
    *
    * @param label
    * @param goodsIdList
    * @param admin
    * @param weight
    * @param weightSmall
    * @param weightLarge
    */
   public void addBatchRandom(String[] lables, List<String> idList, AdminUser admin, Integer weight,
         Integer weightSmall, Integer weightLarge) throws Exception;
   /**
    * 获取标签商品关联数量
    *
    * @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;
}
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.goods.facade.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;
}