Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
a4b92b32
Commit
a4b92b32
authored
Apr 06, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
23d211da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
RouteController.java
...join/amos/patrol/business/controller/RouteController.java
+5
-2
IRouteDao.java
...eejoin/amos/patrol/business/dao/repository/IRouteDao.java
+4
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/RouteController.java
View file @
a4b92b32
...
@@ -162,8 +162,11 @@ public class RouteController extends AbstractBaseController {
...
@@ -162,8 +162,11 @@ public class RouteController extends AbstractBaseController {
if
(!
StringUtils
.
isEmpty
(
route
.
getName
())){
if
(!
StringUtils
.
isEmpty
(
route
.
getName
())){
List
<
Route
>
list
=
iRouteDao
.
getListByName
(
route
.
getName
());
List
<
Route
>
list
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
list
)
||
list
.
size
()>
0
){
list
=
route
.
getId
()>
0
?
iRouteDao
.
getListByNameUpdate
(
route
.
getId
(),
route
.
getName
()):
iRouteDao
.
getListByName
(
route
.
getName
());
if
(!
ObjectUtils
.
isEmpty
(
list
)
||
list
.
size
()>
0
){
throw
new
BadRequest
(
"该名称路线已存在"
);
throw
new
BadRequest
(
"该名称路线已存在"
);
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IRouteDao.java
View file @
a4b92b32
...
@@ -23,6 +23,10 @@ public interface IRouteDao extends BaseDao<Route, Long> {
...
@@ -23,6 +23,10 @@ public interface IRouteDao extends BaseDao<Route, Long> {
@Query
(
value
=
"select * from p_route where original_id in ?1 and is_delete =0"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from p_route where original_id in ?1 and is_delete =0"
,
nativeQuery
=
true
)
List
<
Route
>
listByOriginalIds
(
List
<
String
>
originalIds
);
List
<
Route
>
listByOriginalIds
(
List
<
String
>
originalIds
);
@Query
(
value
=
"select * from p_route where `name` = ?1 and is_delete =0"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from p_route where `name` = ?1 and is_delete =0"
,
nativeQuery
=
true
)
List
<
Route
>
getListByName
(
String
name
);
List
<
Route
>
getListByName
(
String
name
);
@Query
(
value
=
"select * from p_route where id !=?1 and `name` = ?2 and is_delete =0"
,
nativeQuery
=
true
)
List
<
Route
>
getListByNameUpdate
(
Long
id
,
String
name
);
}
}
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