竞赛用户关联优化

This commit is contained in:
2023-05-30 11:12:21 +08:00
parent 6b68de130c
commit 09e674f0c1
4 changed files with 12 additions and 3 deletions

View File

@@ -26,6 +26,6 @@ json.super_description @user.super_description
json.(@user, :show_email, :show_department, :show_location, :show_super_description)
json.message_unread_total @message_unread_total
json.has_trace_user @user.trace_user.present?
json.is_new @user.login.present? && params[:login].to_s.include?("#{@user.login}")
json.is_new params[:login].present? && (UserAction.where(action_type: "sync_educoder_user", user_id: @user.id).blank? || @user.mail.include?("@gitlink.org.cn") || @user.mail.include?("@forge.com"))
json.nps EduSetting.get("nps-on-off-switch").to_s == 'true' && UserNp.where(user_id: current_user.id).where("created_at >= ?", (Time.now - 30.days).beginning_of_day ).blank?
json.sign_cla @user.sign_cla