package com.cool.store.service.close;

import com.cool.store.dto.close.CloseStoreMkUserDTO;
import com.cool.store.dto.xgj.XgjBranchBankDTO;
import com.cool.store.request.close.refund.CloseStoreRefundAddRequest;
import com.cool.store.request.close.refund.CloseStoreRefundQueryRequest;
import com.cool.store.request.close.refund.CloseStoreRefundSkipRequest;
import com.cool.store.request.close.refund.CloseStoreRefundUpdateRequest;
import com.cool.store.dto.xgj.XgjPartnerPageDTO;
import com.cool.store.entity.CloseStoreRefundInfoDO;
import com.cool.store.request.close.refund.*;
import com.cool.store.request.xgj.XgjBankQueryRequest;
import com.cool.store.vo.close.refund.CloseStoreRefundDetailVO;
import com.cool.store.vo.close.refund.CloseStoreRefundListVO;
import com.cool.store.vo.close.refund.CloseStoreRefundSimpleVO;
import com.github.pagehelper.PageInfo;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 闭店退款 服务类
 * </p>
 *
 * @author wangff
 * @since 2025/10/13
 */
public interface CloseStoreRefundService {

    /**
     * 新增退款记录
     * @param request 闭店退款新增Request
     */
    Boolean addRefund(CloseStoreRefundAddRequest request);

    /**
     * 编辑退款记录
     * @param request 闭店退款更新Request
     */
    Boolean updateRefund(CloseStoreRefundUpdateRequest request);

    /**
     * 获取当前用户的每刻用户信息
     * @return 每刻用户信息DTO
     */
    CloseStoreMkUserDTO getCurrentMkUser();

    /**
     * 查询退款详情
     * @param id 退款信息id
     * @return 闭店退款详情VO
     */
    CloseStoreRefundDetailVO getRefundDetail(Long id);

    /**
     * 完成退款
     */
    void completeRefund(Long refundId, Date refundTime);

    /**
     * 查询退款简单信息列表
     * @param request request
     * @return 闭店退款简单信息VO列表
     */
    PageInfo<CloseStoreRefundSimpleVO> getRefundSimpleList(CloseStoreRefundQueryRequest request);

    /**
     * 跳过流程
     * @param request 退款流程跳过Request
     */
    void skip(CloseStoreRefundSkipRequest request);

    /**
     * 退款分页查询
     * @param request 闭店退款查询Request
     * @return 闭店退款列表VO列表
     */
    PageInfo<CloseStoreRefundListVO> refundPage(CloseStoreRefundQueryRequest request);

    /**
     * 刷新退款订单状态
     * @param request 闭店退款查询Request
     * @return 是否成功
     */
    Boolean refreshRefundOrderStatus(CloseStoreRefundQueryRequest request);

    /**
     * 获取订单状态
     */
    void refreshRefund(List<CloseStoreRefundInfoDO> list, List<CloseStoreRefundInfoDO> updateList, List<CloseStoreRefundInfoDO> completeList);

    /**
     * 同步供应商信息
     * @param request 闭店退款供应商同步Request
     * @return 是否成功
     */
    Boolean savePartner(CloseStorePartnerRequest request);

    /**
     * 供应商查询
     * @param request 闭店退款供应商查询Request
     * @return 新管家分页DTO
     */
    XgjPartnerPageDTO queryPartnerPage(CloseStorePartnerQueryRequest request);

    /**
     * 银行支行
     * @param request 支行查询Request
     * @return 支行列表
     */
    List<XgjBranchBankDTO> queryBranchBankList(XgjBankQueryRequest request);
}
