import httpClient from '@/services/http'
import { CommonFetchOptions } from '@/services/http/types'

/**
 * 交易商开户列表信息获取
 */
export function queryInvestor(options: CommonFetchOptions<{ request: Investor.InvestorReq; response: Investor.InvestorRsp; }>) {
    return httpClient.commonRequest('/investor/query', 'get', options)
}

/**
 * 获取交易商开户详情信息
 */
export function queryInvestorDetail(options: CommonFetchOptions<{ request: Investor.InvestorDetailReq; response: Member.MemberDetail; }>) {
    return httpClient.commonRequest('/investor/querySunDetail', 'get', options)
}

/**
 * 交易商开户
 */
export function dealSunOrgan(options: CommonFetchOptions<{ request: Partial<Member.MemberDetail>; }>) {
    return httpClient.commonRequest('/investor/dealSunOrgan', 'post', options)
}

/**
 * 获取交易商列表信息
 */
export function queryInvestorList(options: CommonFetchOptions<{ request: Investor.InvestorListReq; response: Investor.InvestorListRsp; }>) {
    return httpClient.commonRequest('/investor/initQuery', 'get', options)
}

/**
 * 获取交易商详情信息
 */
export function queryInvestorListDetail(options: CommonFetchOptions<{ request: Investor.InvestorListDetailReq; response: Investor.InvestorListDetailRsp; }>) {
    return httpClient.commonRequest('/investor/initQueryDetail', 'get', options)
}

/**
 * 交易商管理-->开户管理-->交易商初审/复审
 */
export function investorProcess(options: CommonFetchOptions<{ request: Investor.InvestorProcessReq; }>) {
    return httpClient.commonRequest('/investor/investorProcess', 'get', options)
}

/**
 * 交易商管理导出
 */
export function investorExport(options: CommonFetchOptions<{ response: string; }> = {}) {
    return httpClient.commonRequest('/investor/export', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->查询个性化设置
 */
export function accountQuery(options: CommonFetchOptions<{ request: Investor.AccountQueryReq; response: Investor.AccountQueryRsp; }>) {
    return httpClient.commonRequest('/investor/accountQuery', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->登录账户列表查询-->注销停用
 */
export function deleteAccount(options: CommonFetchOptions<{ request: Investor.DeleteAccountReq; }>) {
    return httpClient.commonRequest('/investor/deleteAccount', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->资金账户、资金账户详情（userid不传）
 */
export function showAccount(options: CommonFetchOptions<{ request: Investor.ShowAccountReq; response: Investor.ShowAccountRsp[]; }> = {}) {
    return httpClient.commonRequest('/investor/showAccount', 'get', options)
}

/**
 * 交易商管理-->交易商变更审核-->查询交易商变更审核列表
 */
export function queryModifyPage(options: CommonFetchOptions<{ request: Investor.ModifyPageReq; response: Investor.ModifyPageRsp[]; }>) {
    return httpClient.commonRequest('/investor/queryModifyPage', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商分组管理-->获取列表
 */
export function queryPersonalized(options: CommonFetchOptions<{ request: Investor.PersonalizedReq; response: Investor.PersonalizedRsp[]; }>) {
    return httpClient.commonRequest('/investor/queryPersonalized', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商分组管理-->分组交易商获取列表
 */
export function queryPersonalizedDetail(options: CommonFetchOptions<{ request: Investor.PersonalizedDetailReq; response: Investor.PersonalizedDetailRsp[]; }>) {
    return httpClient.commonRequest('/investor/queryPersonalizedDetail', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商分组管理-->分组交易商获取列表-->初始化交易商
 */
export function queryInvestorForPer(options: CommonFetchOptions<{ request: Investor.InvestorForPerReq; response: Investor.InvestorForPerRsp; }>) {
    return httpClient.commonRequest('/investor/queryInvestorForPer', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商分组管理-->获取所选客户信息对应风险率
 */
export function getRiskRatioTypeForMarketer(options: CommonFetchOptions<{ request: Investor.RiskRatioTypeForMarketerReq; response: Investor.RiskRatioTypeForMarketerRsp; }>) {
    return httpClient.commonRequest('/investor/getRiskRatioTypeForMarketer', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商分组管理-->新增
 */
export function addPersonalized(options: CommonFetchOptions<{ request: Investor.AddPersonalizedReq; }>) {
    return httpClient.commonRequest('/investor/addPersonalized', 'post', options)
}

/**
 * 交易商管理-->个性化管理-->交易商分组管理-->删除
 */
export function delInvest(options: CommonFetchOptions<{ request: Investor.DelInvestReq; }>) {
    return httpClient.commonRequest('/investor/delInvest', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商分组管理-->分组交易商获取列表-->新增
 */
export function addInvestorForPer(options: CommonFetchOptions<{ request: Investor.AddInvestorForPerReq; }>) {
    return httpClient.commonRequest('/investor/addInvestorForPer', 'post', options)
}

/**
 * 交易商管理-->个性化管理-->交易商分组管理-->分组交易商获取列表-->删除
 */
export function delInvestorForPer(options: CommonFetchOptions<{ request: Investor.DelInvestorForPerReq; }>) {
    return httpClient.commonRequest('/investor/delInvestorForPer', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->风控个性化-->获取列表
 */
export function queryAccountRiskConfig(options: CommonFetchOptions<{ request: Investor.AccountRiskConfigReq; response: Investor.AccountRiskConfigRsp[]; }>) {
    return httpClient.commonRequest('/investor/queryAccountRiskConfig', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->风控个性化-->详情
 */
export function investorView(options: CommonFetchOptions<{ request: Investor.InvestorViewReq; response: Investor.InvestorViewRsp; }>) {
    return httpClient.commonRequest('/investor/view', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->风控个性化-->新增获取交易商资金账户信息
 */
export function getTaaccountList(options: CommonFetchOptions<{ request: Investor.TaaccountListReq; response: number[]; }>) {
    return httpClient.commonRequest('/investor/getTaaccountList', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->风控个性化-->新增/修改
 */
export function addAccountRiskConfig(options: CommonFetchOptions<{ request: Partial<Investor.AddAccountRiskConfigReq>; }>) {
    return httpClient.commonRequest('/investor/addAccountRiskConfig', 'post', options)
}

/**
 * 交易商管理-->个性化管理-->风控个性化-->删除
 */
export function deleteConfig(options: CommonFetchOptions<{ request: Investor.DeleteConfigReq; }>) {
    return httpClient.commonRequest('/investor/deleteConfig', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商个性化-->获取树结构
 */
export function getInvestorTree(options: CommonFetchOptions<{ response: Investor.InvestorTreeRsp[]; }>) {
    return httpClient.commonRequest('/investor/getTree', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商个性化-->新增-->初始化交易商个性化信息
 */
export function initInvestorPerson(options: CommonFetchOptions<{ request: Investor.InvestorPersonReq; response: Investor.InvestorPersonRsp; }>) {
    return httpClient.commonRequest('/investor/initInvestorPerson', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商个性化-->修改-->初始化保证金类别
 */
export function initBZList(options: CommonFetchOptions<{ request: Investor.BZListReq; response: Investor.BZListRsp[]; }>) {
    return httpClient.commonRequest('/investor/initBZList', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->交易商个性化-->新增/修改
 */
export function traderPersonAdd(options: CommonFetchOptions<{ request: Partial<Investor.TraderPersonAddReq>; }>) {
    return httpClient.commonRequest('/investor/traderPersonAdd', 'post', options)
}

/**
 * 交易商管理-->个性化管理-->交易商个性化-->删除
 */
export function deleteTraderConfig(options: CommonFetchOptions<{ request: Partial<Investor.DeleteTraderConfigReq>; }>) {
    return httpClient.commonRequest('/investor/deleteTraderConfig', 'post', options)
}

/**
 * 交易商管理-->个性化管理-->交易商个性化-->详情
 */
export function tradeConfigView(options: CommonFetchOptions<{ request: Investor.TradeConfigViewReq; response: Investor.TradeConfigViewRsp; }>) {
    return httpClient.commonRequest('/investor/tradeConfigView', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->修改
 */
export function investorEdit(options: CommonFetchOptions<{ request: Investor.InvestorEditReq; }>) {
    return httpClient.commonRequest('/investor/investorEdit', 'post', options)
}

/**
 * 交易商管理-->交易商管理-->撤回变更
 */
export function investorRebackChange(options: CommonFetchOptions<{ request: Investor.InvestorRebackChangeReq; }>) {
    return httpClient.commonRequest('/investor/rebackChange', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->注销
 */
export function investorLogOff(options: CommonFetchOptions<{ request: Investor.InvestorLogOffReq; }>) {
    return httpClient.commonRequest('/investor/logOff', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->恢复
 */
export function investorRecover(options: CommonFetchOptions<{ request: Investor.InvestorRecoverReq; }>) {
    return httpClient.commonRequest('/investor/recover', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->资金账户-->修改
 */
export function investorAccountEdit(options: CommonFetchOptions<{ request: Investor.InvestorAccountEditReq; }>) {
    return httpClient.commonRequest('/investor/edit', 'post', options)
}

/**
 * 交易商管理-->交易商管理-->登录账户列表查询
 */
export function queryInvestorLoginList(options: CommonFetchOptions<{ request: Investor.InvestorLoginListReq; response: Investor.InvestorLoginListRsp; }>) {
    return httpClient.commonRequest('/investor/queryInvestor', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->登录账户列表查询-->查看登录流水
 */
export function queryLoginLog(options: CommonFetchOptions<{ request: Investor.LoginLogReq; response: Investor.LoginLogRsp; }>) {
    return httpClient.commonRequest('/investor/queryLoginLog', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->登录账户列表查询-->查看手机号
 */
export function queryUserAuthInfo(options: CommonFetchOptions<{ request: Investor.UserAuthInfoReq; response: Investor.UserAuthInfoRsp; }>) {
    return httpClient.commonRequest('/investor/queryUserAuthInfo', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->登录账户列表查询-->账号锁定、解锁
 */
export function lockAccount(options: CommonFetchOptions<{ request: Investor.LockAccountReq; }>) {
    return httpClient.commonRequest('/investor/lockAccount', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->登录账户列表查询-->重置密码
 */
export function resetPwd(options: CommonFetchOptions<{ request: Investor.ResetPwdReq; }>) {
    return httpClient.commonRequest('/investor/resetPwd', 'get', options)
}

/**
 * 交易商管理-->交易商管理-->登录账户列表查询-->恢复
 */
export function restoreAccount(options: CommonFetchOptions<{ request: Investor.RestoreAccountReq; }>) {
    return httpClient.commonRequest('/investor/restoreAccount', 'get', options)
}

/**
 * 交易商管理-->交易商变更审核-->审核
 */
export function modifyAudit(options: CommonFetchOptions<{ request: Investor.ModifyAuditReq; }>) {
    return httpClient.commonRequest('/investor/modifyAudit', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->资金账户个性化-->获取树结构
 */
export function getAccTradeTree(options: CommonFetchOptions<{ response: Investor.AccTradeTreeRsp[]; }>) {
    return httpClient.commonRequest('/investor/getAccTradeTree', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->资金账户个性化--> 详情
 */
export function accTradeConfigView(options: CommonFetchOptions<{ request: Investor.AccTradeConfigViewReq; response: Investor.AccTradeConfigViewRsp; }>) {
    return httpClient.commonRequest('/investor/accTradeConfigView', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->资金账户个性化--> 新增初始化交易商信息
 */
export function initAccTrade(options: CommonFetchOptions<{ request: Investor.InitAccTradeReq; response: Investor.InitAccTradeRsp[]; }>) {
    return httpClient.commonRequest('/investor/initAccTrade', 'get', options)
}

/**
 * 交易商管理-->个性化管理-->资金账户个性化--> 删除
 */
export function accTradeConfigDelete(options: CommonFetchOptions<{ request: Investor.AccTradeConfigDeleteReq; }>) {
    return httpClient.commonRequest('/investor/accTradeConfigDelete', 'get', options)
}

/**
 * 交易商管理-->交易商批量转移-->新增
 */
export function investorTransferAdd(options: CommonFetchOptions<{ request: Partial<Investor.InvestorTransferAddReq>; }>) {
    return httpClient.commonRequest('/investor/organSonTransferAdd', 'post', options)
}

/**
 * 交易商管理-->交易商批量转移-->新增初始化
 */
export function getUserAccountDetail(options: CommonFetchOptions<{ request: Investor.UserAccountDetailReq; response: Investor.UserAccountDetailRsp; }>) {
    return httpClient.commonRequest('/investor/getUserAccountDetail', 'get', options)
}

/**
 * 交易商管理-->交易商销户审核-->获取列表
 */
export function investorUserCancelApply(options: CommonFetchOptions<{ request: Investor.InvestorUserCancelApplyReq; response: Investor.InvestorUserCancelApplyRsp[]; }>) {
    return httpClient.commonRequest('/investor/usercancelapply', 'get', options)
}

/**
 * 交易商管理-->交易商销户审核-->详情
 */
export function investorCancelview(options: CommonFetchOptions<{ request: Investor.InvestorCancelviewReq; response: Investor.InvestorCancelviewRsp; }>) {
    return httpClient.commonRequest('/investor/cancelview', 'get', options)
}

/**
 * 交易商管理-->交易商销户审核-->审核
 */
export function investorCancelaudit(options: CommonFetchOptions<{ request: Investor.InvestorCancelauditReq; }>) {
    return httpClient.commonRequest('/investor/cancelaudit', 'get', options)
}