更改:删除数据处理以及昵称获取规则处理

This commit is contained in:
yystopf 2023-12-19 15:36:57 +08:00
parent 26461f3a44
commit 3b5b78faed
3 changed files with 3 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class Admins::ProjectsRankController < Admins::BaseController
sheet.row(0).concat %w(排名 项目全称 项目地址 得分 访问数 关注数 点赞数 fork数 疑修数 合并请求数 提交数)
data.each_with_index do |d, index|
sheet[index+1,0] = index+1
sheet[index+1,1] = "#{d&.project&.owner&.nickname}/#{d&.project&.name}"
sheet[index+1,1] = "#{d&.project&.owner&.real_name}/#{d&.project&.name}"
sheet[index+1,2] = "#{Rails.application.config_for(:configuration)['platform_url']}/#{d&.project&.owner&.login}/#{d&.project&.identifier}"
sheet[index+1,3] = d.score
sheet[index+1,4] = d.visits

View File

@ -7,6 +7,7 @@ class DailyProjectStatisticsJob < ApplicationJob
daily_data_keys.each do |key|
result = $redis_cache.hgetall(key)
project_id = key.gsub('v2-project-statistic:', '').gsub("-#{date}", '')
next unless Project.find_by_id(project_id).present?
visits = result["visits"].to_i
watchers = result["watchers"].to_i
praises = result["praises"].to_i

View File

@ -19,7 +19,7 @@
<td><%= index + 1%></td>
<td>
<a href="<%= "/#{item&.project&.owner&.login}/#{item&.project&.identifier}"%>">
<%= "#{item&.project&.owner&.nickname}/#{item&.project&.name}" %>
<%= "#{item&.project&.owner&.real_name}/#{item&.project&.name}" %>
</a>
</td>