package com.m2pool.lease.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.m2pool.lease.dto.*;
import com.m2pool.lease.entity.LeaseUser;
import com.m2pool.lease.vo.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author yyb
 * @since 2025-07-23
 */
public interface LeaseUserService extends IService<LeaseUser> {

    /**
     * 用户登录/注册
     * @param userURDVo
     * @return
     */
    Result<UserDto> login(UserURDVo userURDVo);


    /**
     * 绑定钱包
     * @param chainAndCoinVo
     * @return
     */
    Result<UserWalletDataDto> bindWallet( ChainAndCoinVo chainAndCoinVo);

    /**
     * 获取用户相关钱包信息
     * @return
     */
    Result<List<UserWalletDataDto>> getWalletInfo();


    /**
     * 余额提现
     * @return
     */
    Result<String> withdrawBalance(BalanceVo balanceVo);


    /**
     * 获取余额提现记录列表
     * @param balancePageVo
     * @return
     */
    PageResult<PayWithdrawMessageDto> balanceWithdrawList(BalancePageVo balancePageVo);

    /**
     * 获取余额充值记录列表
     * @param balancePageVo
     * @return
     */
    PageResult<PayRechargeMessageDto> balanceRechargeList(BalancePageVo balancePageVo);


    /**
     * 卖家：获取钱包交易(收款)记录表
     * @param balancePageVo
     * @return
     */
    PageResult<PayRecordMessageDto> balancePayList(BalancePageVo balancePageVo);

    /**
     * 卖家：获取钱包交易(收款)记录表
     * @param recordTypePageVo
     * @return
     */
    PageResult<TransactionRecordDto> transactionRecord( RecordTypePageVo recordTypePageVo);

    /**
     * 最近5条交易
     * @return
     */
    Result<List<RecentlyTransactionDto>>  getRecentlyTransaction();


    /**
     * 获取手续费
     * @return
     */
    Result<List<ChargeDto>>  getCharge();


    /**
     * 下载客户端
     * @param response
     * @return
     */
   void downloadClient(String userEmail,String type,HttpServletRequest request, HttpServletResponse response);


   /**
     * 获取用户信息
     * @return
     */
    String getClientVersion();
}
