From b27dc8393dafa9d93dcfb67966b6c1c318f6ec53 Mon Sep 17 00:00:00 2001 From: yystopf Date: Fri, 10 Jan 2025 14:55:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C=E7=BB=9F=E8=AE=A1=E8=B4=9F=E6=95=B0?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/cache/v2/user_date_rank_service.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/services/cache/v2/user_date_rank_service.rb b/app/services/cache/v2/user_date_rank_service.rb index b669e4d67..d390d1f5f 100644 --- a/app/services/cache/v2/user_date_rank_service.rb +++ b/app/services/cache/v2/user_date_rank_service.rb @@ -87,14 +87,22 @@ class Cache::V2::UserDateRankService < ApplicationService def set_user_rank set_user_statistic follow_count = $redis_cache.hget(user_date_statistic_key, "follow-count") || 0 + follow_count = follow_count.to_i < 0 ? 0 : follow_count pullrequest_count = $redis_cache.hget(user_date_statistic_key, "pullrequest-count") || 0 + pullrequest_count = pullrequest_count.to_i < 0 ? 0 : pullrequest_count issues_count = $redis_cache.hget(user_date_statistic_key, "issue-count") || 0 + issues_count = issues_count.to_i < 0 ? 0 : issues_count project_count = $redis_cache.hget(user_date_statistic_key, "project-count") || 0 + project_count = project_count.to_i < 0 ? 0 : project_count fork_count = $redis_cache.hget(user_date_statistic_key, "fork-count") || 0 + fork_count = fork_count.to_i < 0 ? 0 : fork_count project_watchers_count = $redis_cache.hget(user_date_statistic_key, "project-watcher-count") || 0 + project_watchers_count = project_watchers_count.to_i < 0 ? 0 : project_watchers_count project_praises_count = $redis_cache.hget(user_date_statistic_key, "project-praise-count") || 0 + project_praises_count = project_praises_count.to_i < 0 ? 0 : project_praises_count project_language = $redis_cache.hget(user_date_statistic_key, "project-language") project_languages_count = project_language.nil? || project_language == "{}" ? 0 : JSON.parse(project_language).length + project_languages_count = project_languages_count.to_i < 0 ? 0 : project_languages_count # 影响力 influence = (60.0 + follow_count.to_i / (follow_count.to_i + 20.0) * 40.0).to_i From 84d6626c5c59445686c3e982d1788d6bb09e8f25 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 15 Jan 2025 16:26:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9Astar=5Fdate?= =?UTF-8?q?=E5=92=8Cdue=5Fdate=E5=88=B0=E5=B7=A5=E4=BD=9C=E5=8F=B0?= =?UTF-8?q?=E6=88=91=E7=9A=84=E5=B7=A5=E4=BD=9C=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/api/v1/issues/_simple_detail.json.jbuilder | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/api/v1/issues/_simple_detail.json.jbuilder b/app/views/api/v1/issues/_simple_detail.json.jbuilder index f3a4a12fd..2c05acf7f 100644 --- a/app/views/api/v1/issues/_simple_detail.json.jbuilder +++ b/app/views/api/v1/issues/_simple_detail.json.jbuilder @@ -38,4 +38,6 @@ end json.assigners issue.show_assigners.each do |assigner| json.partial! "api/v1/users/simple_user", locals: {user: assigner} end -json.comment_journals_count issue.comment_journals.size \ No newline at end of file +json.comment_journals_count issue.comment_journals.size +json.start_date issue.start_date +json.due_date issue.due_date \ No newline at end of file From 2a77ac99d94ad7abc3bbdfb5887b3e765a936bac Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 16 Jan 2025 15:17:48 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E:=20=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E5=8F=B0=E6=93=8D=E4=BD=9C=E8=AE=B0=E5=BD=95=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E7=B2=BE=E7=A1=AE=E5=88=B0=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/api/pm/dashboards/my_operate_journals.json.jbuilder | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/api/pm/dashboards/my_operate_journals.json.jbuilder b/app/views/api/pm/dashboards/my_operate_journals.json.jbuilder index dc9613183..0d0aeb18f 100644 --- a/app/views/api/pm/dashboards/my_operate_journals.json.jbuilder +++ b/app/views/api/pm/dashboards/my_operate_journals.json.jbuilder @@ -8,6 +8,8 @@ json.data do json.is_journal_detail journal.is_journal_detail? json.created_at journal.created_on.strftime("%Y-%m-%d %H:%M") json.updated_at journal.updated_on.strftime("%Y-%m-%d %H:%M") + json.created_time journal.created_on.to_i + json.updated_time journal.updated_on.to_i json.user do if journal.user.present? json.partial! "api/v1/users/simple_user", user: journal.user