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);