From 903c3abba0a7036a397eea4009a4463f39a734f8 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 28 Oct 2021 11:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E9=83=A8=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E5=95=86=E6=88=B7=E6=9F=A5=E7=9C=8B=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 4 ++-- .../FinancePromoteController.class.php | 22 ++++++++++--------- .../Controller/SpendController.class.php | 1 + 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index be718fc64..7b6de2193 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -3286,9 +3286,9 @@ function getCpCompanySelect($type = 1){ * @return mixed */ function getMerchantList($type = 1){ + if(A('Market','Event')->getConfig('isMarket')) return []; $data = M("payment_merchant","tab_")->field("id,name,ways")->select(); - return $data; } @@ -3299,9 +3299,9 @@ function getMerchantList($type = 1){ * @return mixed */ function getMerchantName($id = 1){ + if(A('Market','Event')->getConfig('isMarket')) return '--'; $data = M("payment_merchant","tab_")->field("name")->where(['id'=>$id])->find(); - return $data['name']?$data['name']:'无'; } diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 07f2b68e3..a9078a5d7 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -894,19 +894,21 @@ class FinancePromoteController extends AdminController $marketAdmins = getAdminUsernameList($marketAdminIds); $adminDepartments = getAdminDepartmentList($marketAdminIds); } - - $merchant_data = M("payment_merchant","tab_") - ->field("id,name") - ->where("1=1") - ->select(); - $handle_merchant = []; - - foreach ($merchant_data as $key => $value) { - $handle_merchant[$value['id']] = $value['name']; + $isMarketAdmin = A('Market','Event')->getConfig('isMarket'); + if(!$isMarketAdmin){ + $merchant_data = M("payment_merchant","tab_") + ->field("id,name") + ->where("1=1") + ->select(); + $handle_merchant = []; + + foreach ($merchant_data as $key => $value) { + $handle_merchant[$value['id']] = $value['name']; + } } foreach($data as $key => $value) { - $data[$key]['merchant_name'] = $handle_merchant[$value['merchant_id']]; + $data[$key]['merchant_name'] = $isMarketAdmin ? "--" : $handle_merchant[$value['merchant_id']]; $data[$key]['pay_way'] = getPayType($value['pay_way']); $data[$key]['game_name'] =clearGameNameType($data[$key]['game_name']); $data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']); diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index 25b7fd15a..48daf740b 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -149,6 +149,7 @@ class SpendController extends ThinkController $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find()); $data = D(self::model_name)->lists($_GET["p"], $map, $order); + // dd($data); if (!empty($data['data'])) { $adminIds = array_column($data['data'], 'market_admin_id'); $adminUsernameList = getAdminUsernameList($adminIds);