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
b3374626
Commit
b3374626
authored
Sep 23, 2024
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
逻辑调整
parent
50e8f611
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
i18n.service.ts
src/functional/mvc/service/i18n.service.ts
+15
-1
No files found.
src/functional/mvc/service/i18n.service.ts
View file @
b3374626
...
...
@@ -79,7 +79,7 @@ export const add = async (infoVO: I18nInfoVO, currentUserId: any, ip: any) => {
},
raw
:
true
});
if
(
dbInfo
){
if
(
dbInfo
)
{
throw
ErrorCode
.
DATA_EXIST
;
}
await
i18nInfo
.
prototype
.
create
(
infoVO
);
...
...
@@ -101,6 +101,20 @@ export const update = async (infoVO: I18nInfoVO, currentUserId: any, ip: any) =>
if
(
!
dbOneI18nInfo
)
{
throw
ErrorCode
.
DATA_NOT_EXIST
;
}
//查询是否有重复的
let
dbInfo
=
await
i18nInfo
.
prototype
.
findOne
({
where
:
{
platform
:
infoVO
.
platform
,
module
:
infoVO
.
module
,
code
:
infoVO
.
code
,
lang
:
infoVO
.
lang
,
id
:
{
[
ormDB
.
Op
.
ne
]:
infoVO
.
id
}
},
raw
:
true
});
if
(
dbInfo
)
{
throw
ErrorCode
.
DATA_EXIST
;
}
delete
infoVO
.
id
;
let
i18nInfoLogOne
=
await
buildOneI18nInfoLog
(
dbOneI18nInfo
,
infoVO
);
...
...
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