财务汇总统计bug修改汇总统计修改

master
zhengyongxing 4 years ago
parent 38da7f005d
commit c6570fee01

@ -531,12 +531,12 @@ class FinancialSummarySetController extends \Think\Controller
$officalData = M('deposit','tab_') $officalData = M('deposit','tab_')
->join("left join tab_test_white_list on tab_test_white_list.user_id=tab_deposit.user_id") ->join("left join tab_test_white_list on tab_test_white_list.user_id=tab_deposit.user_id")
->join("left join tab_payment_merchant merchant on merchant.id=tab_deposit.merchant_id") ->join("left join tab_payment_merchant merchant on merchant.id=tab_deposit.merchant_id")
->field("0 cash_amount,SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is not null THEN pay_amount ELSE 0 END) as test_amount, ->field("0 cash_amount,SUM(CASE WHEN merchant.id is not null and pay_source=0 and tab_test_white_list.user_id is not null THEN pay_amount ELSE 0 END) as test_amount,
0 as coin_amount,SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is null and pay_source=2 THEN pay_amount ELSE 0 END) as offcial_amount, 0 as coin_amount,SUM(CASE WHEN merchant.id is not null and tab_test_white_list.user_id is null and pay_source=0 THEN pay_amount ELSE 0 END) as offcial_amount,
0 spread_amount,0 supersign_amount,0 test_order_amount,merchant_id,name,channel,identifier,payed_time,0 as game_id,main_name,merchant_way,merchant.account") 0 spread_amount,0 supersign_amount,0 test_order_amount,merchant_id,name,channel,identifier,payed_time,0 as game_id,main_name,merchant_way,merchant.account,tab_deposit.pay_way")
->where(['pay_status'=>1,'tab_deposit.pay_way'=>['egt',1],'merchant.status'=>1,'merchant.type'=>1]) ->where(['pay_status'=>1,'tab_deposit.pay_way'=>['egt',1],'merchant.status'=>1,'merchant.type'=>1])
->where($map) ->where($map)
->group("merchant_id") ->group("merchant_id,merchant_way")
->select(false); ->select(false);
$map['pay_time'] = $map['payed_time']; $map['pay_time'] = $map['payed_time'];
unset($map['payed_time']); unset($map['payed_time']);

Loading…
Cancel
Save