Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
ts-api-demo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wmvm
ts-api-demo
Commits
e6c94470
Commit
e6c94470
authored
Dec 17, 2024
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收入分析-增加相关接口(已完成)
parent
e1a73714
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
406 additions
and
33 deletions
+406
-33
abkFeeStatistics.control.ts
src/functional/mvc/control/v2/abkFeeStatistics.control.ts
+49
-2
abkCommonService.ts
src/functional/mvc/service/v2/abkCommonService.ts
+2
-0
abkFeeStatistics.service.ts
src/functional/mvc/service/v2/abkFeeStatistics.service.ts
+352
-26
index.ts
src/functional/router/v2/index.ts
+3
-5
No files found.
src/functional/mvc/control/v2/abkFeeStatistics.control.ts
View file @
e6c94470
...
@@ -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
)
{
...
...
src/functional/mvc/service/v2/abkCommonService.ts
View file @
e6c94470
...
@@ -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
)
{
...
...
src/functional/mvc/service/v2/abkFeeStatistics.service.ts
View file @
e6c94470
This diff is collapsed.
Click to expand it.
src/functional/router/v2/index.ts
View file @
e6c94470
...
@@ -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,*/
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment