Merge branch 'hotfix/down_company_change' of wmtx/platform into master

紧急修复外团选择游戏
master
廖金灵 4 years ago committed by Gogs
commit b7bf784385

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

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

Loading…
Cancel
Save