紧急修复外团选择游戏

master
chenzhi 4 years ago
parent e18a61e8bb
commit 10d13472ec

@ -68,8 +68,13 @@ class PromoteCompanyController extends ThinkController
//换成id //换成id
$g_name = $_REQUEST['game_name']; $g_name = $_REQUEST['game_name'];
$g_id = M("Game","tab_")->where("relation_game_name = '{$g_name}'")->field("relation_game_id")->find()['relation_game_id']; $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 },"; // $reg_str = "([^0-9]|^){$g_id },";
$map["game_ids"]=["EXP","REGEXP '{$reg_str}'"]; 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'])) { if (isset($_REQUEST['is_sign_contact'])) {
@ -86,7 +91,7 @@ class PromoteCompanyController extends ThinkController
if(isset($map["_string"])){ if(isset($map["_string"])){
$map["_string"] .= " ADN id in ($c_id)"; $map["_string"] .= " ADN id in ($c_id)";
}else{ }else{
$map["_string"] = "id in ($c_id)"; $map["_string"] = " id in ($c_id)";
} }
} }
@ -107,7 +112,6 @@ class PromoteCompanyController extends ThinkController
}else{ }else{
$companyres = $companyres->page($page,$row)->select(); $companyres = $companyres->page($page,$row)->select();
} }
$payWays = PresidentDepositService::$payWays; $payWays = PresidentDepositService::$payWays;
$payTypes = PresidentDepositService::$payTypes; $payTypes = PresidentDepositService::$payTypes;
$statusList = PresidentDepositService::$statusList; $statusList = PresidentDepositService::$statusList;

@ -463,6 +463,9 @@ class GameModel extends Model{
*/ */
public function changeRelationGameidToGameid($ids,$type=false) public function changeRelationGameidToGameid($ids,$type=false)
{ {
if(empty($ids)){
return '';
}
$rid = $this->field('id')->where("relation_game_id in ({$ids})")->select(); $rid = $this->field('id')->where("relation_game_id in ({$ids})")->select();
if($type){ if($type){
return array_column($rid,'id'); return array_column($rid,'id');

Loading…
Cancel
Save