mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
修复:周统计数据需加入年份
This commit is contained in:
@@ -20,7 +20,7 @@ class TimeableVisitRecord < ApplicationRecord
|
||||
belongs_to :project
|
||||
|
||||
def self.build(project_id)
|
||||
week = TimeableVisitRecord.find_or_create_by!(time: Date.today.cweek, project_id: project_id)
|
||||
week = TimeableVisitRecord.find_or_create_by!(time: Date.today.strftime("%Y-%W"), project_id: project_id)
|
||||
month = TimeableVisitRecord.find_or_create_by!(time: Date.today.strftime("%Y%m"), project_id: project_id)
|
||||
|
||||
return week, month
|
||||
|
||||
Reference in New Issue
Block a user