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