1.优化工作台页面/dashboard/console
2.移除岗位管理相关代码和数据库
This commit is contained in:
@@ -27,7 +27,6 @@ class UserInfoCache
|
||||
'expire' => 60 * 60 * 4,
|
||||
'dept' => 'saiadmin:user_cache:dept_',
|
||||
'role' => 'saiadmin:user_cache:role_',
|
||||
'post' => 'saiadmin:user_cache:post_',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -73,11 +72,6 @@ class UserInfoCache
|
||||
$tags[] = $cache['role'] . $role['id'];
|
||||
}
|
||||
}
|
||||
if (!empty($data['postList'])) {
|
||||
foreach ($data['postList'] as $post) {
|
||||
$tags[] = $cache['post'] . $post['id'];
|
||||
}
|
||||
}
|
||||
Cache::tag($tags)->set($cache['prefix'] . $uid, $data, $cache['expire']);
|
||||
return $data;
|
||||
}
|
||||
@@ -125,21 +119,4 @@ class UserInfoCache
|
||||
return Cache::tag($tags)->clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理岗位下所有用户缓存
|
||||
*/
|
||||
public static function clearUserInfoByPostId($post_id): bool
|
||||
{
|
||||
$cache = static::cacheConfig();
|
||||
if (is_array($post_id)) {
|
||||
$tags = [];
|
||||
foreach ($post_id as $id) {
|
||||
$tags[] = $cache['post'] . $id;
|
||||
}
|
||||
} else {
|
||||
$tags = $cache['post'] . $post_id;
|
||||
}
|
||||
return Cache::tag($tags)->clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user