Browse Source

优化系统日志搜索

master
wanghongjun 1 month ago
parent
commit
3dbc05f6da
  1. 7
      app/Http/Controllers/Admin/OperationLogController.php

7
app/Http/Controllers/Admin/OperationLogController.php

@ -99,8 +99,11 @@ class OperationLogController extends Controller
$user_id = AdminUsers::query()->where('name', $name)->value(
'id'
);
$user_id = $user_id ?: 0;
$query->where('user_id', '=', $user_id);
if ($user_id) {
$query->where('user_id', $user_id);
} else {
$query->where('id', 0);
}
}
}

Loading…
Cancel
Save