From 10d13472ec5f773f81cc41821e06ea3f94138f9c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Tue, 27 Oct 2020 17:27:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E6=80=A5=E4=BF=AE=E5=A4=8D=E5=A4=96?= =?UTF-8?q?=E5=9B=A2=E9=80=89=E6=8B=A9=E6=B8=B8=E6=88=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteCompanyController.class.php | 12 ++++++++---- Application/Admin/Model/GameModel.class.php | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 15411b529..25e0b7c3f 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -68,8 +68,13 @@ class PromoteCompanyController extends ThinkController //换成id $g_name = $_REQUEST['game_name']; $g_id = M("Game","tab_")->where("relation_game_name = '{$g_name}'")->field("relation_game_id")->find()['relation_game_id']; - $reg_str = "([^0-9]|^){$g_id },"; - $map["game_ids"]=["EXP","REGEXP '{$reg_str}'"]; + // $reg_str = "([^0-9]|^){$g_id },"; + if (isset($map["_string"])) { + $map['_string'] = ' AND concat(",", game_ids, ",") like "%,' . $g_id . ',%"'; + }else{ + $map["_string"] = ' concat(",", game_ids, ",") like "%,' . $g_id . ',%"'; + } + // $map["game_ids"]=["EXP","REGEXP '{$reg_str}'"]; } if (isset($_REQUEST['is_sign_contact'])) { @@ -86,7 +91,7 @@ class PromoteCompanyController extends ThinkController if(isset($map["_string"])){ $map["_string"] .= " ADN id in ($c_id)"; }else{ - $map["_string"] = "id in ($c_id)"; + $map["_string"] = " id in ($c_id)"; } } @@ -107,7 +112,6 @@ class PromoteCompanyController extends ThinkController }else{ $companyres = $companyres->page($page,$row)->select(); } - $payWays = PresidentDepositService::$payWays; $payTypes = PresidentDepositService::$payTypes; $statusList = PresidentDepositService::$statusList; diff --git a/Application/Admin/Model/GameModel.class.php b/Application/Admin/Model/GameModel.class.php index f0853ebbb..a778d2b6e 100644 --- a/Application/Admin/Model/GameModel.class.php +++ b/Application/Admin/Model/GameModel.class.php @@ -463,6 +463,9 @@ class GameModel extends Model{ */ public function changeRelationGameidToGameid($ids,$type=false) { + if(empty($ids)){ + return ''; + } $rid = $this->field('id')->where("relation_game_id in ({$ids})")->select(); if($type){ return array_column($rid,'id');