Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
d124ac74
Commit
d124ac74
authored
May 06, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化sql
parent
87108f78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
17 deletions
+15
-17
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+8
-6
yd-api/src/main/resources/mapper/meta/MdTagMapper.xml
+7
-11
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
d124ac74
...
...
@@ -522,12 +522,14 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
for
(
ObjectCollectionTagged
tagged:
taggeds
)
{
tagIds
.
add
(
Long
.
valueOf
(
tagged
.
getMdTagId
()));
}
List
<
MdTag
>
mdTags
=
mdTagDALService
.
findByTagIdIn
(
tagIds
);
for
(
MdTag
mdTag:
mdTags
)
{
OpportunityCustomerTag
tag
=
new
OpportunityCustomerTag
();
tag
.
setTagId
(
mdTag
.
getId
());
tag
.
setTagName
(
mdTag
.
getTagName
());
tags
.
add
(
tag
);
if
(!
tagIds
.
isEmpty
()){
List
<
MdTag
>
mdTags
=
mdTagDALService
.
findByTagIdIn
(
tagIds
);
for
(
MdTag
mdTag:
mdTags
)
{
OpportunityCustomerTag
tag
=
new
OpportunityCustomerTag
();
tag
.
setTagId
(
mdTag
.
getId
());
tag
.
setTagName
(
mdTag
.
getTagName
());
tags
.
add
(
tag
);
}
}
return
tags
;
}
...
...
yd-api/src/main/resources/mapper/meta/MdTagMapper.xml
View file @
d124ac74
...
...
@@ -124,17 +124,12 @@
<include
refid=
"Base_Column_List"
/>
from ag_md_tag
<where>
<choose>
<when
test=
"tagIds != null and tagIds.size() > 0"
>
id in
<foreach
item=
"item"
collection=
"tagIds"
separator=
","
open=
"("
close=
")"
index=
"index"
>
#{item}
</foreach>
</when>
<otherwise>
1 = 2
</otherwise>
</choose>
<if
test=
"tagIds != null and tagIds.size() > 0"
>
id in
<foreach
item=
"item"
collection=
"tagIds"
separator=
","
open=
"("
close=
")"
index=
"index"
>
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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