作者 tangxvhui
... ... @@ -589,6 +589,11 @@ func (rs *EvaluationProjectService) Activate(in *command.ActivateProjectCommand)
principalId = intId
}
tasks, err := taskRepository.Find(map[string]interface{}{"projectId": project.Id})
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
if len(tasks) == 0 {
now := time.Now().Local()
year, month, day := now.Date()
nowO := time.Date(year, month, day, 0, 0, 0, 0, time.Local) // 当前时间0点0分0秒时刻
... ... @@ -654,6 +659,7 @@ func (rs *EvaluationProjectService) Activate(in *command.ActivateProjectCommand)
if err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...