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
c60b827e
Commit
c60b827e
authored
Dec 17, 2024
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产对账-除了做市相关的
parent
e6c94470
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
168 additions
and
84 deletions
+168
-84
assetCheck.control.ts
src/functional/mvc/control/v2/assetCheck.control.ts
+27
-6
abkCommonService.ts
src/functional/mvc/service/v2/abkCommonService.ts
+2
-0
assetCheck.service.ts
src/functional/mvc/service/v2/assetCheck.service.ts
+138
-78
index.ts
src/functional/router/v2/index.ts
+1
-0
No files found.
src/functional/mvc/control/v2/assetCheck.control.ts
View file @
c60b827e
import
*
as
assetCheckService
from
"../../service/v2/assetCheck.service"
;
import
{
CommonParam
,
setPageAndSize
}
from
"../../service/v2/abkCommonService"
;
import
{
CommonParam
,
setPageAndSize
}
from
"../../service/v2/abkCommonService"
;
let
{
logger
,
Res3Utils
,
optionalUtils
:
Optional
,
apiAssertUtils
:
ApiAssert
}
=
require
(
'@madex/ex-js-public'
);
import
{
ErrorCode
}
from
"../../../../constant/errorCode"
;
...
...
@@ -31,10 +31,10 @@ export const assetDetails = async (req: any, commonParam: CommonParam) => {
let
func_name
=
"assetCheck.control.assetDetails"
;
try
{
setPageAndSize
(
commonParam
);
if
(
!
commonParam
.
user_id
){
if
(
!
commonParam
.
user_id
)
{
throw
ErrorCode
.
PARAM_MISS
;
}
let
res
=
await
assetCheckService
.
assetDetails
(
commonParam
.
user_id
);
let
res
=
await
assetCheckService
.
assetDetails
(
commonParam
.
page
,
commonParam
.
size
,
commonParam
.
user_id
);
return
Res3Utils
.
result
(
res
);
}
catch
(
e
)
{
...
...
@@ -52,7 +52,28 @@ export const siteAssets = async (req: any, commonParam: CommonParam) => {
let
func_name
=
"assetCheck.control.siteAssets"
;
try
{
setPageAndSize
(
commonParam
);
let
res
=
await
assetCheckService
.
siteAssets
(
commonParam
.
page
,
commonParam
.
size
);
let
res
=
await
assetCheckService
.
siteAssets
(
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
siteAssetsDetails
=
async
(
req
:
any
,
commonParam
:
CommonParam
)
=>
{
let
func_name
=
"assetCheck.control.siteAssetsDetails"
;
try
{
if
(
!
commonParam
.
asset_id
)
{
throw
ErrorCode
.
PARAM_MISS
;
}
let
res
=
await
assetCheckService
.
siteAssetsDetails
(
Number
(
commonParam
.
asset_id
));
return
Res3Utils
.
result
(
res
);
}
catch
(
e
)
{
...
...
@@ -71,7 +92,7 @@ export const depositList = async (req: any, commonParam: CommonParam) => {
let
func_name
=
"assetCheck.control.depositList"
;
try
{
setPageAndSize
(
commonParam
);
let
res
=
await
assetCheckService
.
depositList
(
commonParam
.
page
,
commonParam
.
size
,
commonParam
.
uid_or_addr
);
let
res
=
await
assetCheckService
.
depositList
(
commonParam
.
page
,
commonParam
.
size
,
commonParam
.
uid_or_addr
);
return
Res3Utils
.
result
(
res
);
}
catch
(
e
)
{
...
...
@@ -90,7 +111,7 @@ export const withdrawList = async (req: any, commonParam: CommonParam) => {
let
func_name
=
"assetCheck.control.withdrawList"
;
try
{
setPageAndSize
(
commonParam
);
let
res
=
await
assetCheckService
.
withdrawList
(
commonParam
.
page
,
commonParam
.
size
,
commonParam
.
uid_or_addr
);
let
res
=
await
assetCheckService
.
withdrawList
(
commonParam
.
page
,
commonParam
.
size
,
commonParam
.
uid_or_addr
);
return
Res3Utils
.
result
(
res
);
}
catch
(
e
)
{
...
...
src/functional/mvc/service/v2/abkCommonService.ts
View file @
c60b827e
...
...
@@ -18,6 +18,8 @@ export interface CommonParam {
address
?:
any
//查询条件 用户id 或 充提地址
user_type
?:
any
//查询条件 用户类型:1:普通用户;2:代理用户(crm用户)
asset_id
?:
any
}
export
function
setPageAndSize
(
commonParam
:
CommonParam
)
{
...
...
src/functional/mvc/service/v2/assetCheck.service.ts
View file @
c60b827e
This diff is collapsed.
Click to expand it.
src/functional/router/v2/index.ts
View file @
c60b827e
...
...
@@ -31,6 +31,7 @@ const postFunc = {
'assetCheck/userAddrList'
:
assetCheckCtrl
.
userAddrList
,
//用户地址
'assetCheck/assetDetails'
:
assetCheckCtrl
.
assetDetails
,
//资产明细
'assetCheck/siteAssets'
:
assetCheckCtrl
.
siteAssets
,
//站内资产
'assetCheck/siteAssetsDetails'
:
assetCheckCtrl
.
siteAssetsDetails
,
//站内资产-详情
'assetCheck/depositList'
:
assetCheckCtrl
.
depositList
,
//实时充值
'assetCheck/withdrawList'
:
assetCheckCtrl
.
withdrawList
,
//实时提现
//收入分析
...
...
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