修改 NodeAnnotation 命名标准
This commit is contained in:
@@ -7,7 +7,7 @@ use app\admin\service\TriggerService;
|
||||
use app\common\constants\AdminConstant;
|
||||
use app\common\controller\AdminController;
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use app\admin\service\annotation\NodeAnotation;
|
||||
use app\admin\service\annotation\NodeAnnotation;
|
||||
use think\App;
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ class Admin extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="列表")
|
||||
* @NodeAnnotation(title="列表")
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class Admin extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="添加")
|
||||
* @NodeAnnotation(title="添加")
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
@@ -86,7 +86,7 @@ class Admin extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="编辑")
|
||||
* @NodeAnnotation(title="编辑")
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ class Admin extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="编辑")
|
||||
* @NodeAnnotation(title="编辑")
|
||||
*/
|
||||
public function password($id)
|
||||
{
|
||||
@@ -146,7 +146,7 @@ class Admin extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="删除")
|
||||
* @NodeAnnotation(title="删除")
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
@@ -168,7 +168,7 @@ class Admin extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="属性修改")
|
||||
* @NodeAnnotation(title="属性修改")
|
||||
*/
|
||||
public function modify()
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ use app\admin\model\SystemAuthNode;
|
||||
use app\admin\service\TriggerService;
|
||||
use app\common\controller\AdminController;
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use app\admin\service\annotation\NodeAnotation;
|
||||
use app\admin\service\annotation\NodeAnnotation;
|
||||
use think\App;
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ class Auth extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="授权")
|
||||
* @NodeAnnotation(title="授权")
|
||||
*/
|
||||
public function authorize($id)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ class Auth extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="授权保存")
|
||||
* @NodeAnnotation(title="授权保存")
|
||||
*/
|
||||
public function saveAuthorize()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ use app\admin\model\SystemConfig;
|
||||
use app\admin\service\TriggerService;
|
||||
use app\common\controller\AdminController;
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use app\admin\service\annotation\NodeAnotation;
|
||||
use app\admin\service\annotation\NodeAnnotation;
|
||||
use think\App;
|
||||
|
||||
/**
|
||||
@@ -24,7 +24,7 @@ class Config extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="列表")
|
||||
* @NodeAnnotation(title="列表")
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class Config extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="保存")
|
||||
* @NodeAnnotation(title="保存")
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace app\admin\controller\system;
|
||||
use app\admin\model\SystemLog;
|
||||
use app\common\controller\AdminController;
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use app\admin\service\annotation\NodeAnotation;
|
||||
use app\admin\service\annotation\NodeAnnotation;
|
||||
use think\App;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\PDOException;
|
||||
@@ -25,7 +25,7 @@ class Log extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="列表")
|
||||
* @NodeAnnotation(title="列表")
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ use app\admin\service\TriggerService;
|
||||
use app\admin\traits\Curd;
|
||||
use app\common\constants\MenuConstant;
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use app\admin\service\annotation\NodeAnotation;
|
||||
use app\admin\service\annotation\NodeAnnotation;
|
||||
use app\common\controller\AdminController;
|
||||
use think\App;
|
||||
|
||||
@@ -34,7 +34,7 @@ class Menu extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="列表")
|
||||
* @NodeAnnotation(title="列表")
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
@@ -56,7 +56,7 @@ class Menu extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="添加")
|
||||
* @NodeAnnotation(title="添加")
|
||||
*/
|
||||
public function add($id = null)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ class Menu extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="编辑")
|
||||
* @NodeAnnotation(title="编辑")
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
@@ -128,7 +128,7 @@ class Menu extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="删除")
|
||||
* @NodeAnnotation(title="删除")
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ class Menu extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="属性修改")
|
||||
* @NodeAnnotation(title="属性修改")
|
||||
*/
|
||||
public function modify()
|
||||
{
|
||||
@@ -188,7 +188,7 @@ class Menu extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="添加菜单提示")
|
||||
* @NodeAnnotation(title="添加菜单提示")
|
||||
*/
|
||||
public function getMenuTips()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ use app\admin\model\SystemNode;
|
||||
use app\admin\service\TriggerService;
|
||||
use app\common\controller\AdminController;
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use app\admin\service\annotation\NodeAnotation;
|
||||
use app\admin\service\annotation\NodeAnnotation;
|
||||
use app\admin\service\NodeService;
|
||||
use think\App;
|
||||
|
||||
@@ -27,7 +27,7 @@ class Node extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="列表")
|
||||
* @NodeAnnotation(title="列表")
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
@@ -51,13 +51,13 @@ class Node extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="系统节点更新")
|
||||
* @NodeAnnotation(title="系统节点更新")
|
||||
*/
|
||||
public function refreshNode($force = 0)
|
||||
public function refreshNode($force = 0): void
|
||||
{
|
||||
|
||||
$this->checkPostRequest();
|
||||
$nodeList = (new NodeService())->getNodelist();
|
||||
$nodeList = (new NodeService())->getNodeList();
|
||||
empty($nodeList) && $this->error('暂无需要更新的系统节点');
|
||||
$model = new SystemNode();
|
||||
|
||||
@@ -67,10 +67,12 @@ class Node extends AdminController
|
||||
$formatNodeList = array_format_key($nodeList, 'node');
|
||||
foreach ($updateNodeList as $vo) {
|
||||
isset($formatNodeList[$vo['node']])
|
||||
&& $model->where('id', $vo['id'])->update([
|
||||
'title' => $formatNodeList[$vo['node']]['title'],
|
||||
'is_auth' => $formatNodeList[$vo['node']]['is_auth'],
|
||||
]);
|
||||
&& $model->where('id', $vo['id'])->update(
|
||||
[
|
||||
'title' => $formatNodeList[$vo['node']]['title'],
|
||||
'is_auth' => $formatNodeList[$vo['node']]['is_auth'],
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
$existNodeList = $model->field('node,title,type,is_auth')->select();
|
||||
@@ -91,12 +93,12 @@ class Node extends AdminController
|
||||
}
|
||||
|
||||
/**
|
||||
* @NodeAnotation(title="清除失效节点")
|
||||
* @NodeAnnotation(title="清除失效节点")
|
||||
*/
|
||||
public function clearNode()
|
||||
public function clearNode(): void
|
||||
{
|
||||
$this->checkPostRequest();
|
||||
$nodeList = (new NodeService())->getNodelist();
|
||||
$nodeList = (new NodeService())->getNodeList();
|
||||
$model = new SystemNode();
|
||||
try {
|
||||
$existNodeList = $model->field('id,node,title,type,is_auth')->select()->toArray();
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace app\admin\controller\system;
|
||||
use app\admin\model\SystemQuick;
|
||||
use app\common\controller\AdminController;
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use app\admin\service\annotation\NodeAnotation;
|
||||
use app\admin\service\annotation\NodeAnnotation;
|
||||
use think\App;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace app\admin\controller\system;
|
||||
use app\admin\model\SystemUploadfile;
|
||||
use app\common\controller\AdminController;
|
||||
use app\admin\service\annotation\ControllerAnnotation;
|
||||
use app\admin\service\annotation\NodeAnotation;
|
||||
use app\admin\service\annotation\NodeAnnotation;
|
||||
use think\App;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user