Commit 6f7dfd9b by sdif

修改统计条件

parent cf721d0c
......@@ -85,7 +85,7 @@
<select id="selectPlatformRevenue" resultType="com.pz.system.domain.vo.DataOrderVo">
SELECT IFNULL(ROUND(SUM(employees_divide.order_price - employees_divide.divide_price), 2),0) as dataSum FROM
employees_divide
left join total_order on total_order.order_sn = employees_divide.order_id WHERE total_order.`status` = 2 and
left join total_order on total_order.order_sn = employees_divide.id WHERE total_order.`status` = 2 and
refund_amount = 0
<if test="dataViewBo.condition == 2">
and employees_divide.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
......@@ -149,7 +149,7 @@
<select id="selectPlatformCom" resultType="com.pz.system.domain.vo.DataOrderVo">
SELECT IFNULL(ROUND(SUM(employees_divide.divide_price), 2),0) as dataSum FROM
employees_divide
left join total_order on total_order.order_sn = employees_divide.order_id WHERE total_order.`status` = 2 and
left join total_order on total_order.order_sn = employees_divide.id WHERE total_order.`status` = 2 and
refund_amount = 0 and company_id = #{dataViewBo.userId}
<if test="dataViewBo.condition == 2">
and employees_divide.create_time >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) -- 近7天
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment