瀏覽代碼

修改注释

邹景立 4 年之前
父節點
當前提交
f03268edee

+ 0 - 3
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()
     {

+ 3 - 3
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

+ 1 - 4
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
     {

+ 2 - 2
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']);