diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index c76087014..1b51e7fd5 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -552,8 +552,13 @@ function getGameByName($game_name=null, $sdk_version=null) if ($sdk_version) { $map['sdk_version'] = $sdk_version; } - $result = D("Game")->where($map)->select(); - return $result; + $result = D("Game")->field('id')->where($map)->select(); + if(empty($result)) { + return [['id' => -1]]; + }else + { + return $result; + } } function getTopPromote($promote_id)