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
35310c78
Commit
35310c78
authored
Sep 07, 2024
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口
parent
1d1206fa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
7 deletions
+53
-7
mUserOrderPendingAndHistory.control.ts
...tional/mvc/control/mUserOrderPendingAndHistory.control.ts
+20
-0
mUserOrderPendingAndHistory.service.ts
...tional/mvc/service/mUserOrderPendingAndHistory.service.ts
+31
-7
index.ts
src/functional/router/v1/index.ts
+1
-0
access-limit.ts
src/setting/access-limit.ts
+1
-0
No files found.
src/functional/mvc/control/mUserOrderPendingAndHistory.control.ts
View file @
35310c78
...
@@ -45,5 +45,25 @@ export const historyList = async (req: any, queryVo: QueryVo) => {
...
@@ -45,5 +45,25 @@ export const historyList = async (req: any, queryVo: QueryVo) => {
}
}
};
};
/**
* 现货成交记录列表
* @param req
* @param infoVO
*/
export
const
detailList
=
async
(
req
:
any
,
queryVo
:
QueryVo
)
=>
{
let
func_name
=
"pendingAndHistoryCtrl.detailList"
;
try
{
if
(
!
queryVo
.
user_id
)
{
throw
ErrorCode
.
PARAM_MISS
}
let
res
=
await
service
.
detailList
(
queryVo
);
return
Res3Utils
.
result
(
res
);
}
catch
(
e
)
{
logger
.
error
(
`
${
func_name
}
error:
${
e
}
`
);
return
Res3Utils
.
getErrorResult
(
e
);
}
};
src/functional/mvc/service/mUserOrderPendingAndHistory.service.ts
View file @
35310c78
...
@@ -2,18 +2,18 @@ import * as aclPositionService from "../service/aclPosition.service";
...
@@ -2,18 +2,18 @@ import * as aclPositionService from "../service/aclPosition.service";
import
{
AclAuthVO
,
AclAuthPageVO
,
AclRolePageVO
,
AclRoleVO
}
from
"../service/aclRoleAuth.service"
;
import
{
AclAuthVO
,
AclAuthPageVO
,
AclRolePageVO
,
AclRoleVO
}
from
"../service/aclRoleAuth.service"
;
import
{
getCurrentUserId
,
}
from
"../../../utils/aclUserUtils"
;
import
{
getCurrentUserId
,
}
from
"../../../utils/aclUserUtils"
;
import
{
ErrorCode
}
from
"../../../constant/errorCode"
;
import
{
ErrorCode
}
from
"../../../constant/errorCode"
;
import
{
getUserOrdersFromCore
}
from
"../../../utils/coreSystemUtils"
;
import
{
getUser
FillsFromCore
,
getUser
OrdersFromCore
}
from
"../../../utils/coreSystemUtils"
;
let
{
logger
,
Res3Utils
,
optionalUtils
:
Optional
,
apiAssertUtils
:
ApiAssert
}
=
require
(
'@madex/ex-js-public'
);
let
{
logger
,
Res3Utils
,
optionalUtils
:
Optional
,
apiAssertUtils
:
ApiAssert
}
=
require
(
'@madex/ex-js-public'
);
export
interface
QueryVo
{
export
interface
QueryVo
{
u
pdate_id
?:
string
u
ser_id
?:
number
is_next
?:
number
//1 下一页
before
?:
string
size
?:
number
after
?:
string
user_id
?:
number
limit
?:
number
}
}
export
const
pendingList
=
async
(
queryVo
:
QueryVo
)
=>
{
export
const
pendingList
=
async
(
queryVo
:
QueryVo
)
=>
{
...
@@ -30,9 +30,33 @@ export const historyList = async (queryVo: QueryVo) => {
...
@@ -30,9 +30,33 @@ export const historyList = async (queryVo: QueryVo) => {
user_id
:
queryVo
.
user_id
,
user_id
:
queryVo
.
user_id
,
status
:
"settled"
//历史委托
status
:
"settled"
//历史委托
}
}
if
(
queryVo
.
before
)
{
param
[
'before'
]
=
queryVo
.
before
}
if
(
queryVo
.
after
)
{
param
[
'after'
]
=
queryVo
.
after
}
if
(
queryVo
.
limit
)
{
param
[
'limit'
]
=
queryVo
.
limit
}
let
res
=
await
getUserOrdersFromCore
(
param
);
let
res
=
await
getUserOrdersFromCore
(
param
);
Array
.
isArray
(
res
);
return
res
;
};
export
const
detailList
=
async
(
queryVo
:
QueryVo
)
=>
{
let
param
=
{
user_id
:
queryVo
.
user_id
,
}
if
(
queryVo
.
before
)
{
param
[
'before'
]
=
queryVo
.
before
}
if
(
queryVo
.
after
)
{
param
[
'after'
]
=
queryVo
.
after
}
if
(
queryVo
.
limit
)
{
param
[
'limit'
]
=
queryVo
.
limit
}
let
res
=
await
getUserFillsFromCore
(
param
);
return
res
;
return
res
;
};
};
...
...
src/functional/router/v1/index.ts
View file @
35310c78
...
@@ -122,6 +122,7 @@ const postFunc = {
...
@@ -122,6 +122,7 @@ const postFunc = {
'mUser/manage/tradeAsset/detail'
:
mUserAssetsCtrl
.
tradeAssetsDetail
,
//Madex 用户管理 ->交易账户资产详情
'mUser/manage/tradeAsset/detail'
:
mUserAssetsCtrl
.
tradeAssetsDetail
,
//Madex 用户管理 ->交易账户资产详情
'mUser/manage/order/pending/list'
:
orderPendingAndHistoryCtrl
.
pendingList
,
//Madex 用户管理 ->当前委托
'mUser/manage/order/pending/list'
:
orderPendingAndHistoryCtrl
.
pendingList
,
//Madex 用户管理 ->当前委托
'mUser/manage/order/history/list'
:
orderPendingAndHistoryCtrl
.
historyList
,
//Madex 用户管理 ->历史委托
'mUser/manage/order/history/list'
:
orderPendingAndHistoryCtrl
.
historyList
,
//Madex 用户管理 ->历史委托
'mUser/manage/order/detail/list'
:
orderPendingAndHistoryCtrl
.
detailList
,
//Madex 用户管理 ->成交记录
//资源位管理
//资源位管理
'link/useful/list'
:
usefulLinkCtrl
.
list
,
//链接记录列表
'link/useful/list'
:
usefulLinkCtrl
.
list
,
//链接记录列表
...
...
src/setting/access-limit.ts
View file @
35310c78
...
@@ -91,6 +91,7 @@ let cmdWhiteList = {
...
@@ -91,6 +91,7 @@ let cmdWhiteList = {
'mUser/manage/tradeAsset/detail'
:
1
,
'mUser/manage/tradeAsset/detail'
:
1
,
'mUser/manage/order/pending/list'
:
1
,
'mUser/manage/order/pending/list'
:
1
,
'mUser/manage/order/history/list'
:
1
,
'mUser/manage/order/history/list'
:
1
,
'mUser/manage/order/detail/list'
:
1
,
//资源位管理
//资源位管理
'link/useful/list'
:
1
,
'link/useful/list'
:
1
,
'link/useful/add'
:
1
,
'link/useful/add'
:
1
,
...
...
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