diff --git a/app/api/controller/Maintainentry.php b/app/api/controller/Maintainentry.php index dc1c890..aed5e48 100644 --- a/app/api/controller/Maintainentry.php +++ b/app/api/controller/Maintainentry.php @@ -7,7 +7,6 @@ use app\api\middleware\Auth; use think\Exception; use think\facade\Db; use think\exception\ValidateException; -use app\common\model\User; /** @@ -1212,7 +1211,7 @@ class Maintainentry extends BaseController $this->apiError('录入出错,请联系系统管理员'); } // 判断手机号是否已经注册 - $is_mobile = User::getByMobile($post['phone']); + $is_mobile = Db::table('fa_user')->where('mobile',$post['phone'])->find(); if ($is_mobile) { $this->apiError('手机号已被使用'); } @@ -1266,7 +1265,7 @@ class Maintainentry extends BaseController 'updatetime' => $time ]; //写入用户表 - $userid = User::strict(false)->insertGetId($params); + $userid = Db::table('fa_user')->strict(false)->insertGetId($params); // 写入商城关系表 $nk_user['n_user_id'] = $userid; @@ -1507,7 +1506,7 @@ class Maintainentry extends BaseController $this->apiError('录入出错,请联系系统管理员'); } // 判断手机号是否已经注册 - $is_mobile = User::getByMobile($post['phone']); + $is_mobile = Db::table('fa_user')->where('mobile',$post['phone'])->find(); if ($is_mobile) { $this->apiError('手机号已被使用'); } @@ -1561,7 +1560,7 @@ class Maintainentry extends BaseController 'updatetime' => $time ]; //写入用户表 - $userid = User::strict(false)->insertGetId($params); + $userid = Db::table('fa_user')->strict(false)->insertGetId($params); // 写入商城关系表 $nk_user['n_user_id'] = $userid; @@ -1784,7 +1783,7 @@ class Maintainentry extends BaseController // } // 判断手机号是否已经注册 - $is_mobile = User::getByMobile($phone); + $is_mobile = Db::table('fa_user')->where('mobile',$phone)->find(); if ($is_mobile) { $this->apiError('手机号已被使用'); }