| | |
| | | o.id as orderId, |
| | | sum(IFNULL(s.channel_pay_amount, 0) - IFNULL(s.share_amount, 0)) as platformIncome, |
| | | sum(IFNULL(s.share_amount, 0)) as partnerIncome, |
| | | CASE WHEN o.is_whitelist = 1 THEN IFNULL(o.whitelist_electric_refund_amount, 0) |
| | | CASE WHEN o.is_whitelist = 1 AND o.status = 5 THEN IFNULL(o.whitelist_electric_refund_amount, 0) |
| | | + IFNULL(o.whitelist_service_refund_amount, 0) ELSE 0 END as whitelistRefund |
| | | from `charging_pile_order`.t_charging_order o |
| | | left join `charging_pile_order`.t_charging_order_share_record s |
| | |
| | | select coalesce(sum(IFNULL(whitelist_electric_refund_amount, 0) |
| | | + IFNULL(whitelist_service_refund_amount, 0)), 0) |
| | | from `charging_pile_order`.t_charging_order |
| | | where del_flag = 0 and is_whitelist = 1 |
| | | where del_flag = 0 and is_whitelist = 1 and status = 5 |
| | | <if test="orderIds != null and orderIds.size()>0"> |
| | | and id in |
| | | <foreach collection="orderIds" item="item" index="index" separator="," open="(" close=")"> |