diff --git a/app/models/user.rb b/app/models/user.rb index 48b269e6e..0ed8aeda0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -264,6 +264,7 @@ class User < Principal if OnclickTime.where("user_id =?", User.current).first.nil? message_new_time = OnclickTime.new message_new_time.user_id = User.current.id + # 第一次初始化点击铃铛时间 message_new_time.onclick_time = User.current.last_login_on.nil? ? Time.now : User.current.last_login_on message_new_time.save end