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
52621cd2
Commit
52621cd2
authored
Dec 21, 2020
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
来佣比对列表查询优化后报错
parent
a5d5af26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
yd-api/src/main/resources/mapper/lifecommission/LifeCommissionMapper.xml
+10
-1
No files found.
yd-api/src/main/resources/mapper/lifecommission/LifeCommissionMapper.xml
View file @
52621cd2
...
...
@@ -124,12 +124,21 @@
IFNULL(sum(o.order_price),0) totalOrderPrice,
IFNULL(sum(o.commission_amount),0) totalCommission
from (SELECT order_price, commission_amount, commission_check_status, commission_check_id, order_date,
insurer_id
insurer_id
,id
from ag_po_order t
where t.status in (3,4) and policy_no is not null
and (t.plan_id not in (424,453,464) or t.plan_id is null)
) o
left join ag_po_order_commission_check c on o.commission_check_id = c.id
left join (SELECT order_id, name, practitioner_type_id, f.customer_id
from (
select *
from (select order_id, customer_id from ag_acl_customer_fortune order by referral_amount desc) f
group by f.order_id
) f
left join ag_acl_practitioner practitioner on f.customer_id = practitioner.customer_id
left join ag_acl_practitioner_setting setting on setting.practitioner_id = practitioner.id
) f on f.order_id = o.id
where 1=1
<if
test=
"insurerId != null"
>
and o.insurer_id = #{insurerId}
...
...
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