Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
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
zhaowei
dlink
Commits
d8db52d0
Commit
d8db52d0
authored
Jan 04, 2022
by
coderTomato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CatalogueMapper.xml去掉多余的sql
parent
5db8eb72
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
CatalogueServiceImpl.java
...ain/java/com/dlink/service/impl/CatalogueServiceImpl.java
+2
-4
CatalogueMapper.xml
dlink-admin/src/main/resources/mapper/CatalogueMapper.xml
+0
-6
No files found.
dlink-admin/src/main/java/com/dlink/service/impl/CatalogueServiceImpl.java
View file @
d8db52d0
package
com
.
dlink
.
service
.
impl
;
import
com.dlink.assertion.Assert
;
import
com.dlink.assertion.Asserts
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dlink.db.service.impl.SuperServiceImpl
;
import
com.dlink.dto.CatalogueTaskDTO
;
import
com.dlink.mapper.CatalogueMapper
;
...
...
@@ -10,7 +9,6 @@ import com.dlink.model.Task;
import
com.dlink.service.CatalogueService
;
import
com.dlink.service.StatementService
;
import
com.dlink.service.TaskService
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -41,7 +39,7 @@ public class CatalogueServiceImpl extends SuperServiceImpl<CatalogueMapper, Cata
@Override
public
Catalogue
findByParentIdAndName
(
Integer
parent_id
,
String
name
)
{
return
catalogueMapper
.
findByParentIdAndName
(
parent_id
,
name
);
return
catalogueMapper
.
selectOne
(
Wrappers
.<
Catalogue
>
query
().
eq
(
"parent_id"
,
parent_id
).
eq
(
"name"
,
name
)
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
dlink-admin/src/main/resources/mapper/CatalogueMapper.xml
View file @
d8db52d0
...
...
@@ -20,12 +20,6 @@
id, name, task_id, type,parent_id,is_leaf, enabled, create_time, update_time
</sql>
<select
id=
"findByParentIdAndName"
resultType=
"com.dlink.model.Catalogue"
>
select a.*
from dlink_catalogue a
where parent_id=#{parent_id} and name=#{name}
</select>
<select
id=
"selectForProTable"
resultType=
"com.dlink.model.Catalogue"
>
select
a.*
...
...
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