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