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
64c796d4
Commit
64c796d4
authored
Jun 29, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-查询分值bug
parent
0e59d6cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
+4
-3
No files found.
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
View file @
64c796d4
...
@@ -740,6 +740,7 @@
...
@@ -740,6 +740,7 @@
<if
test=
"practitionerId != null"
>
<if
test=
"practitionerId != null"
>
and a.assigned_practitioner_id = #{practitionerId}
and a.assigned_practitioner_id = #{practitionerId}
</if>
</if>
order by a.id desc
</select>
</select>
<select
id=
"findByIds"
resultType=
"com.yd.dal.entity.customer.AclPractitioner"
>
<select
id=
"findByIds"
resultType=
"com.yd.dal.entity.customer.AclPractitioner"
>
select
select
...
@@ -771,9 +772,9 @@
...
@@ -771,9 +772,9 @@
select
select
p.id practitionerId,
p.id practitionerId,
p.name name ,
p.name name ,
sum(case when to_days(t.track_time)=to_days(now()) then t.track_score end) scoreDay,
sum(case when to_days(t.track_time)=to_days(now()) then t.track_score
else 0
end) scoreDay,
sum(case when YEARWEEK(date_format(t.track_time,'%Y-%m-%d')) = YEARWEEK(now()) then t.track_score end) scoreWeek,
sum(case when YEARWEEK(date_format(t.track_time,'%Y-%m-%d')) = YEARWEEK(now()) then t.track_score
else 0
end) scoreWeek,
sum(case when date_format(t.track_time,'%Y-%m')=date_format(now(),'%Y-%m') then t.track_score end) scoreMonth,
sum(case when date_format(t.track_time,'%Y-%m')=date_format(now(),'%Y-%m') then t.track_score
else 0
end) scoreMonth,
count(DISTINCT case when YEARWEEK(date_format(a.created_at,'%Y-%m-%d')) = YEARWEEK(now()) then a.id end) addOpportunityNum
count(DISTINCT case when YEARWEEK(date_format(a.created_at,'%Y-%m-%d')) = YEARWEEK(now()) then a.id end) addOpportunityNum
from ag_acl_practitioner p
from ag_acl_practitioner p
left join ag_mkt_leads_assigned_track t on p.id = t.practitioner_id
left join ag_mkt_leads_assigned_track t on p.id = t.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