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

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

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

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

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

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

/**
 * 交易商管理-->开户管理-->交易商初审/复审
 */
export function investorProcess(options: CommonFetchOptions<{ request: Model.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: Model.AccountQueryReq; response: Model.AccountQueryRsp; }>) {
    return httpClient.commonRequest('/investor/accountQuery', 'get', options)
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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