import request from '@/utils/request' import qs from 'qs' import { getToken } from "@/utils/auth"; /** * * @returns * 通用数据 - 接口 * start * */ export const common_api = { //查码商可分配通道 findChannelListAll: (query) => { return request({ url: '/carddealer/carddealerCard/findChannelListAll', method: 'get', params: query, }) }, //查询所有商户 getMerchantList: (query) => { return request({ url: '/order/payOrder/getMerchantList', method: 'put', }) }, //获取商户通道信息 findMerchantChannelInfo: (query) => { return request({ url: '/order/payOrder/findMerchantChannelInfo', method: 'get', params: query, }) }, //查询所有银行列表 bankListAll: (query) => { return request({ url: '/platform/bank/listAll', method: 'get', params: query, }) }, // 首页数据 homeData: (query) => { return request({ url: '/platform/statistics/home', method: 'get', params: query, }) }, // 查询所有通道 platformChannelAll: () => { return request({ url: '/platform/platformChannel/allList', method: 'get', }) }, // 查询所有码商 carddealerChannelAll: () => { return request({ url: '/carddealer/carddealer/allList', method: 'get', }) }, // 根据id查所有码商 carddealerWithdrawOrderAll: (query) => { return request({ url: '/order/TransferOrder/allList', method: 'get', params: query }) }, } /** * 用户模块 */ export const payAgentUser = { // 更新密钥 upGoogleCaptcha: (data) => { return request({ url: '/system/user/upGoogleCaptcha?userId=' + data.userId, method: 'PUT', headers: { Authorization: "Bearer " + getToken(), }, }) }, // 获取用户谷歌密钥 getGoogleCaptcha: (query) => { return request({ url: '/system/user/getGoogleCaptcha', method: 'get', params: query, headers: { Authorization: "Bearer " + getToken(), }, }) }, } /** * 商户模块 */ export const payMerchant = { // 获取风控 getMerchantWindControl: (id) => { return request({ url: '/system/merchant/getMerchantWindControl/' + id, method: 'get', }) }, // 删除商户 merchantdel: (data) => { return request({ url: '/system/merchant/del?' + qs.stringify(data), method: 'post', }) }, // 获取凭证 getCertificate: (query) => { return request({ url: '/order/TransferOrder/getCertificate/' + query.orderNo, method: 'get', params: query }) }, // 订单驳回 orderRejection: (query) => { return request({ url: '/order/TransferOrder/orderRejection', method: 'get', params: query }) }, // 确认付款 confirmPayment: (query) => { return request({ url: '/order/TransferOrder/confirmPayment', method: 'get', params: query }) }, // 关闭子单 closeOrderSub: (query) => { return request({ url: '/order/TransferOrder/closeOrderSub', method: 'get', params: query }) }, // 码商订单查询子单列表详情 selectOrderSub: (query) => { return request({ url: '/order/TransferOrder/selectOrderSub', method: 'get', params: query }) }, // 获取通道 getChannelList: (id) => { return request({ url: '/system/merchant/getChannel/' + id, method: 'get', }) }, // 获取提现配置 getWithdrawConfig: (id) => { return request({ url: '/system/merchant/getWithdrawConfig/' + id, method: 'get', }) }, // 获取商户MD5 getmd5Key: (id) => { return request({ url: '/system/merchant/getmd5Key/' + id, method: 'get', }) }, // 谷歌密钥 getKey: (id) => { return request({ url: '/system/merchant/getGoogleSecret/' + id, method: 'get', }) }, // 重置md5 resetMd5Key: (id) => { return request({ url: '/system/merchant/resetMd5Key/' + id, method: 'PUT', }) }, // 重置谷歌key resetGoogleSecret: (id) => { return request({ url: '/system/merchant/resetGoogleSecret/' + id, method: 'PUT', }) }, // 登录ip getLoginIp: (id) => { return request({ url: '/system/merchant/getIpWhite/' + id, method: 'get', }) }, // 重置登录ip resetIpWhite: (data) => { return request({ url: '/system/merchant/resetIpWhite?' + qs.stringify(data), method: 'post', }) }, // 重置商户风控信息 resetMerchantWindControl: (data) => { return request({ url: '/system/merchant/resetMerchantWindControl', method: 'put', data: data }) }, //修改提现 upWithdrawConfig: (data) => { return request({ url: '/system/merchant/upWithdrawConfig', method: 'put', data: data }) }, //修改通道 upChannel: (data) => { return request({ url: '/system/merchant/upChannel', method: 'put', data: data }) }, //绑定通道 bindChannel: (data) => { return request({ url: '/system/merchant/bindChannel?' + qs.stringify(data), method: 'put', }) }, // 支付ip getPayIp: (id) => { return request({ url: '/system/merchant/getPayapiWhitelistIp/' + id, method: 'get', }) }, // 重置支付ip resetPayapiWhitelistIp: (data) => { return request({ url: '/system/merchant/resetPayapiWhitelistIp?' + qs.stringify(data), method: 'post', }) }, // 操作金额 operatingBalance: (data) => { return request({ url: '/system/merchant/operatingBalance?' + qs.stringify(data), method: 'post', }) }, // 修改商户登录密码 editLoginPwd: (data) => { return request({ url: '/system/merchant/editLoginPwd?' + qs.stringify(data), method: 'post', }) }, // 修改商户支付密码 editPayPwd: (data) => { return request({ url: '/system/merchant/editPayPwd?' + qs.stringify(data), method: 'post', }) }, // 商户或代理商列表 listInfo: (query) => { return request({ url: '/system/user/storeOrAgentList', method: 'get', params: query, headers: { Authorization: "Bearer " + getToken(), }, }) }, // 删除费率 delInfo: (id) => { return request({ url: '/system/merchant/delChannel/' + id, method: 'delete' }) }, } /** * 码商模块 */ export const payCard = { //修改通道 upChannel: (data) => { return request({ url: '/carddealer/carddealer/editChannel', method: 'put', data: data }) }, // 删除费率 delInfo: (id) => { return request({ url: '/carddealer/carddealer/delChannel/' + id, method: 'delete' }) }, //绑定通道 bindChannel: (data) => { return request({ url: '/carddealer/carddealer/bindChannel', method: 'put', data: data }) }, // 获取所有通道 carddealerGetAllChannel: (id) => { return request({ url: '/carddealer/carddealer/getAllChannel/' + id, method: 'get', }) }, // 获取通道 carddealerGetChannel: (id) => { return request({ url: '/carddealer/carddealer/getChannel/' + id, method: 'get', }) }, // 详情 getInfo: (id) => { return request({ url: '/carddealer/carddealer/' + id, method: 'get', }) }, // 重置谷歌key resetGoogleSecret: (id) => { return request({ url: '/carddealer/carddealer/resetGoogleSecret/' + id, method: 'PUT', }) }, // 下级 getSubCardDealerList: (id) => { return request({ url: '/carddealer/carddealer/getSubCardDealerList/' + id, method: 'get', }) }, // 登录白名单 getLoginIp: (id) => { return request({ url: '/carddealer/carddealer/getIpWhite/' + id, method: 'get', }) }, //新增 addInfo: (data) => { return request({ url: '/carddealer/carddealer', method: 'post', data: data }) }, // 修改 updateInfo: (data) => { return request({ url: '/carddealer/carddealer', method: 'put', data: data }) }, // 重置登录ip resetIpWhite: (data) => { return request({ url: '/carddealer/carddealer/resetIpWhite?' + qs.stringify(data), method: 'post', }) }, // 操作金额(佣金) operatingBalance: (data) => { return request({ url: '/carddealer/carddealer/operatingBalance?' + qs.stringify(data), method: 'post', }) }, // 操作金额 (余额) operatingMargin: (data) => { return request({ url: '/carddealer/carddealer/operatingMargin?' + qs.stringify(data), method: 'post', }) }, // 修改操作人密码 editDevicePassword: (data) => { return request({ url: '/carddealer/carddealer/editDevicePassword?' + qs.stringify(data), method: 'post', }) }, // 修改登录密码 editLoginPwd: (data) => { return request({ url: '/carddealer/carddealer/editLoginPwd?' + qs.stringify(data), method: 'post', }) }, // 修改支付密码 editPayPwd: (data) => { return request({ url: '/carddealer/carddealer/editPayPwd?' + qs.stringify(data), method: 'post', }) }, } /** * 设备 */ export const payDev = { // 修改 updateInfo: (data) => { return request({ url: '/carddealer/carddealerDev', method: 'put', data: data }) }, // 详情 getInfo: (id) => { return request({ url: '/carddealer/carddealerDev/' + id, method: 'get', }) }, } /** * 收款卡 */ export const payShouCard = { // 分配通道 allocationChannel: (data) => { return request({ url: '/carddealer/carddealerCard/allocationChannel?' + qs.stringify(data), method: 'post', }) }, // 清除码商卡未付 clearCarddealerCardOutstanding: (data) => { return request({ url: '/carddealer/carddealerCard/clearCarddealerCardOutstanding?' + qs.stringify(data), method: 'get', }) }, // 详情 getInfo: (id) => { return request({ url: '/carddealer/carddealer/' + id, method: 'get', }) }, // 修改 updateInfo: (data) => { return request({ url: '/carddealer/carddealerCard', method: 'put', data: data }) }, // 修改支付密码 editPayPwd: (data) => { return request({ url: '/carddealer/carddealer/editPayPwd?' + qs.stringify(data), method: 'post', }) }, } /** * 短信模板 */ export const paySes = { // 测试短信模版 test: (data) => { return request({ url: '/carddealer/carddealerSmsTemp/test?' + qs.stringify(data), method: 'post', }) }, // 识别 identify: (id) => { return request({ url: '/carddealer/carddealerSms/identify/' + id, method: 'put', }) }, } /** * 统计管理 */ export const payRecordStatics = { // 导出日结报表查看明细 exportAccountDailyDetailsList: (query) => { return request({ url: 'GET /platform/statistics/exportAccountDailyDetailsList', method: 'get', params: query, }) }, // 日结报表查看明细 accountDailyDetailsList: (query) => { return request({ url: '/platform/statistics/accountDailyDetailsList', method: 'get', params: query, }) }, // 商户实时统计 listInfo: (query) => { return request({ url: '/platform/statistics/merchantRealStatistics', method: 'get', params: query, }) }, // 码商实时统计 carddealerRealStatistics: (query) => { return request({ url: '/platform/statistics/carddealerRealStatistics', method: 'get', params: query, }) }, // 日运营报表 dailyReport: (query) => { return request({ url: '/platform/statistics/dailyReport', method: 'get', params: query, }) }, // 导出日结报表 export: (query) => { return request({ url: '/platform/statistics/exportAccountDailyStatement', method: 'get', params: query, }) }, // 导出商户实时 exportMerchant: (query) => { return request({ url: '/platform/statistics/exportMerchantRealStatistics', method: 'get', params: query, }) }, // 导出码商实时 exportCarddealer: (query) => { return request({ url: '/platform/statistics/exportCarddealerRealStatistics', method: 'get', params: query, }) }, // 导出日结 exportAccountDailyStatement: (query) => { return request({ url: '/platform/statistics/exportAccountDailyStatement', method: 'get', params: query, }) }, // 日结报表 accountDailyStatement: (query) => { return request({ url: '/platform/statistics/accountDailyStatement', method: 'get', params: query, }) }, // 收款卡数据统计 cardDataStatistics: (query) => { return request({ url: '/platform/statistics/cardDataStatistics', method: 'get', params: query, }) }, // 导出收款卡数据统计 exportDataStatistics: (query) => { return request({ url: '/platform/statistics/exportDataStatistics', method: 'get', params: query, }) }, } /** * 财务管理 */ export const payFinance = { // 查询平台流水明细列表 listInfo: (query) => { return request({ url: '/platform/platformChannel/platformWalletLogList', method: 'get', params: query, }) }, // 导出平台流水明细列表 export: (query) => { return request({ url: '/platform/platformChannel/exportPlatformWalletLogList', method: 'get', params: query, }) }, } /** * 配置管理 */ export const payConfig = { // 获取代收配置 getDefaultPayConfig: (query) => { return request({ url: '/platform/configuration/getDefaultPayConfig', method: 'get', params: query, }) }, // 更新代收配置 upDefaultPayConfig: (data) => { return request({ url: '/platform/configuration/upDefaultPayConfig?' + qs.stringify(data), method: 'post', }) }, // 获取代付配置 getDefaultTransferConfig: (query) => { return request({ url: '/platform/configuration/getDefaultTransferConfig', method: 'get', params: query, }) }, // 更新代付配置 upDefaultTransferConfig: (data) => { return request({ url: '/platform/configuration/upDefaultTransferConfig?' + qs.stringify(data), method: 'post', }) }, // 获取提现配置 getDefaultWithdrawConfig: (query) => { return request({ url: '/platform/configuration/getDefaultWithdrawConfig', method: 'get', params: query, }) }, // 更新提现配置 upDefaultWithdrawConfig: (data) => { return request({ url: '/platform/configuration/upDefaultWithdrawConfig?' + qs.stringify(data), method: 'post', }) }, // 获取短信配置 getSmsConfig: (query) => { return request({ url: '/platform/configuration/getSmsConfig', method: 'get', params: query, }) }, // 更新短信配置 upSmsConfig: (data) => { return request({ url: '/platform/configuration/upSmsConfig?' + qs.stringify(data), method: 'post', }) }, } /** * 商户充值订单管理 */ export const payToOrder = { // 超时支付 和 收款 payOrderOvertimePayment: (query) => { return request({ url: '/order/payOrder/overtimePayment', method: 'get', params: query, }) }, // 拉测试单 notifyOrder: (data) => { return request({ url: '/order/payOrder/notify?' + qs.stringify(data), method: 'put', }) }, // 超时支付 overtimePayment: (query) => { return request({ url: '/order/merchantRechargeOrder/overtimePayment', method: 'get', params: query, }) }, // 获取代收配置 getDefaultPayConfig: (query) => { return request({ url: '/platform/configuration/getDefaultPayConfig', method: 'get', params: query, }) }, // 通知 notify: (data) => { return request({ url: '/order/payOrder/notify/' + data, method: 'put', }) }, } /** * 代付测试订单 */ export const payDfOrder = { // 查询代付测试订单列表 listInfo: (query) => { return request({ url: '/order/TransferOrder/TransferTestOrder', method: 'get', params: query, }) }, // 通知 notify: (data) => { return request({ url: '/order/payOrder/notify/' + data, method: 'put', }) }, // 代付拉测试单 notifyOrder: (data) => { return request({ url: '/order/TransferOrder/pullTestPayment?' + qs.stringify(data), method: 'put', }) }, } /** * 商户代付订单管理 */ export const payOutOrder = { //点击审核 orderReview: (data) => { return request({ url: '/order/TransferOrder/orderReview?' + qs.stringify(data), method: 'post', }) }, // 获取该卡商绑定的银行卡列表(区分代收代付) getCarddealerCardList: (query) => { return request({ url: '/order/TransferOrder/getCarddealerCardList', method: 'get', params: query, }) }, // 关闭和成功 setPayOrderSuccess: (query) => { return request({ url: '/order/TransferOrder/setPayOrderSuccess', method: 'get', params: query, }) }, // 关闭 withdrawOrderClos: (query) => { return request({ url: '/order/TransferOrder/withdrawOrderClose', method: 'get', params: query, }) }, // 分配 distributionOrder: (query) => { return request({ url: '/order/TransferOrder/distributionOrder', method: 'get', params: query, }) }, // 通知 notify: (data) => { return request({ url: '/order/TransferOrder/notify/' + data, method: 'put', }) }, // 获取该卡商绑定的银行卡列表 getCarddealerCard: (query) => { return request({ url: '/order/TransferOrder/getCarddealerCard', method: 'get', params: query, }) }, // 加解锁 addUnlock: (query) => { return request({ url: '/order/TransferOrder/addUnlock', method: 'get', params: query, }) }, // 获取凭证 getCertificate: (data) => { return request({ url: '/order/TransferOrder/getCertificate/' + data, method: 'get', }) }, }