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

/**
 * 获取机构开户列表信息
 */
export function queryWskhUserinfo(options: CommonFetchOptions<{ request: Model.WskhUserinfoReq; response: Model.MemberDetail; }>) {
    return httpClient.commonRequest('/wskhUserinfo/query', 'get', options)
}

/**
 * 获取机构开户列表详情信息
 */
export function queryWskhUserinfoDetail(options: CommonFetchOptions<{ request: Model.WskhUserinfoDetailReq; response: Model.MemberDetail; }>) {
    return httpClient.commonRequest('/wskhUserinfo/queryDetail', 'get', options)
}

/**
 * 处理开户信息 新增、修改
 */
export function wskhUserinfoAdd(options: CommonFetchOptions<{ request: Partial<Model.MemberDetail>; }>) {
    return httpClient.commonRequest('/wskhUserinfo/add', 'post', options)
}

/**
 * 审核通过
 */
export function wskhUserinfoApproved(options: CommonFetchOptions<{ request: Partial<Model.MemberDetail>; }>) {
    return httpClient.commonRequest('/wskhUserinfo/approved', 'post', options)
}

/**
 * 撤回提交的待审核信息
 */
export function wskhUserinfoReBack(options: CommonFetchOptions<{ request: Model.WskhUserinfoReBackReq; }>) {
    return httpClient.commonRequest('/wskhUserinfo/reBack', 'get', options)
}

/**
 * 删除待提交的开户申请
 */
export function wskhUserinfoDelete(options: CommonFetchOptions<{ request: Model.WskhUserinfoDeleteReq; }>) {
    return httpClient.commonRequest('/wskhUserinfo/delete', 'get', options)
}

/**
 * 获取机构及所有子机构
 */
export function getAreaAndAllChilds(options: CommonFetchOptions<{ response: Model.AreaAndAllChildsRsp[]; }>) {
    return httpClient.commonRequest('/common/getAreaAndAllChilds', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->新增
 */
export function organSonAdd(options: CommonFetchOptions<{ request: Partial<Model.organSonUpdateReq>; }>) {
    return httpClient.commonRequest('/organSon/addsonorgan', 'post', options)
}

/**
 * 会员机构管理-->子机构管理-->保存
 */
export function organSonSave(options: CommonFetchOptions<{ request: Partial<Model.organSonUpdateReq>; }>) {
    return httpClient.commonRequest('/organSon/edit', 'post', options)
}

/**
 * 会员机构管理-->子机构管理-->修改
 */
export function organSonEdit(options: CommonFetchOptions<{ request: Partial<Model.organSonUpdateReq>; }>) {
    return httpClient.commonRequest('/organSon/editsonorgan', 'post', options)
}

/**
 * 会员机构管理-->子机构管理-->注销
 */
export function organSonDelete(options: CommonFetchOptions<{ request: Model.organSonDeleteReq; }>) {
    return httpClient.commonRequest('/organSon/delete', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->获取机构列表
 */
export function queryOrganSon(options: CommonFetchOptions<{ request: Model.OrganSonReq; response: Model.OrganSonRsp[]; }>) {
    return httpClient.commonRequest('/organSon/query', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->撤回
 */
export function organSonRebackChange(options: CommonFetchOptions<{ request: Model.organSonRebackChangeReq; }>) {
    return httpClient.commonRequest('/organSon/rebackChange', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->恢复
 */
export function organSonRecover(options: CommonFetchOptions<{ request: Model.organSonRecoverReq; }>) {
    return httpClient.commonRequest('/organSon/recover', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->机构详情
 */
export function organSonViewson(options: CommonFetchOptions<{ request: Model.organSonViewsonReq; response: Model.organSonViewsonRsp; }>) {
    return httpClient.commonRequest('/organSon/viewson', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->获取机构资料列表
 */
export function queryOrganDetailList(options: CommonFetchOptions<{ request: Model.OrganDetailListReq; response: Model.OrganDetailListRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/query', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->获取机构资料详情信息
 */
export function queryOrganDetail(options: CommonFetchOptions<{ request: Model.OrganDetailReq; response: Model.OrganDetailRsp; }>) {
    return httpClient.commonRequest('/organDetail/queryDetail', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->修改
 */
export function editOrgan(options: CommonFetchOptions<{ request: Partial<Model.EditOrganReq>; }>) {
    return httpClient.commonRequest('/organDetail/editorgan', 'post', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->注销
 */
export function organDetailLogout(options: CommonFetchOptions<{ request: Model.OrganDetailLogoutReq; }>) {
    return httpClient.commonRequest('/organDetail/logout', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->恢复
 */
export function organDetailRecover(options: CommonFetchOptions<{ request: Model.OrganDetailRecoverReq; }>) {
    return httpClient.commonRequest('/organDetail/recover', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->商品限制设置--> 新增、修改
 */
export function addLimit(options: CommonFetchOptions<{ request: Model.AddLimitReq; }>) {
    return httpClient.commonRequest('/organDetail/addlimit', 'post', options)
}

/**
 * 会员机构管理-->机构管理-->商品限制设置--> 删除
 */
export function delLimit(options: CommonFetchOptions<{ request: Model.DelLimitReq; }>) {
    return httpClient.commonRequest('/organDetail/dellimit', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->商品限制设置-->获取列表
 */
export function queryMemberGoodsLimit(options: CommonFetchOptions<{ request: Model.MemberGoodsLimitReq; response: Model.MemberGoodsLimitRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/querymembergoodslimit', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->风控个性化设置--> 新增
 */
export function addAccountRiskConfig(options: CommonFetchOptions<{ request: Model.AddAccountRiskConfigReq; }>) {
    return httpClient.commonRequest('/organDetail/addaccountriskconfig', 'post', options)
}

/**
 * 会员机构管理-->机构管理-->风控个性化设置-->详情
 */
export function accountRiskConfigview(options: CommonFetchOptions<{ request: Model.AccountRiskConfigViewReq; response: Model.AccountRiskConfigViewRsp;}>) {
    return httpClient.commonRequest('/organDetail/accountriskconfigview', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->风控个性化设置-->获取列表
 */
export function queryAccountRiskConfig(options: CommonFetchOptions<{ request: Model.AccountRiskConfigReq; response: Model.AccountRiskConfigRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/accountriskconfig', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->会员机构查询-->获取列表(营销中心查看经纪会员)
 */
export function queryRole(options: CommonFetchOptions<{ request: Model.OrganRoleReq; response: Model.OrganRoleRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/queryrole', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构详情 ( rolename: 2--运营 operate * 3--营销 marketing * 4--仓库 warehouse * 5--三方 tpart * 6--自营 selfsupport * 7--经纪 broker * 8--做市 marketer * 9--产业 industry)
 */
export function queryRoleDetail(options: CommonFetchOptions<{ request: Model.OrganRoleDetailReq; response: Model.OrganRoleDetailRsp; }>) {
    return httpClient.commonRequest('/organDetail/queryroleDetail', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构角色删除
 */
export function deleteOrganRole(options: CommonFetchOptions<{ request: Model.OrganRoleDeleteReq; }>) {
    return httpClient.commonRequest('/organDetail/del', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->风控个性化设置--> 删除
 */
export function deleteAccountRiskConfig(options: CommonFetchOptions<{ request: Model.DeleteAccountRiskConfigReq; }>) {
    return httpClient.commonRequest('/organDetail/delaccountriskconfig', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->资金账户-->获取列表
 */
export function organTaaccount(options: CommonFetchOptions<{ request: Model.OrganTaaccountReq; response: Model.OrganTaaccountRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/organTaaccount', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->资金账户-->详情
 */
export function organTaaccountDetail(options: CommonFetchOptions<{ request: Model.OrganTaaccountDetailReq; response: Model.OrganTaaccountDetailRsp; }>) {
    return httpClient.commonRequest('/organDetail/organTaaccountDetail', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->资金账户-->签解约流水
 */
export function querySignlog(options: CommonFetchOptions<{ request: Model.SignlogReq; response: Model.SignlogRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/querySignlog', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->资金账户-->修改
 */
export function taaccountEdit(options: CommonFetchOptions<{ request: Model.TaaccountEditReq; }>) {
    return httpClient.commonRequest('/organDetail/taaccountedit', 'post', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->资金账户-->重置密码
 */
export function taaccountResetPwd(options: CommonFetchOptions<{ request: Model.TaaccountResetPwdReq; }>) {
    return httpClient.commonRequest('/organDetail/resetPwd', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->登陆账号-->获取列表
 */
export function queryorgan2User(options: CommonFetchOptions<{ request: Model.Organ2UserReq; response: Model.Organ2UserRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/queryorgan2User', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->登入账号-->启用/停用
 */
export function updateStatusByAutoId(options: CommonFetchOptions<{ request: Model.UpdateStatusByAutoIdReq; }>) {
    return httpClient.commonRequest('/organDetail/updatestatusbyautoid', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->登入账号-->全部启用/全部停用
 */
export function updateOrgan2User(options: CommonFetchOptions<{ request: Model.UpdateOrgan2UserReq; }>) {
    return httpClient.commonRequest('/organDetail/updateorgan2User', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->登陆账号-->重置登入密码
 */
export function updateStatus(options: CommonFetchOptions<{ request: Model.UpdateStatusReq; }>) {
    return httpClient.commonRequest('/organDetail/updateStatus', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->自营会员终端登录账号-->获取列表
 */
export function queryselfsupport(options: CommonFetchOptions<{ request: Model.SelfSupportReq; response: Model.SelfSupportRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/queryselfsupport', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->自营会员终端登录账号-->重置登录密码
 */
export function selfsupportresetPwd(options: CommonFetchOptions<{ request: Model.SelfSupportResetPwdReq; }>) {
    return httpClient.commonRequest('/organDetail/selfsupportresetPwd', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->自营会员终端登录账号-->锁定
 */
export function selfSupportLock(options: CommonFetchOptions<{ request: Model.SelfSupportLockReq; }>) {
    return httpClient.commonRequest('/organDetail/lockAccount', 'get', options)
}