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
334cfa07
Commit
334cfa07
authored
May 14, 2020
by
Water Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize
parent
3f2a1280
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialDALServiceImpl.java
+22
-2
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialMapper.xml
+1
-5
No files found.
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerPotentialDALServiceImpl.java
View file @
334cfa07
...
@@ -7,7 +7,9 @@ import com.yd.dal.service.customer.AclPractitionerPotentialDALService;
...
@@ -7,7 +7,9 @@ import com.yd.dal.service.customer.AclPractitionerPotentialDALService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
(
"aclPractitionerPotentialDALService"
)
@Service
(
"aclPractitionerPotentialDALService"
)
public
class
AclPractitionerPotentialDALServiceImpl
implements
AclPractitionerPotentialDALService
{
public
class
AclPractitionerPotentialDALServiceImpl
implements
AclPractitionerPotentialDALService
{
...
@@ -25,7 +27,25 @@ public class AclPractitionerPotentialDALServiceImpl implements AclPractitionerPo
...
@@ -25,7 +27,25 @@ public class AclPractitionerPotentialDALServiceImpl implements AclPractitionerPo
@Override
@Override
public
List
<
PractitionerPotentialInfo
>
findByPractitionerIdAndLasted
(
Long
practitionerId
)
{
public
List
<
PractitionerPotentialInfo
>
findByPractitionerIdAndLasted
(
Long
practitionerId
)
{
return
aclPractitionerPotentialMapper
.
findByPractitionerIdAndLasted
(
practitionerId
)
;
List
<
PractitionerPotentialInfo
>
temp
=
aclPractitionerPotentialMapper
.
findByPractitionerIdAndLasted
(
practitionerId
);
Map
<
Long
,
PractitionerPotentialInfo
>
potentialInfoMap
=
new
HashMap
<>();
Long
potentialId
;
Long
trackId
,
trackMaxId
;
for
(
PractitionerPotentialInfo
item
:
temp
){
potentialId
=
item
.
getPotentialId
();
trackId
=
item
.
getTrackId
();
if
(
potentialInfoMap
.
containsKey
(
potentialId
)){
trackMaxId
=
potentialInfoMap
.
get
(
potentialId
).
getTrackId
();
if
(
trackMaxId
<
trackId
){
potentialInfoMap
.
put
(
potentialId
,
item
);
}
}
else
{
potentialInfoMap
.
put
(
potentialId
,
item
);
}
}
List
<
PractitionerPotentialInfo
>
result
=
new
ArrayList
<>(
potentialInfoMap
.
values
());
result
.
sort
((
o1
,
o2
)
->
o2
.
getPotentialId
().
compareTo
(
o1
.
getPotentialId
()));
return
result
;
}
}
@Override
@Override
...
...
yd-api/src/main/resources/mapper/customer/AclPractitionerPotentialMapper.xml
View file @
334cfa07
...
@@ -310,15 +310,12 @@
...
@@ -310,15 +310,12 @@
p.oss_path_resume ossPathResume,
p.oss_path_resume ossPathResume,
t.track_status_id trackStatusId,
t.track_status_id trackStatusId,
t.id trackId,
t.id trackId,
date_format(p.created_at,'%Y-%m-%d') createdAt,
date_format(p.created_at,'%Y-%m-%d') createdAt
MAX(t.created_at) LastedUpdateDate
FROM
FROM
ag_acl_practitioner_potential p
ag_acl_practitioner_potential p
INNER JOIN ag_acl_practitioner_potential_assigned_track t ON p.id = t.practitioner_potential_id
INNER JOIN ag_acl_practitioner_potential_assigned_track t ON p.id = t.practitioner_potential_id
WHERE
WHERE
t.practitioner_assigned_id = #{practitionerId,jdbcType=BIGINT}
t.practitioner_assigned_id = #{practitionerId,jdbcType=BIGINT}
GROUP BY
p.id
order by p.id desc;
order by p.id desc;
</select>
</select>
</mapper>
</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