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.OrderGoodsRefundAddBo;
import com.zhongzheng.modules.order.bo.OrderGoodsRefundEditBo;
import com.zhongzheng.modules.order.bo.OrderGoodsRefundQueryBo;
import com.zhongzheng.modules.order.domain.OrderGoodsRefund;
import com.zhongzheng.modules.order.vo.OrderGoodsRefundVo;

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

/**
 * 订单商品退款Service接口
 *
 * @author hjl
 * @date 2022-01-04
 */
public interface IOrderGoodsRefundService extends IService<OrderGoodsRefund> {
	/**
	 * 查询单个
	 * @return
	 */
	OrderGoodsRefundVo queryById(Long refundId);

	/**
	 * 查询列表
	 */
	List<OrderGoodsRefundVo> queryList(OrderGoodsRefundQueryBo bo);

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

	Boolean placeRefundSmallOrder(OrderGoodsRefundAddBo bo);

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

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