package com.m2pool.lease.service;

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

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;

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

    /*---------------用户权限-----------------------*/

    /**
     * 用户登录/注册
     * @param userLoginVo
     * @return
     */
    Result<Map<String, Object>> login(UserLoginVo userLoginVo);


    /**
     * 用户注册
     * @param userRegisterVo
     * @return
     */
    Result<String> register( UserRegisterVo userRegisterVo);


    /**
     * 修改密码
     * @param userLoginVo
     * @return
     */
    Result<String> updatePassword(UserLoginVo userLoginVo);

    /**
     * 发送用户登录邮箱验证码
     * @param emailCodeVo
     * @return
     */
    Result<String> sendLoginCode( EmailCodeVo emailCodeVo);


    /**
     * 获取用户注册邮箱验证码
     * @param emailCodeVo
     * @return
     */
    Result<String> sendRegisterCode(EmailCodeVo emailCodeVo);


    /**
     * 获取用户修改密码邮箱验证码
     * @param emailCodeVo
     * @return
     */
    Result<String> sendUpdatePwdCode(EmailCodeVo emailCodeVo);


    /**
     * 登出
     * @return
     */
    Result<String> logout();

    /*---------------用户权限-----------------------*/


    /*---------------谷歌双重验证-----------------------*/

    /**
     * 绑定谷歌验证码
     * @param googleBindVo
     * @return
     */
    Result<String> bindGoogle( GoogleBindVo googleBindVo);

    /**
     * 获取谷歌验证器安全码和验证码
     * @return
     */
    Result<GoogleInfoDto> getBindInfo();

    /**
     * 发送谷歌验证器邮箱验证码
     * @return
     */
    Result<String> sendOpenGoogleCode();



    /**
     * 发送关闭谷歌验证 邮箱验证码
     * @return
     */
    Result<String> sendCloseGoogleCode();

    /**
     * 关闭双重验证
     * @param vo
     * @return
     */
    Result<String> closeStepTwo(GoogleCloseVo vo);

    /*---------------谷歌双重验证-----------------------*/


    /*---------------用户信息-----------------------*/

    /**
     * 绑定钱包
     * @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();


    /*---------------用户信息-----------------------*/
}
