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
763a14f4
Commit
763a14f4
authored
Jan 21, 2025
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资管后台-手续费相关增加 昨日数据
parent
4977e47e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
2 deletions
+62
-2
abkFeeStatistics.control.ts
src/functional/mvc/control/v2/abkFeeStatistics.control.ts
+24
-0
abkFeeStatistics.service.ts
src/functional/mvc/service/v2/abkFeeStatistics.service.ts
+37
-2
index.ts
src/functional/router/v2/index.ts
+1
-0
No files found.
src/functional/mvc/control/v2/abkFeeStatistics.control.ts
View file @
763a14f4
...
@@ -44,6 +44,27 @@ export const getFeeData = async (req: any, commonParam: CommonParam) => {
...
@@ -44,6 +44,27 @@ export const getFeeData = async (req: any, commonParam: CommonParam) => {
}
}
};
};
/**
* 昨日数据页签-查询手续费数据
* query_type 1 现货 2 U本位合约 3 币本位合约 4 全部(包含提现)
* @param req
* @param commonParam
*/
export
const
getYesTabFeeData
=
async
(
req
:
any
,
commonParam
:
CommonParam
)
=>
{
let
func_name
=
"abkFeeStatistics.control.getYesTabFeeData"
;
try
{
setPageAndSize
(
commonParam
);
beforeQueryCheckTime
(
commonParam
);
let
type
=
Number
(
commonParam
.
query_type
)
||
4
;
let
res
=
await
abkFeeStatisticsService
.
getYesTabFeeData
(
commonParam
.
from_time
,
commonParam
.
to_time
,
commonParam
.
page
,
commonParam
.
size
,
type
);
return
Res3Utils
.
result
(
res
);
}
catch
(
e
)
{
logger
.
error
(
`
${
func_name
}
error:
${
e
}
`
);
return
Res3Utils
.
getErrorResult
(
e
);
}
};
/**
/**
* 查询手续费数据详情(分用户)
* 查询手续费数据详情(分用户)
...
@@ -101,6 +122,9 @@ export const withdrawDataDetails = async (req: any, commonParam: CommonParam) =>
...
@@ -101,6 +122,9 @@ export const withdrawDataDetails = async (req: any, commonParam: CommonParam) =>
let
func_name
=
"abkFeeStatistics.control.withdrawDataDetails"
;
let
func_name
=
"abkFeeStatistics.control.withdrawDataDetails"
;
try
{
try
{
setPageAndSize
(
commonParam
);
setPageAndSize
(
commonParam
);
if
(
!
commonParam
.
from_time
)
{
throw
ErrorCode
.
PARAM_MISS
;
}
let
user_id
=
Number
(
commonParam
.
user_id
||
0
);
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
);
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
);
...
...
src/functional/mvc/service/v2/abkFeeStatistics.service.ts
View file @
763a14f4
...
@@ -122,6 +122,34 @@ export async function getFeeData(from_time: any, to_time: any, page: any, size:
...
@@ -122,6 +122,34 @@ export async function getFeeData(from_time: any, to_time: any, page: any, size:
return
pageData
;
return
pageData
;
}
}
/**
* 昨日数据页签-手续费数据
* @param from_time
* @param to_time
* @param page
* @param size
* @param type 1 现货 2 U本位合约 3 币本位合约 4 全部(包含提现)
*/
export
async
function
getYesTabFeeData
(
from_time
:
any
,
to_time
:
any
,
page
:
any
,
size
:
any
,
type
:
number
)
{
//查询总体数据
let
total_obj
=
await
getTotalFeeDataOfPeriodByType
(
from_time
,
to_time
,
type
);
//查询全部时要查询提现手续费
if
(
type
==
4
)
{
let
{
withdrawDtFeeMap
,
withdraw_total_fee
,
withdraw_common_user_fee
,
withdraw_crm_user_fee
}
=
await
getTotalWithdrawFeeByDtGroup
(
from_time
,
to_time
);
//加上提现手续费
total_obj
.
total_fee
=
total_obj
.
total_fee
.
add
(
withdraw_total_fee
);
total_obj
.
common_user
.
fee
=
total_obj
.
common_user
.
fee
.
add
(
withdraw_common_user_fee
);
total_obj
.
crm_user
.
fee
=
total_obj
.
crm_user
.
fee
.
add
(
withdraw_crm_user_fee
);
}
//查询详细数据
let
pageData
=
await
getFeeDataDetails
(
from_time
,
to_time
,
page
,
size
,
type
,
3
,
0
);
pageData
[
"total_data"
]
=
total_obj
;
return
pageData
;
}
/**
/**
* 手续费数据详情
* 手续费数据详情
* @param from_time
* @param from_time
...
@@ -129,7 +157,7 @@ export async function getFeeData(from_time: any, to_time: any, page: any, size:
...
@@ -129,7 +157,7 @@ export async function getFeeData(from_time: any, to_time: any, page: any, size:
* @param page
* @param page
* @param size
* @param size
* @param type 1 现货 2 U本位合约 3 币本位合约 4 全部(不含提现,提现单独接口)
* @param type 1 现货 2 U本位合约 3 币本位合约 4 全部(不含提现,提现单独接口)
* @param user_type 用户类型:1:普通用户;2:代理用户(crm用户)
* @param user_type 用户类型:1:普通用户;2:代理用户(crm用户)
;3:全部用户;
* @param user_id
* @param user_id
*/
*/
export
async
function
getFeeDataDetails
(
from_time
:
any
,
to_time
:
any
,
page
:
any
,
size
:
any
,
type
:
number
,
user_type
:
number
,
user_id
:
number
)
{
export
async
function
getFeeDataDetails
(
from_time
:
any
,
to_time
:
any
,
page
:
any
,
size
:
any
,
type
:
number
,
user_type
:
number
,
user_id
:
number
)
{
...
@@ -170,8 +198,15 @@ export async function getFeeDataDetails(from_time: any, to_time: any, page: any,
...
@@ -170,8 +198,15 @@ export async function getFeeDataDetails(from_time: any, to_time: any, page: any,
cond_common_user_ids
.
push
(
item
);
cond_common_user_ids
.
push
(
item
);
}
}
}
}
let
cond_user_ids
:
any
=
[];
//全部用户
if
(
user_type
==
3
)
{
cond_user_ids
=
_
.
union
(
cond_common_user_ids
,
cond_crm_user_ids
);
}
else
{
cond_user_ids
=
user_type
==
1
?
cond_common_user_ids
:
cond_crm_user_ids
;
}
let
cond_user_ids
=
user_type
==
1
?
cond_common_user_ids
:
cond_crm_user_ids
;
if
(
!
cond_user_ids
.
length
)
{
if
(
!
cond_user_ids
.
length
)
{
return
{
return
{
...
...
src/functional/router/v2/index.ts
View file @
763a14f4
...
@@ -42,6 +42,7 @@ const postFunc = {
...
@@ -42,6 +42,7 @@ const postFunc = {
//收入分析
//收入分析
'abkFeeStatistics/home/gatherData'
:
feeStatisticsCtrl
.
gatherData
,
//首页数据概览
'abkFeeStatistics/home/gatherData'
:
feeStatisticsCtrl
.
gatherData
,
//首页数据概览
'abkFeeStatistics/getFeeData'
:
feeStatisticsCtrl
.
getFeeData
,
//平台、现货、合约 手续费查询
'abkFeeStatistics/getFeeData'
:
feeStatisticsCtrl
.
getFeeData
,
//平台、现货、合约 手续费查询
'abkFeeStatistics/getYesTabFeeData'
:
feeStatisticsCtrl
.
getYesTabFeeData
,
//昨日数据页签-平台、现货、合约 手续费查询
'abkFeeStatistics/getFeeDataDetails'
:
feeStatisticsCtrl
.
getFeeDataDetails
,
//平台、现货、合约 手续费查询详情
'abkFeeStatistics/getFeeDataDetails'
:
feeStatisticsCtrl
.
getFeeDataDetails
,
//平台、现货、合约 手续费查询详情
'abkFeeStatistics/withdrawData'
:
feeStatisticsCtrl
.
withdrawData
,
//提现手续费
'abkFeeStatistics/withdrawData'
:
feeStatisticsCtrl
.
withdrawData
,
//提现手续费
'abkFeeStatistics/withdrawDataDetails'
:
feeStatisticsCtrl
.
withdrawDataDetails
,
//提现手续费详情
'abkFeeStatistics/withdrawDataDetails'
:
feeStatisticsCtrl
.
withdrawDataDetails
,
//提现手续费详情
...
...
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