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
1eff4f18
Commit
1eff4f18
authored
Dec 12, 2024
by
1486327116
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e83f7228
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
coinType.service.ts
src/functional/mvc/service/coinType.service.ts
+5
-3
coinTypeApply.service.ts
src/functional/mvc/service/coinTypeApply.service.ts
+24
-3
No files found.
src/functional/mvc/service/coinType.service.ts
View file @
1eff4f18
...
...
@@ -161,13 +161,15 @@ export const save = async (param: AddParam, currentUserId: any, ip: any) => {
},
raw
:
true
});
if
(
exist
)
{
param
.
is_main
=
0
;
param
.
asset_id
=
0
;
}
else
{
param
.
is_main
=
1
;
param
.
asset_id
=
exist
.
asset_id
;
param
.
main_status
=
exist
.
main_status
;
}
else
{
param
.
is_main
=
1
;
param
.
asset_id
=
0
;
param
.
main_status
=
0
;
}
await
coinType
.
prototype
.
create
(
param
);
//管理后台操作日志
...
...
src/functional/mvc/service/coinTypeApply.service.ts
View file @
1eff4f18
...
...
@@ -272,10 +272,32 @@ export async function review(id: any, currentUser: any, ip: string | undefined)
if
(
dbSymbol
)
{
throw
ErrorCode
.
COIN_DATA_EXIST
;
}
let
exist
=
await
coinType
.
prototype
.
findOne
({
where
:
{
is_main
:
1
,
general_name
:
dbApply
.
general_name
,
},
raw
:
true
});
let
is_main
=
0
;
let
asset_id
=
0
;
let
main_status
=
0
;
if
(
exist
)
{
is_main
=
0
;
// 同名币
asset_id
=
exist
.
asset_id
;
main_status
=
exist
.
main_status
;
}
else
{
is_main
=
1
;
asset_id
=
0
;
main_status
=
0
;
}
let
insertInfo
=
{
symbol
:
dbApply
.
symbol
,
is_active
:
1
,
is_main
:
1
,
asset_id
:
asset_id
,
is_main
:
is_main
,
main_status
:
main_status
,
name
:
dbApply
.
name
,
general_name
:
dbApply
.
general_name
,
chain_type
:
dbApply
.
chain_type
,
...
...
@@ -294,10 +316,9 @@ export async function review(id: any, currentUser: any, ip: string | undefined)
forbid_info
:
dbApply
.
forbid_info
,
enable_deposit
:
0
,
enable_withdraw
:
0
,
main_status
:
0
,
createdAt
:
new
Date
(),
updatedAt
:
new
Date
(),
}
}
;
await
coinType
.
prototype
.
create
(
insertInfo
);
reason
=
"币种创建完成"
;
await
updateApply
(
Number
(
id
),
APPLY_STATUS
.
CREATE_SYMBOL
,
currentUser
.
account
,
reason
,
dbApply
.
symbol
);
...
...
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