From c73e138ee778c71a3a900bd84afcce3b4e0b1deb Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 27 Sep 2024 11:33:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=AE=B0=E5=BD=95=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4,=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=94=A8=E6=88=B7=E4=BB=85=E6=98=BE=E7=A4=BA?= =?UTF-8?q?id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_action.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/user_action.rb b/app/models/user_action.rb index 8f8df75bf..7895446e3 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -44,7 +44,8 @@ class UserAction < ApplicationRecord if user.present? user&.login else - "不存用户:#{action_id}" + del_user = UserAction.find_by(action_type: "DestroyUser", action_id: self.user_id) + del_user.present? ? "已注销:#{del_user.user.login}" : "不存在用户:#{user_id}" end end