Commit e6c94470 authored by ml's avatar ml

收入分析-增加相关接口(已完成)

parent e1a73714
...@@ -25,7 +25,7 @@ export const gatherData = async (req: any, commonParam: CommonParam) => { ...@@ -25,7 +25,7 @@ export const gatherData = async (req: any, commonParam: CommonParam) => {
/** /**
* 查询手续费数据 * 查询手续费数据
* type 1 现货 2 U本位合约 3 币本位合约 4 全部 * query_type 1 现货 2 U本位合约 3 币本位合约 4 全部(包含提现)
* @param req * @param req
* @param commonParam * @param commonParam
*/ */
...@@ -45,6 +45,33 @@ export const getFeeData = async (req: any, commonParam: CommonParam) => { ...@@ -45,6 +45,33 @@ export const getFeeData = async (req: any, commonParam: CommonParam) => {
}; };
/**
* 查询手续费数据详情(分用户)
* query_type 1 现货 2 U本位合约 3 币本位合约 4 全部(不含提现,提现单独接口)
* user_type 用户类型:1:普通用户;2:代理用户(crm用户)
* @param req
* @param commonParam
*/
export const getFeeDataDetails = async (req: any, commonParam: CommonParam) => {
let func_name = "abkFeeStatistics.control.getFeeDataDetails";
try {
setPageAndSize(commonParam);
if (!commonParam.from_time) {
throw ErrorCode.PARAM_MISS;
}
let type = Number(commonParam.query_type) || 4;
let user_type = Number(commonParam.user_type) || 1;
let user_id = Number(commonParam.user_id || 0);
let res = await abkFeeStatisticsService.getFeeDataDetails(commonParam.from_time, commonParam.to_time, commonParam.page, commonParam.size, type, user_type, user_id);
return Res3Utils.result(res);
}
catch (e) {
logger.error(`${func_name} error:${e}`);
return Res3Utils.getErrorResult(e);
}
};
/** /**
* 提现手续费 * 提现手续费
* @param req * @param req
...@@ -55,7 +82,27 @@ export const withdrawData = async (req: any, commonParam: CommonParam) => { ...@@ -55,7 +82,27 @@ export const withdrawData = async (req: any, commonParam: CommonParam) => {
try { try {
setPageAndSize(commonParam); setPageAndSize(commonParam);
beforeQueryCheckTime(commonParam); beforeQueryCheckTime(commonParam);
let res = await abkFeeStatisticsService.withdrawData(commonParam.from_time, commonParam.to_time,commonParam.page,commonParam.size); let res = await abkFeeStatisticsService.withdrawData(commonParam.from_time, commonParam.to_time, commonParam.page, commonParam.size);
return Res3Utils.result(res);
}
catch (e) {
logger.error(`${func_name} error:${e}`);
return Res3Utils.getErrorResult(e);
}
};
/**
* 提现手续费详情
* @param req
* @param commonParam
*/
export const withdrawDataDetails = async (req: any, commonParam: CommonParam) => {
let func_name = "abkFeeStatistics.control.withdrawDataDetails";
try {
setPageAndSize(commonParam);
let user_id = Number(commonParam.user_id || 0);
let res = await abkFeeStatisticsService.withdrawDataDetails(commonParam.from_time, commonParam.to_time, commonParam.page, commonParam.size, user_id);
return Res3Utils.result(res); return Res3Utils.result(res);
} }
catch (e) { catch (e) {
......
...@@ -16,6 +16,8 @@ export interface CommonParam { ...@@ -16,6 +16,8 @@ export interface CommonParam {
uid_or_addr?: any//查询条件 用户id 或 充提地址 uid_or_addr?: any//查询条件 用户id 或 充提地址
address?: any//查询条件 用户id 或 充提地址 address?: any//查询条件 用户id 或 充提地址
user_type?: any//查询条件 用户类型:1:普通用户;2:代理用户(crm用户)
} }
export function setPageAndSize(commonParam: CommonParam) { export function setPageAndSize(commonParam: CommonParam) {
......
...@@ -36,12 +36,10 @@ const postFunc = { ...@@ -36,12 +36,10 @@ const postFunc = {
//收入分析 //收入分析
'abkFeeStatistics/home/gatherData': feeStatisticsCtrl.gatherData,//首页数据概览 'abkFeeStatistics/home/gatherData': feeStatisticsCtrl.gatherData,//首页数据概览
'abkFeeStatistics/getFeeData': feeStatisticsCtrl.getFeeData,//平台、现货、合约 手续费查询 'abkFeeStatistics/getFeeData': feeStatisticsCtrl.getFeeData,//平台、现货、合约 手续费查询
'abkFeeStatistics/getFeeDataDetails': feeStatisticsCtrl.getFeeDataDetails,//平台、现货、合约 手续费查询详情
'abkFeeStatistics/withdrawData': feeStatisticsCtrl.withdrawData,//提现手续费 'abkFeeStatistics/withdrawData': feeStatisticsCtrl.withdrawData,//提现手续费
/* 'abkFeeStatistics/withdrawDataDetails': feeStatisticsCtrl.withdrawDataDetails,//提现手续费详情
'user/login/confirm': userOptCtrl.loginConfirm,
'user/bind/totp/ask': userOptCtrl.bindTotpAsk,
'user/bind/totp/confirm': userOptCtrl.bindTotpConfirm,
'user/auth/reset/totp': userAuthConfigCtrl.resetTotp,*/
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment