From fea720339bd62a7a0b93451a132d6a796dc61873 Mon Sep 17 00:00:00 2001 From: zyx Date: Tue, 4 Feb 2020 12:19:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=8D=95=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20/=20=E4=B8=8B=E6=B8=B8=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=8D=95=EF=BC=9A=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E4=B8=8D=E5=8C=BA=E5=88=86=E5=AE=89=E5=8D=93IOS?= =?UTF-8?q?=EF=BC=8C=E7=9B=B4=E6=8E=A5=E5=B1=95=E7=A4=BA=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AjaxController.class.php | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index 79ff49961..e3e1458aa 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -251,7 +251,7 @@ class AjaxController extends ThinkController{ } $data = M("withdraw","tab_") - ->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,tab_withdraw.settlement_type,mobile_phone,real_name,bank_card,account_openin,address,game_ratio,bank_account") + ->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,tab_withdraw.settlement_type,mobile_phone,real_name,tab_promote.bank_card,account_openin,tab_promote.address,game_ratio,bank_account") ->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id") ->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id") ->where($map) @@ -332,16 +332,42 @@ class AjaxController extends ThinkController{ } $data['address'] = $address; + $gameStr = []; + $game_ratio = []; + if (is_array($data['game_ratio'])) { foreach ($data['game_ratio'] as $key => &$value) { + foreach ($value as $k => &$v) { + + $v['game_name'] = substr(get_gamename($key),0,strpos(get_gamename($key), '(')); + + if (!in_array($v['game_name'],$gameStr)) { + array_push($gameStr,$v['game_name']); + } else { + $game_ratio[$v['game_name']] = $v; + unset($data['game_ratio'][$key]); + } + } + + } + +// dump($data['game_ratio']);die(); + foreach ($data['game_ratio'] as $key => &$value) { foreach ($value as $k => &$v) { - $v['game_name'] = get_gamename($key); + + if ($game_ratio[$v['game_name']]) { + + $v['sum_amount'] = number_format($v['sum_amount'] + $game_ratio[$v['game_name']]['sum_amount'],2,'.',''); + + } + } } + } $yfData = M('tool','tab_')->where(['name'=>'company_info'])->find(); @@ -371,7 +397,7 @@ class AjaxController extends ThinkController{ // $map['widthdraw_number'] = ['neq','']; $data = M("withdraw","tab_") - ->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,tab_promote_company.company_name,tab_withdraw.settlement_type,mobile_phone,real_name,bank_card,account_openin,address,game_ratio,bank_account") + ->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,tab_promote_company.company_name,tab_withdraw.settlement_type,mobile_phone,real_name,tab_promote.bank_card,account_openin,tab_promote.address,game_ratio,bank_account") ->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id") ->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id") ->join("left join tab_statement as statement on tab_withdraw.widthdraw_number = statement.ext_field")