package com.sqx.modules.pay.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sqx.common.utils.PageUtils;
import com.sqx.common.utils.Result;
import com.sqx.modules.app.entity.UserEntity;
import com.sqx.modules.datacentre.query.DataCenterQuery;
import com.sqx.modules.pay.controller.query.CashOutQueryDTO;
import com.sqx.modules.pay.entity.CashOut;
import com.sqx.modules.utils.excel.ExcelData;

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

public interface CashOutService extends IService<CashOut> {

    PageUtils selectCashOutList(CashOutQueryDTO queryDTO);

    ExcelData excelPayDetails(CashOutQueryDTO queryDTO);

    int saveBody(CashOut cashOut);

    int update(CashOut cashOut);

    CashOut selectById(Long id);

    void cashOutSuccess(UserEntity userByWxId, String date, String money, String payWay, String url);

    List<CashOut> selectCashOutLimit3();

    void refundSuccess(UserEntity userByWxId, String date, String money, String url, String content);

    Double selectCashOutSum(Long userId, Date startTime, Date endTime);

    Double selectCashOutSumsByNowMonth(Long userId);

    void updateMayMoney(int i, Long userId, Double money);

    Result cashMoney(Long userId, Long shopId, Double money, Integer classify, Integer type);

    Result statisticsMoney(String date, String dateType, Integer type);

    Result incomeStatistics(DataCenterQuery query);

    Result cashDepositMoney(Long userId);

    /**
     * 查询提现总金额
     * @param queryDTO 参数同查询提现记录列表接口
     */
    Double selectCashOutTotal(CashOutQueryDTO queryDTO);

    /**
     * 查询提现总手续费
     * @param queryDTO 参数同查询提现记录列表接口
     * @return
     */
    Double selectCommissionTotal(CashOutQueryDTO queryDTO);

    /**
     * 确认提现
     * @param cashId 提现申请id
     */
    void confirmCash(Long cashId);
}
