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
153c8f12
Commit
153c8f12
authored
Feb 28, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 策略管理-优化ID判空逻辑
parent
f76562ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
4 deletions
+3
-4
StrategyController.java
...net/wanji/opt/controller/strategy/StrategyController.java
+0
-1
IdeaServiceImpl.java
.../net/wanji/opt/service/strategy/impl/IdeaServiceImpl.java
+1
-1
SceneServiceImpl.java
...net/wanji/opt/service/strategy/impl/SceneServiceImpl.java
+1
-1
StrategyServiceImpl.java
.../wanji/opt/service/strategy/impl/StrategyServiceImpl.java
+1
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/strategy/StrategyController.java
View file @
153c8f12
...
...
@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.ws.rs.core.MediaType
;
import
java.util.List
;
/**
* 策略管理-策略库
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/strategy/impl/IdeaServiceImpl.java
View file @
153c8f12
...
...
@@ -33,7 +33,7 @@ public class IdeaServiceImpl implements IdeaService {
@Transactional
public
void
addOrUpdateIdea
(
AddOrUpdateIdeaDTO
addOrUpdateIdeaDTO
)
{
Integer
id
=
addOrUpdateIdeaDTO
.
getId
();
if
(
id
==
0
||
ObjectUtil
.
isEmpty
(
id
)
)
{
if
(
ObjectUtil
.
isEmpty
(
id
)
||
id
==
0
)
{
// 不传ID为新增
IdeaPO
ideaPO
=
new
IdeaPO
();
ideaPO
.
setIdeaCode
(
addOrUpdateIdeaDTO
.
getIdeaCode
());
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/strategy/impl/SceneServiceImpl.java
View file @
153c8f12
...
...
@@ -49,7 +49,7 @@ public class SceneServiceImpl implements SceneService {
@Transactional
public
void
addOrUpdateScene
(
AddOrUpdateSceneDTO
addOrUpdateSceneDTO
)
{
Integer
id
=
addOrUpdateSceneDTO
.
getId
();
if
(
id
==
0
||
ObjectUtil
.
isEmpty
(
id
)
)
{
if
(
ObjectUtil
.
isEmpty
(
id
)
||
id
==
0
)
{
// 不传ID为新增
// 插入场景表获取场景ID
ScenePO
scenePO
=
new
ScenePO
();
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/strategy/impl/StrategyServiceImpl.java
View file @
153c8f12
...
...
@@ -36,7 +36,7 @@ public class StrategyServiceImpl implements StrategyService {
@Transactional
public
void
addOrUpdateStrategy
(
AddOrUpdateStrategyDTO
addOrUpdateStrategyDTO
)
{
Integer
id
=
addOrUpdateStrategyDTO
.
getId
();
if
(
id
==
0
||
ObjectUtil
.
isEmpty
(
id
)
)
{
if
(
ObjectUtil
.
isEmpty
(
id
)
||
id
==
0
)
{
// 不传ID为新增
StrategyPO
strategyPO
=
new
StrategyPO
();
strategyPO
.
setStrategyCode
(
addOrUpdateStrategyDTO
.
getStrategyCode
());
...
...
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