作者 郑周

1. 优化时间计算

... ... @@ -176,7 +176,8 @@ func (rs *EvaluationProjectService) UpdateTemplate(in *command.UpdateProjectTemp
}
now := time.Now().Local()
nowO := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
year, month, day := now.Date()
nowO := time.Date(year, month, day, 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
for i := range tasks {
task := tasks[i]
... ... @@ -460,7 +461,8 @@ func (rs *EvaluationProjectService) Activate(in *command.ActivateProjectCommand)
}
now := time.Now().Local()
nowO := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
year, month, day := now.Date()
nowO := time.Date(year, month, day, 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
for i := range project.Template.LinkNodes {
node := project.Template.LinkNodes[i]
... ...