$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`
$sql="select sum(poci.`pay_amount`) as 'pay_amount' from pay_order_clearing_item poci join pay_order_item poi on poi.`order_item_id` = poci.`order_item_id` where poci.pay_sub_type = 105 and poci.account_id = ?";
where poci.pay_sub_type = 105 and poci.account_id = ? and poi.refund_order_status = 0 group by notify_account_status ";
if($type==1){
$sql.=" and poi.`notify_account_status`=2";
}else{
$sql.=" and poi.`notify_account_status`= 0 and poi.refund_order_status = 0";
}
/*
/*
type=1: 该团长历史累计分销佣金收入总和
type=1: 该团长历史累计分销佣金收入总和
...
@@ -34,23 +34,21 @@ class PayOrderClearingItem extends MysqlBase
...
@@ -34,23 +34,21 @@ class PayOrderClearingItem extends MysqlBase