Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sap-service
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
曲欣亮
sap-service
Commits
239b0a0f
Commit
239b0a0f
authored
Jul 23, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
1f66f21e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
CommonService.java
src/main/java/com/egolm/sso/services/CommonService.java
+8
-3
No files found.
src/main/java/com/egolm/sso/services/CommonService.java
View file @
239b0a0f
...
@@ -4,6 +4,7 @@ import java.text.MessageFormat;
...
@@ -4,6 +4,7 @@ import java.text.MessageFormat;
import
java.util.Map
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.dao.EmptyResultDataAccessException
;
import
org.springframework.dao.EmptyResultDataAccessException
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -43,9 +44,13 @@ public class CommonService {
...
@@ -43,9 +44,13 @@ public class CommonService {
}
}
}
}
}
catch
(
EmptyResultDataAccessException
e
)
{
}
catch
(
EmptyResultDataAccessException
e
)
{
try
{
String
sql
=
"insert into x_sequence (name, max, min, step, value) values (?, ?, ?, ?, ?)"
;
String
sql
=
"insert into x_sequence (name, max, min, step, value) values (?, ?, ?, ?, ?)"
;
jdbcTemplate
.
update
(
sql
,
sName
,
Long
.
MAX_VALUE
,
1L
,
1L
,
1L
);
jdbcTemplate
.
update
(
sql
,
sName
,
Long
.
MAX_VALUE
,
1L
,
1L
,
1L
);
return
this
.
getNextval
(
sName
);
return
this
.
getNextval
(
sName
);
}
catch
(
DuplicateKeyException
ex
)
{
return
this
.
getNextval
(
sName
);
}
}
}
}
}
...
...
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