From fbf69483672291000b02b9a065d9d6922c9b0d3b Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 18 Aug 2020 17:11:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A8=E5=B9=BF=E5=91=98?= =?UTF-8?q?=E6=95=B4=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementSetController.class.php | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index db37408fd..2a67d37c8 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -1113,10 +1113,22 @@ class CompanyStatementSetController extends Controller { $v['fine'] += $val['fine']; $v['reward'] += $val['reward']; $v['platform_amount'] += $val['platform_amount']; - $v['statement_info'] = array_merge($v['statement_info'],json_decode($val['statement_info'],true)); - - $last_names = array_column($v['statement_info'],'game_name'); - array_multisort($last_names,SORT_DESC,SORT_STRING,$v['statement_info']); + $t_statement_info = json_decode($val['statement_info'],true); + $statement_info = []; + foreach($t_statement_info as $p=>$info){ + $statement_info[$info['account']] = $info['game_list']; + } + foreach($v['statement_info'] as $p=>&$info){ + if(isset($statement_info[$info['account']])){ + $info['game_list'] = array_merge($statement_info[$info['account']],$info['game_list']); + unset($statement_info[$info['account']]); + } + } + if(!empty($statement_info)){ + foreach($statement_info as $p=>$info){ + $v['statement_info'][] = ["account"=>$p,"game_list"=>$info]; + } + } } }