Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
50470d2f
Commit
50470d2f
authored
Mar 10, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 禅道 016 bug修复
parent
93ab03db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
SceneController.java
...va/net/wanji/opt/controller/strategy/SceneController.java
+0
-3
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/strategy/SceneController.java
View file @
50470d2f
...
@@ -12,7 +12,6 @@ import net.wanji.opt.dto.strategy.AddOrUpdateSceneDTO;
...
@@ -12,7 +12,6 @@ import net.wanji.opt.dto.strategy.AddOrUpdateSceneDTO;
import
net.wanji.opt.dto.strategy.QuerySceneDTO
;
import
net.wanji.opt.dto.strategy.QuerySceneDTO
;
import
net.wanji.opt.service.strategy.SceneService
;
import
net.wanji.opt.service.strategy.SceneService
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -48,10 +47,8 @@ public class SceneController {
...
@@ -48,10 +47,8 @@ public class SceneController {
try
{
try
{
sceneService
.
addOrUpdateScene
(
addOrUpdateSceneDTO
);
sceneService
.
addOrUpdateScene
(
addOrUpdateSceneDTO
);
}
catch
(
DuplicateKeyException
e
)
{
}
catch
(
DuplicateKeyException
e
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
throw
new
DuplicateKeyException
(
"场景编号或场景名称不可重复"
);
throw
new
DuplicateKeyException
(
"场景编号或场景名称不可重复"
);
}
catch
(
UniqueException
e
)
{
}
catch
(
UniqueException
e
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
throw
new
UniqueException
(
"应用策略或优化方法不可重复"
);
throw
new
UniqueException
(
"应用策略或优化方法不可重复"
);
}
}
return
JsonViewObject
.
newInstance
().
success
();
return
JsonViewObject
.
newInstance
().
success
();
...
...
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