From bdc23b7d905174d41cea059f307d79557e836a10 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 28 Aug 2020 18:20:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 2 +- .../PromoteCompanyController.class.php | 8 +++++--- Application/Admin/View/Partner/add.html | 20 +++++++++---------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 0904b917b..22a2dbfa6 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2707,7 +2707,7 @@ function getMarketAdminsByPromoteIds($promoteIds) foreach ($topPromotes as $topPromote) { $topAdminMap[$topPromote['id']] = $topPromote['admin_id']; } - $admins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', array_column($topPromotes, 'admin_id')]])->select(); + $admins = M('member', 'sys_')->field(['uid id', 'nickname username', 'real_name'])->where(['id' => ['in', array_column($topPromotes, 'admin_id')]])->select(); $admins = index_by_column('id', $admins); foreach ($resultMap as &$row) { $adminId = $topAdminMap[$row['top_id']] ?? 0; diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 2ad732419..07517d3b3 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -125,8 +125,8 @@ class PromoteCompanyController extends ThinkController $v["settlement_type"] = $tmpr['settlement_type']; $v["deposit_pay_type"] = $deposit ? $payTypes[$deposit['pay_type']] : '--'; - $v["deposit_status"] = $deposit ? $statusList[$deposit['status']] : '--'; - $v["deposit_amount"] = $deposit ? $deposit['amount'] : '--'; + $v["deposit_status"] = !$deposit || $deposit['pay_type'] == PresidentDepositService::PAY_TYPE_NONE ? '--' : $statusList[$deposit['status']]; + $v["deposit_amount"] = $deposit ? $deposit['amount'] : 0; $v["collection"] = $tmpr['collection']; $v["invoice_type"] = $tmpr['invoice_type']; $v["invoice_content"] = $tmpr['invoice_content']; @@ -1398,13 +1398,15 @@ class PromoteCompanyController extends ThinkController ->select(); // dd($promoteres); $adminList = getMarketAdminsByPromoteIds(array_column($promoteres, 'id')); + if(empty($promoteres)){ //无会长 return ["list"=>["account" => "--","list" => ["turnover_ratio"=>[["name"=>"--","ratio"=>"--"]],"ratio"=>0,"relation_game_id"=>$k,"cp_ratio"=>[["name"=>"--","ratio"=>"--"]],"row"=>1,"original_package_name"=>"--","relation_game_name"=>"--","game_type_name"=>"--"]],"row"=>1]; } foreach ($promoteres as $k => &$v) { - $v['market_admin_username'] = isset($adminList[$v['id']]) && $adminList[$v['id']]['admin'] ? $adminList[$v['id']]['admin']['username'] : '无'; + $admin = isset($adminList[$v['id']]) && $adminList[$v['id']]['admin'] ? $adminList[$v['id']]['admin'] : null; + $v['market_admin_username'] = $admin ? ($admin['real_name'] ? $admin['real_name'] : $admin['username']) : '无'; if($ratio == false || empty($v['game_ids'])){ $v['row']=1; diff --git a/Application/Admin/View/Partner/add.html b/Application/Admin/View/Partner/add.html index 9144f85ea..867ac1120 100644 --- a/Application/Admin/View/Partner/add.html +++ b/Application/Admin/View/Partner/add.html @@ -151,7 +151,7 @@ @@ -162,8 +162,8 @@