1.优化运维管理中渠道列表选择渠道的筛选错误问题

2.优化渠道运维管理目录菜单权限
This commit is contained in:
2026-05-19 15:31:04 +08:00
parent 5628af683f
commit 37c0035bfc
9 changed files with 115 additions and 8 deletions

View File

@@ -9,6 +9,7 @@ namespace plugin\saiadmin\app\event;
use plugin\saiadmin\app\cache\ReflectionCache;
use plugin\saiadmin\app\model\system\SystemLoginLog;
use plugin\saiadmin\app\model\system\SystemOperLog;
use plugin\saiadmin\app\model\system\SystemUser as SystemUserModel;
class SystemUser
{
@@ -32,6 +33,10 @@ class SystemUser
if (isset($item['admin_id'])) {
$data['created_by'] = $item['admin_id'];
$data['updated_by'] = $item['admin_id'];
$deptId = SystemUserModel::where('id', $item['admin_id'])->value('dept_id');
if ($deptId !== null && $deptId !== '' && $deptId > 0) {
$data['dept_id'] = $deptId;
}
}
SystemLoginLog::create($data);
}
@@ -49,6 +54,9 @@ class SystemUser
return false;
}
$info = getCurrentInfo();
if (!$info) {
return false;
}
$ip = $request->getRealIp();
$module = $request->plugin;
$rule = trim($request->uri());
@@ -60,6 +68,14 @@ class SystemUser
$data['ip'] = $ip;
$data['ip_location'] = self::getIpLocation($ip);
$data['request_data'] = $this->filterParams($request->all());
if (isset($info['dept_id']) && $info['dept_id'] > 0) {
$data['dept_id'] = $info['dept_id'];
} elseif (isset($info['id'])) {
$deptId = SystemUserModel::where('id', $info['id'])->value('dept_id');
if ($deptId !== null && $deptId !== '' && $deptId > 0) {
$data['dept_id'] = $deptId;
}
}
SystemOperLog::create($data);
return true;
}