|
@@ -22,6 +22,10 @@ class Platform extends Base
|
|
|
return error_show(1003,"参数platform_name不能为空");
|
|
|
|
|
|
}
|
|
|
+ $is_exit= Db::name("platform")->where(["platform_name"=>$platform_name])->find();
|
|
|
+ if($is_exit){
|
|
|
+ return error_show(1003,"平台名称已存在");
|
|
|
+ }
|
|
|
$platform_type = isset($this->post['platform_type']) && $this->post['platform_type'] !=="" ? intval($this->post['platform_type']):"";
|
|
|
if($platform_type===""){
|
|
|
return error_show(1002,"参数platform_type不能为空");
|
|
@@ -118,6 +122,10 @@ class Platform extends Base
|
|
|
if ($token == '') {
|
|
|
return error_show(1005, "参数token不能为空");
|
|
|
}
|
|
|
+ $is_exit= Db::name("platform")->where([["platform_name","=",$platform_name],["id","<>",$id]])->find();
|
|
|
+ if($is_exit){
|
|
|
+ return error_show(1003,"平台名称已存在");
|
|
|
+ }
|
|
|
// $user = GetUserInfo($token);
|
|
|
// if (empty($user) || $user['code'] != 0) {
|
|
|
// return error_show(102, "创建人数据不存在");
|