diff --git a/app/data/controller/api/Login.php b/app/data/controller/api/Login.php index 2e404371f..17e362ba2 100644 --- a/app/data/controller/api/Login.php +++ b/app/data/controller/api/Login.php @@ -63,10 +63,7 @@ class Login extends Controller /** * 用户统一注册入口 - * @throws \think\Exception - * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException */ public function register() { diff --git a/app/data/controller/api/Notify.php b/app/data/controller/api/Notify.php index 35d17362e..c10dd03a2 100644 --- a/app/data/controller/api/Notify.php +++ b/app/data/controller/api/Notify.php @@ -20,7 +20,7 @@ class Notify extends Controller * @param string $param 支付参数 * @return string * @throws \WeChat\Exceptions\InvalidResponseException - * @throws \think\Exception + * @throws \think\admin\Exception * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException @@ -40,7 +40,7 @@ class Notify extends Controller * @param string $param 支付参数 * @return string * @throws \WeChat\Exceptions\InvalidResponseException - * @throws \think\Exception + * @throws \think\admin\Exception * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException @@ -60,7 +60,7 @@ class Notify extends Controller * @param string $param 支付参数 * @return string * @throws \WeChat\Exceptions\InvalidResponseException - * @throws \think\Exception + * @throws \think\admin\Exception * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException diff --git a/app/data/controller/api/Wechat.php b/app/data/controller/api/Wechat.php index 65ad7125b..e56caac96 100644 --- a/app/data/controller/api/Wechat.php +++ b/app/data/controller/api/Wechat.php @@ -51,7 +51,7 @@ class Wechat extends Controller * 获取 JSSDK 签名 * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException - * @throws \think\Exception + * @throws \think\admin\Exception * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException @@ -65,10 +65,7 @@ class Wechat extends Controller /** * 加载网页授权数据 * @return \think\Response - * @throws \think\Exception - * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException */ public function oauth(): Response { diff --git a/app/data/controller/api/auth/Balance.php b/app/data/controller/api/auth/Balance.php index 4a78060b0..ebd331eb8 100644 --- a/app/data/controller/api/auth/Balance.php +++ b/app/data/controller/api/auth/Balance.php @@ -60,8 +60,8 @@ class Balance extends Auth $user = $this->app->db->name('DataUser')->where($map)->find(); if (empty($user)) $this->error('目标用户不存在!'); // 检测余额否有足够 - [$total, $used] = UserService::instance()->balance($this->uuid); - if ($data['amount'] > $total - $used) $this->error('可转账余额不足!'); + [$total, $count] = UserService::instance()->balance($this->uuid); + if ($data['amount'] > $total - $count) $this->error('可转账余额不足!'); // 写入余额转账记录 if ($this->app->db->name($this->table)->insert($data) !== false) { UserService::instance()->balance($data['uid']);