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
c95cd950
Commit
c95cd950
authored
Dec 10, 2024
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
64503208
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
pairApply.service.ts
src/functional/mvc/service/pairApply.service.ts
+22
-1
No files found.
src/functional/mvc/service/pairApply.service.ts
View file @
c95cd950
...
...
@@ -269,7 +269,7 @@ export async function review(id: any, currentUser: any, ip: string | undefined)
//检查交易对中的币种是否存在于coin_type 中
await
checkPairInCoinType
(
pair
);
//检查交易对是否存在
await
checkPairExist
(
pair
,
type
);
await
checkPairExist
BeforeCreate
(
pair
,
type
);
let
insertInfo
=
{
symbol
:
pair
,
...
...
@@ -508,3 +508,24 @@ async function checkPairExist(pair: string, type: number) {
return
dbPair
;
}
async
function
checkPairExistBeforeCreate
(
pair
:
string
,
type
:
number
)
{
let
dbPair
:
any
;
//现货
if
(
type
==
1
)
{
dbPair
=
await
spotPairs
.
prototype
.
findOne
({
where
:
{
symbol
:
pair
},
raw
:
true
});
}
else
{
//合约
dbPair
=
await
contractPairs
.
prototype
.
findOne
({
where
:
{
symbol
:
pair
},
raw
:
true
});
}
if
(
dbPair
)
{
throw
ErrorCode
.
PAIR_EXIST
;
}
return
dbPair
;
}
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