...
|
...
|
@@ -45,6 +45,9 @@ func (repository *TaskRepository) Save(task *domain.Task) (*domain.Task, error) |
|
|
if task.BidInfo != nil && task.BidInfo.SuccessfulBidder != nil {
|
|
|
taskReceiverUid = task.BidInfo.SuccessfulBidder.Uid
|
|
|
}
|
|
|
if (task.RobInfo == nil || task.RobInfo.Receiver == nil) && (task.BidInfo == nil || task.BidInfo.SuccessfulBidder == nil) {
|
|
|
taskReceiverUid = 0
|
|
|
}
|
|
|
if _, err := tx.QueryOne(
|
|
|
pg.Scan(&task.TaskId, &task.CompanyId, &task.TaskName, &task.TaskType, &task.Sponsor, &task.TaskStatus, &task.ReferenceResource, &task.ProjectBelong, pg.Array(&task.CustomerValues), &task.TaskNature, &task.SuMoney, &task.AcceptanceStandard, &task.TaskDescription, pg.Array(&task.TaskPictureUrls), &task.IsRewardTake, &task.CreateTime, &task.ReleaseTime, &task.Participators, &task.TaskPercentage, &task.SolveReport, pg.Array(&task.SolvePictureUrls), &task.AssignedPerson, &task.PlannedCompletionTime, &task.ActualCompletionTime, &task.ReceiveTime, &task.CompleteTime, &task.AcceptanceTime),
|
|
|
"UPDATE tasks SET company_id=?, task_name=?, task_type=?, sponsor=?, task_status=?, reference_resource=?, project_belong=?, customer_values=?, task_nature=?, su_money=?, acceptance_standard=?, task_description=?, task_picture_urls=?, is_reward_take=?, receiver_uid=?, create_time=?, release_time=?, participators=?, task_percentage=?, solve_report=?, solve_picture_urls=?, assigned_person=?, planned_completion_time=?, actual_completion_time=?, receive_time=?, complete_time=?, acceptance_time=? WHERE id=? RETURNING id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, acceptance_standard, task_description, task_picture_urls, is_reward_take, create_time, release_time, participators, task_percentage, solve_report, solve_picture_urls, assigned_person, planned_completion_time, actual_completion_time, receive_time, complete_time, acceptance_time",
|
...
|
...
|
|