package com.zhongzheng.modules.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhongzheng.modules.order.bo.OrderAddBo;
import com.zhongzheng.modules.order.bo.OrderGoodsAddBo;
import com.zhongzheng.modules.order.bo.OrderGoodsEditBo;
import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
import com.zhongzheng.modules.order.domain.OrderGoods;
import com.zhongzheng.modules.order.vo.OrderGoodsVo;

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

/**
 * 订单商品Service接口
 *
 * @author hjl
 * @date 2021-11-08
 */
public interface IOrderGoodsService extends IService<OrderGoods> {
	/**
	 * 查询单个
	 * @return
	 */
	OrderGoodsVo queryById(String orderSn);

	OrderGoodsVo selectDetail(OrderGoodsQueryBo bo);

	List<OrderGoodsVo> selectList(OrderGoodsQueryBo bo);
	/**
	 * 查询列表
	 */
	List<OrderGoodsVo> queryList(OrderGoodsQueryBo bo);

	/**
	 * 根据新增业务对象插入订单商品
	 * @param bo 订单商品新增业务对象
	 * @return
	 */
	Boolean insertByAddBo(OrderGoodsAddBo bo);

	Long getBuyGoodsHistory(OrderGoodsQueryBo bo);

	/**
	 * 根据编辑业务对象修改订单商品
	 * @param bo 订单商品编辑业务对象
	 * @return
	 */
	Boolean updateByEditBo(OrderGoodsEditBo bo);

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

	List<OrderGoodsVo> selectOrderGoods();

	List<OrderGoodsVo> selectOrderTwoGoods();

	List<OrderGoodsVo> sendGoods();
}
