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
6392c1fc
Commit
6392c1fc
authored
Jul 29, 2020
by
Water Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize yi practitioner rank query
parent
cf4edb4f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+17
-7
yd-api/src/main/java/com/yd/dal/entity/customer/practitioner/PractitionerBasicInfo.java
+9
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
+2
-1
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
6392c1fc
...
...
@@ -261,12 +261,21 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Map
<
Integer
,
PractitionerBasicInfo
>
practitionerBasicInfoMap
=
getPractitionerBasicInfo
(
mobileNo
);
if
(!
practitionerBasicInfoMap
.
isEmpty
()){
PractitionerBasicInfo
practitionerBasicInfo
=
practitionerBasicInfoMap
.
get
(
platform
);
if
(
practitionerBasicInfo
!=
null
){
Long
practitionerTypeId
=
null
;
if
(
platform
==
1
){
practitionerTypeId
=
practitionerBasicInfo
.
getPractitionerTypeId
();
}
else
{
PractitionerBasicInfo
practitionerBasicInfoYD
=
practitionerBasicInfoMap
.
get
(
1
);
if
(
practitionerBasicInfoYD
!=
null
){
practitionerTypeId
=
practitionerBasicInfoYD
.
getPractitionerTypeId
();
}
}
if
(
practitionerBasicInfo
!=
null
&&
practitionerTypeId
!=
null
){
String
practitionerId
=
practitionerBasicInfo
.
getPractitionerId
();
if
(!
Strings
.
isNullOrEmpty
(
practitionerId
)){
List
<
PractitionerRankInfo
>
rankInfoList
=
getPractitionerRankInfo
(
time
,
platform
);
List
<
PractitionerRankInfo
>
rankInfoList
=
getPractitionerRankInfo
(
time
,
platform
,
practitionerTypeId
);
//按照指定类型排序
getPractitionerRankResult
(
responseVO
,
rankInfoList
,
type
,
practitionerBasicInfoMap
,
time
,
platform
);
getPractitionerRankResult
(
responseVO
,
rankInfoList
,
type
,
practitionerBasicInfoMap
,
time
,
platform
,
practitionerTypeId
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
}
...
...
@@ -280,10 +289,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
responseVO
;
}
private
List
<
PractitionerRankInfo
>
getPractitionerRankInfo
(
Integer
time
,
Integer
platform
)
{
private
List
<
PractitionerRankInfo
>
getPractitionerRankInfo
(
Integer
time
,
Integer
platform
,
Long
practitionerTypeId
)
{
List
<
PractitionerRankInfo
>
rankInfoList
;
if
(
platform
==
1
){
Long
practitionerTypeId
=
28L
;
rankInfoList
=
aclPractitionerDALService
.
getPractitionerRankInfoForOnline
(
time
,
practitionerTypeId
);
//特殊人员处理
String
mobileSpecialStr
=
mdCodeDALService
.
findCodeByType
(
"special_practitioner_mobile"
);
...
...
@@ -313,7 +321,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
practitionerBasicInfoMap
;
}
private
void
getPractitionerRankResult
(
PractitionerRankResponseVO
responseVO
,
List
<
PractitionerRankInfo
>
rankInfoList
,
Integer
type
,
Map
<
Integer
,
PractitionerBasicInfo
>
practitionerBasicInfoMap
,
Integer
time
,
Integer
platform
)
{
private
void
getPractitionerRankResult
(
PractitionerRankResponseVO
responseVO
,
List
<
PractitionerRankInfo
>
rankInfoList
,
Integer
type
,
Map
<
Integer
,
PractitionerBasicInfo
>
practitionerBasicInfoMap
,
Integer
time
,
Integer
platform
,
Long
practitionerTypeId
)
{
PractitionerInfoForAchievement
practitionerInfo
=
new
PractitionerInfoForAchievement
(
0
D
,
0
D
,
0
);
List
<
AclCustomerFortuneStatistics
>
rankList
=
new
ArrayList
<>();
String
practitionerId
=
practitionerBasicInfoMap
.
get
(
platform
).
getPractitionerId
();
...
...
@@ -356,7 +364,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
}
disposalPractitionerInfo
(
practitionerInfo
,
practitionerBasicInfoMap
,
time
,
platform
);
responseVO
.
setPractitionerInfo
(
practitionerInfo
);
responseVO
.
setRank
(
rankList
);
if
(
practitionerTypeId
==
28
){
responseVO
.
setRank
(
rankList
);
}
}
private
void
disposalPractitionerInfo
(
PractitionerInfoForAchievement
practitionerInfo
,
Map
<
Integer
,
PractitionerBasicInfo
>
practitionerBasicInfoMap
,
Integer
time
,
Integer
platform
)
{
...
...
yd-api/src/main/java/com/yd/dal/entity/customer/practitioner/PractitionerBasicInfo.java
View file @
6392c1fc
...
...
@@ -9,6 +9,7 @@ public class PractitionerBasicInfo {
private
String
titleName
;
private
String
gender
;
private
String
mobileNo
;
private
Long
practitionerTypeId
;
public
Long
getCustomerId
()
{
return
customerId
;
...
...
@@ -73,4 +74,12 @@ public class PractitionerBasicInfo {
public
void
setMobileNo
(
String
mobileNo
)
{
this
.
mobileNo
=
mobileNo
;
}
public
Long
getPractitionerTypeId
()
{
return
practitionerTypeId
;
}
public
void
setPractitionerTypeId
(
Long
practitionerTypeId
)
{
this
.
practitionerTypeId
=
practitionerTypeId
;
}
}
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
View file @
6392c1fc
...
...
@@ -518,7 +518,8 @@
p.name as name,
o.drop_option_code as titleCode,
o.drop_option_name as titleName,
p.gender as gender
p.gender as gender,
s.practitioner_type_id as practitionerTypeId
from ag_acl_customer c inner join ag_acl_practitioner p on c.id = p.customer_id
left join ag_acl_insurer_branch b on p.insurer_branch_id = b.id
left join ag_acl_practitioner_setting s on p.id = s.practitioner_id
...
...
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