package com.sqx.modules.pay.service;


import com.sqx.common.utils.PageUtils;
import com.sqx.common.utils.Result;
import com.sqx.modules.app.entity.UserEntity;
import com.sqx.modules.pay.entity.CashOut;
import com.sqx.modules.utils.excel.ExcelData;

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

public interface CashOutService {

    PageUtils selectCashOutList(Integer page, Integer limit, CashOut cashOut, boolean isApp);

    ExcelData excelPayDetails(CashOut cashOut);

    int saveBody(CashOut cashOut);

    int update(CashOut cashOut);

    CashOut selectById(Long id);

    void cashOutSuccess(String openId, 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 sumMoney(String time, String end, Integer flag);

    Integer countMoney(String time, String end, Integer flag);

    Integer stayMoney(String time, String end, Integer flag);

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

    Result cashMoney(Long userId, Double money);

    Result sysCashMoney(Long userId, Double money);

    /**
     * @param userId 用户Id tb_user的id
     * @param money  提现金额
     * @param isSys  是否是系统用户提现
     */
    Result withdraw(Long userId, Double money, String msg, boolean isSys);

    /**
     * 提现审核分页查询
     *
     * @param params
     * @return
     */
    PageUtils auditPage(Map<String, Object> params);

    void audit(CashOut cashOut);

    void batchAudit(Long userId, Integer isAgree, String refund);

    Map<String,Object> alipayTransferSummaryQuery(String alipayAccountName);

    Result batchCashOutOrder(Double maxMoney, Integer count);
}
