Browse Source

修改文件注释

邹景立 3 years ago
parent
commit
8adc33f38d

+ 15 - 19
app/admin/controller/Auth.php

@@ -18,13 +18,9 @@ namespace app\admin\controller;
 
 use app\admin\model\SystemAuth;
 use app\admin\model\SystemNode;
-use ReflectionException;
 use think\admin\Controller;
 use think\admin\helper\QueryHelper;
 use think\admin\service\AdminService;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 
 /**
  * 系统权限管理
@@ -37,9 +33,9 @@ class Auth extends Controller
      * 系统权限管理
      * @auth true
      * @menu true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index()
     {
@@ -53,9 +49,9 @@ class Auth extends Controller
     /**
      * 添加系统权限
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function add()
     {
@@ -65,9 +61,9 @@ class Auth extends Controller
     /**
      * 编辑系统权限
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function edit()
     {
@@ -77,7 +73,7 @@ class Auth extends Controller
     /**
      * 修改权限状态
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function state()
     {
@@ -90,7 +86,7 @@ class Auth extends Controller
     /**
      * 删除系统权限
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function remove()
     {
@@ -100,10 +96,10 @@ class Auth extends Controller
     /**
      * 权限配置节点
      * @auth true
-     * @throws ReflectionException
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \ReflectionException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function apply()
     {

+ 11 - 14
app/admin/controller/Base.php

@@ -19,9 +19,6 @@ namespace app\admin\controller;
 use app\admin\model\SystemBase;
 use think\admin\Controller;
 use think\admin\helper\QueryHelper;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 
 /**
  * 数据字典管理
@@ -34,9 +31,9 @@ class Base extends Controller
      * 数据字典管理
      * @auth true
      * @menu true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index()
     {
@@ -53,9 +50,9 @@ class Base extends Controller
     /**
      * 添加数据字典
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function add()
     {
@@ -65,9 +62,9 @@ class Base extends Controller
     /**
      * 编辑数据字典
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function edit()
     {
@@ -99,7 +96,7 @@ class Base extends Controller
     /**
      * 修改数据状态
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function state()
     {
@@ -109,7 +106,7 @@ class Base extends Controller
     /**
      * 删除数据记录
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function remove()
     {

+ 6 - 9
app/admin/controller/Config.php

@@ -23,9 +23,6 @@ use think\admin\service\SystemService;
 use think\admin\storage\AliossStorage;
 use think\admin\storage\QiniuStorage;
 use think\admin\storage\TxcosStorage;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 
 /**
  * 系统参数配置
@@ -50,9 +47,9 @@ class Config extends Controller
     /**
      * 修改系统参数
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function system()
     {
@@ -79,9 +76,9 @@ class Config extends Controller
     /**
      * 修改文件存储
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function storage()
     {

+ 10 - 14
app/admin/controller/Index.php

@@ -17,13 +17,9 @@
 namespace app\admin\controller;
 
 use app\admin\model\SystemUser;
-use ReflectionException;
 use think\admin\Controller;
 use think\admin\service\AdminService;
 use think\admin\service\MenuService;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 
 /**
  * 后台界面入口
@@ -35,10 +31,10 @@ class Index extends Controller
 
     /**
      * 显示后台首页
-     * @throws ReflectionException
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \ReflectionException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index()
     {
@@ -62,9 +58,9 @@ class Index extends Controller
      * 修改用户资料
      * @login true
      * @param mixed $id 用户ID
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function info($id = 0)
     {
@@ -91,9 +87,9 @@ class Index extends Controller
      * 修改当前用户密码
      * @login true
      * @param mixed $id
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function pass($id = 0)
     {

+ 3 - 6
app/admin/controller/Login.php

@@ -22,9 +22,6 @@ use think\admin\extend\CodeExtend;
 use think\admin\service\AdminService;
 use think\admin\service\CaptchaService;
 use think\admin\service\SystemService;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 
 /**
  * 用户登录管理
@@ -36,9 +33,9 @@ class Login extends Controller
 
     /**
      * 后台登录入口
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index()
     {

+ 12 - 16
app/admin/controller/Menu.php

@@ -17,15 +17,11 @@
 namespace app\admin\controller;
 
 use app\admin\model\SystemMenu;
-use ReflectionException;
 use think\admin\Controller;
 use think\admin\extend\DataExtend;
 use think\admin\service\AdminService;
 use think\admin\service\MenuService;
 use think\admin\service\NodeService;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 
 /**
  * 系统菜单管理
@@ -38,9 +34,9 @@ class Menu extends Controller
      * 系统菜单管理
      * @auth true
      * @menu true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index()
     {
@@ -79,9 +75,9 @@ class Menu extends Controller
     /**
      * 添加系统菜单
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function add()
     {
@@ -92,9 +88,9 @@ class Menu extends Controller
     /**
      * 编辑系统菜单
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function edit()
     {
@@ -105,7 +101,7 @@ class Menu extends Controller
     /**
      * 表单数据处理
      * @param array $vo
-     * @throws ReflectionException
+     * @throws \ReflectionException
      */
     protected function _form_filter(array &$vo)
     {
@@ -138,7 +134,7 @@ class Menu extends Controller
     /**
      * 修改菜单状态
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function state()
     {
@@ -152,7 +148,7 @@ class Menu extends Controller
     /**
      * 删除系统菜单
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function remove()
     {

+ 5 - 9
app/admin/controller/Oplog.php

@@ -17,13 +17,9 @@
 namespace app\admin\controller;
 
 use app\admin\model\SystemOplog;
-use Exception;
 use Ip2Region;
 use think\admin\Controller;
 use think\admin\helper\QueryHelper;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 use think\exception\HttpResponseException;
 
 /**
@@ -37,9 +33,9 @@ class Oplog extends Controller
      * 系统日志管理
      * @auth true
      * @menu true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index()
     {
@@ -57,7 +53,7 @@ class Oplog extends Controller
      * 列表数据处理
      * @auth true
      * @param array $data
-     * @throws Exception
+     * @throws \Exception
      */
     protected function _index_page_filter(array &$data)
     {
@@ -88,7 +84,7 @@ class Oplog extends Controller
     /**
      * 删除系统日志
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function remove()
     {

+ 4 - 7
app/admin/controller/Queue.php

@@ -23,9 +23,6 @@ use think\admin\helper\QueryHelper;
 use think\admin\service\AdminService;
 use think\admin\service\ProcessService;
 use think\admin\service\QueueService;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 use think\exception\HttpResponseException;
 
 /**
@@ -39,9 +36,9 @@ class Queue extends Controller
      * 系统任务管理
      * @auth true
      * @menu true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index()
     {
@@ -101,7 +98,7 @@ class Queue extends Controller
     /**
      * 删除系统任务
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function remove()
     {

+ 17 - 20
app/admin/controller/User.php

@@ -22,9 +22,6 @@ use app\admin\model\SystemUser;
 use think\admin\Controller;
 use think\admin\helper\QueryHelper;
 use think\admin\service\AdminService;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 use think\model\Relation;
 
 /**
@@ -38,9 +35,9 @@ class User extends Controller
      * 系统用户管理
      * @auth true
      * @menu true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index()
     {
@@ -68,9 +65,9 @@ class User extends Controller
     /**
      * 添加系统用户
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function add()
     {
@@ -80,9 +77,9 @@ class User extends Controller
     /**
      * 编辑系统用户
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function edit()
     {
@@ -92,9 +89,9 @@ class User extends Controller
     /**
      * 修改用户密码
      * @auth true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function pass()
     {
@@ -122,9 +119,9 @@ class User extends Controller
     /**
      * 表单数据处理
      * @param array $data
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     protected function _form_filter(array &$data)
     {
@@ -159,7 +156,7 @@ class User extends Controller
     /**
      * 修改用户状态
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function state()
     {
@@ -173,7 +170,7 @@ class User extends Controller
     /**
      * 删除系统用户
      * @auth true
-     * @throws DbException
+     * @throws \think\db\exception\DbException
      */
     public function remove()
     {

+ 3 - 6
app/admin/controller/api/Queue.php

@@ -20,9 +20,6 @@ use Exception;
 use think\admin\Controller;
 use think\admin\service\AdminService;
 use think\admin\service\QueueService;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 use think\exception\HttpResponseException;
 
 /**
@@ -36,9 +33,9 @@ class Queue extends Controller
      * 任务进度查询
      * @login true
      * @throws \think\admin\Exception
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function progress()
     {

+ 1 - 1
app/admin/controller/api/Update.php

@@ -33,7 +33,7 @@ class Update extends Controller
      */
     protected function initialize()
     {
-        if (!SystemService::instance()->checkRunMode('dev')) {
+        if (!SystemService::instance()->checkRunMode()) {
             $this->error('只允许访问本地或官方代码!');
         }
     }

+ 12 - 15
app/admin/controller/api/Upload.php

@@ -23,9 +23,6 @@ use think\admin\storage\AliossStorage;
 use think\admin\storage\LocalStorage;
 use think\admin\storage\QiniuStorage;
 use think\admin\storage\TxcosStorage;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 use think\exception\HttpResponseException;
 use think\file\UploadedFile;
 use think\Response;
@@ -41,9 +38,9 @@ class Upload extends Controller
     /**
      * 文件上传脚本
      * @return Response
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function index(): Response
     {
@@ -61,9 +58,9 @@ class Upload extends Controller
      * 文件上传检查
      * @login true
      * @throws \think\admin\Exception
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function state()
     {
@@ -103,9 +100,9 @@ class Upload extends Controller
     /**
      * 文件上传入口
      * @login true
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function file()
     {
@@ -169,9 +166,9 @@ class Upload extends Controller
     /**
      * 获取文件上传方式
      * @return string
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     private function getType(): string
     {

+ 3 - 6
app/admin/model/SystemAuth.php

@@ -17,9 +17,6 @@
 namespace app\admin\model;
 
 use think\admin\Model;
-use think\db\exception\DataNotFoundException;
-use think\db\exception\DbException;
-use think\db\exception\ModelNotFoundException;
 
 /**
  * 用户权限模型
@@ -43,9 +40,9 @@ class SystemAuth extends Model
     /**
      * 获取权限数据
      * @return array
-     * @throws DataNotFoundException
-     * @throws DbException
-     * @throws ModelNotFoundException
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function items(): array
     {