package com.ruoyi.mall.mapper;

import java.math.BigDecimal;
import java.util.List;
import com.ruoyi.mall.domain.MallOrderBack;
import com.ruoyi.mall.domain.MallOrderBackDto;
import com.ruoyi.mall.domain.MallOrderOrder;
import org.apache.ibatis.annotations.Param;

/**
 * 退款单Mapper接口
 *
 * @author chang
 * @date 2021-11-25
 */
public interface MallOrderBackMapper
{
    /**
     * 查询退款单
     *
     * @param id 退款单主键
     * @return 退款单
     */
    public MallOrderBack selectMallOrderBackById(Long id);

    /**
     * 查询退款单列表
     *
     * @param mallOrderBack 退款单
     * @return 退款单集合
     */
    public List<MallOrderBack> selectMallOrderBackList(MallOrderBack mallOrderBack);

    /**
     * 新增退款单
     *
     * @param mallOrderBack 退款单
     * @return 结果
     */
    public int insertMallOrderBack(MallOrderBack mallOrderBack);

    /**
     * 修改退款单
     *
     * @param mallOrderBack 退款单
     * @return 结果
     */
    public int updateMallOrderBack(MallOrderBack mallOrderBack);

    /**
     * 删除退款单
     *
     * @param id 退款单主键
     * @return 结果
     */
    public int deleteMallOrderBackById(Long id);

    /**
     * 批量删除退款单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMallOrderBackByIds(Long[] ids);

    public List<MallOrderBack> selectMallOrderBackByOrderId(Long orderId);

    /**
     * 退货金额
     *
     * @param orderId 订单ID
     * @param status 状态
     * @return 结果
     */
    public BigDecimal getReturnPrice(@Param("orderId") Long orderId, @Param("status") String status);

    public List<MallOrderBackDto> selectMallOrderBackByOrderIdDto(@Param("orderId") Long orderId);
}
