作者 郑周

1. 优化时间计算

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