import axios from '@/utils/axios';
import { stringToUrl } from '@/common/js/utils';


// 新商户入驻申请
export function newSaveHuifuMch(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/addApplication`, params);
}

// 汇付用户开户或业务开通
export function openAccount(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/openAccount?${stringToUrl(params)}`);
}

// 获取审核信息
export function getHuifuMchCheck(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuMchCheck?${stringToUrl(params)}`);
}

// 提交审核
export function submitHuifuCheck(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/submitCheck`, params);
}

// 提交修改审核
export function updateMerchant(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/updateMerchant`, params);
}

// 获取商户号
export function getHuifuId(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuId?${stringToUrl(params)}`);
}

// 直接审核商户修改
export function auditMerchantUpdate(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/auditMerchantUpdate`, params);
}

// 查询账户余额
export function checkBalance(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/checkBalance?${stringToUrl(params)}`);
}

// 查询商户业务
export function getMerchantBusiness(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuMch?${stringToUrl(params)}`);
}

// 增加取现业务
export function addWithdraw(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/addCashBusiness?${stringToUrl(params)}`);
}
