package com.fs.store.service;

import java.text.ParseException;
import java.util.List;

import com.fs.common.core.domain.R;
import com.fs.store.domain.FsStoreAfterSales;
import com.fs.store.param.*;
import com.fs.store.vo.FsStoreAfterSalesQueryVO;
import com.fs.store.vo.FsStoreAfterSalesVO;

/**
 * 售后记录Service接口
 *
 * @author fs
 * @date 2022-03-15
 */
public interface IFsStoreAfterSalesService
{
    /**
     * 查询售后记录
     *
     * @param id 售后记录ID
     * @return 售后记录
     */
    public FsStoreAfterSales selectFsStoreAfterSalesById(Long id);

    /**
     * 查询售后记录列表
     *
     * @param fsStoreAfterSales 售后记录
     * @return 售后记录集合
     */
    public List<FsStoreAfterSales> selectFsStoreAfterSalesList(FsStoreAfterSales fsStoreAfterSales);

    /**
     * 新增售后记录
     *
     * @param fsStoreAfterSales 售后记录
     * @return 结果
     */
    public int insertFsStoreAfterSales(FsStoreAfterSales fsStoreAfterSales);

    /**
     * 修改售后记录
     *
     * @param fsStoreAfterSales 售后记录
     * @return 结果
     */
    public int updateFsStoreAfterSales(FsStoreAfterSales fsStoreAfterSales);

    /**
     * 批量删除售后记录
     *
     * @param ids 需要删除的售后记录ID
     * @return 结果
     */
    public int deleteFsStoreAfterSalesByIds(Long[] ids);

    /**
     * 删除售后记录信息
     *
     * @param id 售后记录ID
     * @return 结果
     */
    public int deleteFsStoreAfterSalesById(Long id);

    R applyForAfterSales(long userId, FsStoreAfterSalesParam storeAfterSalesParam);

    R revoke(long userId, Long id) throws ParseException;

    List<FsStoreAfterSalesQueryVO> selectFsStoreAfterSalesListQuery(FsStoreAfterSalesQueryParam storeAfterSalesParam);

    R addDelivery(FsStoreAfterSalesDeliveryParam param);

    List<FsStoreAfterSalesVO> selectFsStoreAfterSalesListVO(FsStoreAfterSales fsStoreAfterSales);


    R refundMoney(FsStoreAfterSalesRefundParam param);

    R cancel(FsStoreAfterSalesCancelParam fsStoreAfterSales) throws ParseException;

    Integer selectFsStoreAfterSalesCount(long userId, int salesStatus);

    List<FsStoreAfterSalesVO> selectFsStoreAfterSalesVOByOrderCode(String orderCode);

    R audit1(FsStoreAfterSalesAudit1Param param);

    R audit2(FsStoreAfterSalesAudit2Param param);

    List<FsStoreAfterSales> selectFsStoreAfterSalesByDoAudit();

    Boolean isEntityNull(FsStoreAfterSales fsStoreAfterSales);

    int updateDelivery(FsStoreAfterSales fsStoreAfterSales);

    R autoApplyForAfterSales(long userId, FsStoreAfterSalesParam storeAfterSalesParam);
}
