mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
调整admin下的类库代码,将主要逻辑调整到extend下
This commit is contained in:
51
extend/base/admin/service/TriggerServiceClass.php
Normal file
51
extend/base/admin/service/TriggerServiceClass.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace base\admin\service;
|
||||
|
||||
use think\facade\Cache;
|
||||
|
||||
class TriggerServiceClass
|
||||
{
|
||||
/**
|
||||
* 更新菜单缓存.
|
||||
* @param null $adminId
|
||||
* @return bool
|
||||
*/
|
||||
public static function updateMenu($adminId = null)
|
||||
{
|
||||
if (empty($adminId)) {
|
||||
Cache::tag('initAdmin')->clear();
|
||||
} else {
|
||||
Cache::delete('initAdmin_' . $adminId);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新节点缓存.
|
||||
* @param null $adminId
|
||||
* @return bool
|
||||
*/
|
||||
public static function updateNode($adminId = null)
|
||||
{
|
||||
if (empty($adminId)) {
|
||||
Cache::tag('authNode')->clear();
|
||||
} else {
|
||||
Cache::delete('allAuthNode_' . $adminId);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新系统设置缓存.
|
||||
* @return bool
|
||||
*/
|
||||
public static function updateSysconfig()
|
||||
{
|
||||
Cache::tag('sysconfig')->clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user