Commit d20d84a5 authored by wanjilong's avatar wanjilong

add: 达人统计回退到不兼容多单退款

parent f4803cf1
...@@ -20,9 +20,19 @@ class PayOrderClearingItem extends MysqlBase ...@@ -20,9 +20,19 @@ class PayOrderClearingItem extends MysqlBase
return $ret; return $ret;
} }
/*
$sql = "select sum(poci.`pay_amount`) as 'pay_amount', notify_account_status from pay_order_clearing_item poci $sql = "select sum(poci.`pay_amount`) as 'pay_amount', notify_account_status from pay_order_clearing_item poci
join pay_order_item poi on poi.`order_item_id` = poci.`order_item_id` join pay_order_item poi on poi.`order_item_id` = poci.`order_item_id`
where poci.pay_sub_type = 105 and poci.account_id = ? and poi.refund_order_status = 0 group by notify_account_status "; where poci.pay_sub_type = 105 and poci.account_id = ? and poi.refund_order_status = 0 group by notify_account_status ";
*/
$sql = "select sum(poci.`pay_amount`) as 'pay_amount',
notify_account_status from pay_order_clearing_item poci
join pay_order_item poi on poi.`order_item_id` = poci.`order_item_id`
where
not exists (select 1 from refund_order ro where ro.`order_item_id` = poci.`order_item_id`) and
poci.pay_sub_type = 105 and poci.account_id = ?
and poi.refund_order_status = 0
group by notify_account_status ";
/* /*
type=1: 该团长历史累计分销佣金收入总和 type=1: 该团长历史累计分销佣金收入总和
......
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