package com.ruoyi.frequency.withdrawalrecord.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.controller.req.WithApplyReq;
import com.ruoyi.controller.req.WithdrawalRecordPageReq;
import com.ruoyi.frequency.withdrawalrecord.entity.WithdrawalRecord;
import com.ruoyi.frequency.withdrawalrecord.model.result.WithdrawalRecordCount;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.PageBasic;
import com.ruoyi.vo.UserVo;

import java.util.List;

/**
 * 提现记录Service接口
 *
 * @author liwenlong
 * @date 2023-07-20
 */
public interface WithdrawalRecordService extends IService<WithdrawalRecord>
{
    /**
     * 查询提现记录
     *
     * @param id 提现记录主键
     * @return 提现记录
     */
    WithdrawalRecord selectWithdrawalRecordById(Long id);

    /**
     * 查询提现记录列表
     *
     * @param withdrawalRecord 提现记录
     * @return 提现记录集合
     */
    List<WithdrawalRecord> selectWithdrawalRecordList(WithdrawalRecord withdrawalRecord);


    WithdrawalRecordCount statistics(WithdrawalRecord withdrawalRecord);
    /**
     * 新增提现记录
     *
     * @param withdrawalRecord 提现记录
     * @return 结果
     */
    int insertWithdrawalRecord(WithdrawalRecord withdrawalRecord);

    /**
     * 修改提现记录
     *
     * @param withdrawalRecord 提现记录
     * @return 结果
     */
    int updateWithdrawalRecord(WithdrawalRecord withdrawalRecord);

    /**
     * 批量删除提现记录
     *
     * @param ids 需要删除的提现记录主键集合
     * @return 结果
     */
    int deleteWithdrawalRecordByIds(Long[] ids);

    /**
     * 删除提现记录信息
     *
     * @param id 提现记录主键
     * @return 结果
     */
    int deleteWithdrawalRecordById(Long id);

    /**
     * 提现审核
     * @param withdrawalRecord
     * @return
     */
    AjaxResult process(WithdrawalRecord withdrawalRecord);

    /**
     * 申请提现
     * @param req
     * @param userVo
     * @return
     */
    ResponseData apply(WithApplyReq req, UserVo userVo);


    /**
     * 提现记录
     * @param req
     * @param userVo
     * @return
     */
    ResponseData withdrawalRecordPage(WithdrawalRecordPageReq req, UserVo userVo);


    /**
     * 提现详情
     * @param id 提现记录id
     * @return
     */
    ResponseData getDetail(Long id);

}
