package com.zhongzheng.modules.goods.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhongzheng.modules.goods.bo.GoodsAttachedAddBo;
import com.zhongzheng.modules.goods.bo.GoodsAttachedEditBo;
import com.zhongzheng.modules.goods.bo.GoodsAttachedQueryBo;
import com.zhongzheng.modules.goods.domain.GoodsAttached;
import com.zhongzheng.modules.goods.vo.GoodsAttachedVo;

import java.util.Collection;
import java.util.List;

/**
 * 商品附加产品Service接口
 *
 * @author  hjl
 * @date 2021-10-28
 */
public interface IGoodsAttachedService extends IService<GoodsAttached> {
	/**
	 * 查询单个
	 * @return
	 */
	GoodsAttachedVo queryById(Long id);

	/**
	 * 查询列表
	 */
	List<GoodsAttachedVo> queryList(GoodsAttachedQueryBo bo);

	List<GoodsAttachedVo> selectList(GoodsAttachedQueryBo bo);

	/**
	 * 根据新增业务对象插入商品附加产品
	 * @param bo 商品附加产品新增业务对象
	 * @return
	 */
	Boolean insertByAddBo(GoodsAttachedAddBo bo);



	/**
	 * 根据编辑业务对象修改商品附加产品
	 * @param bo 商品附加产品编辑业务对象
	 * @return
	 */
	Boolean updateByEditBo(GoodsAttachedEditBo bo);

	/**
	 * 校验并删除数据
	 * @param ids 主键集合
	 * @param isValid 是否校验,true-删除前校验,false-不校验
	 * @return
	 */
	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
