|
@@ -32,9 +32,9 @@ func (repository *TaskRepository) Save(task *domain.Task) (*domain.Task, error) |
|
@@ -32,9 +32,9 @@ func (repository *TaskRepository) Save(task *domain.Task) (*domain.Task, error) |
32
|
return task, err
|
32
|
return task, err
|
33
|
}
|
33
|
}
|
34
|
if _, err := tx.QueryOne(
|
34
|
if _, err := tx.QueryOne(
|
35
|
- 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),
|
|
|
36
|
- "INSERT INTO tasks (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) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 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",
|
|
|
37
|
- takeId, 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); err != nil {
|
35
|
+ 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.MinSuMoney, &task.MaxSuMoney, &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),
|
|
|
36
|
+ "INSERT INTO tasks (id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, min_su_money, max_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) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id, company_id, task_name, task_type, sponsor, task_status, reference_resource, project_belong, customer_values, task_nature, su_money, min_su_money, max_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",
|
|
|
37
|
+ takeId, task.CompanyId, task.TaskName, task.TaskType, task.Sponsor, task.TaskStatus, task.ReferenceResource, task.ProjectBelong, pg.Array(task.CustomerValues), task.TaskNature, task.SuMoney, task.MinSuMoney, task.MaxSuMoney, 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); err != nil {
|
38
|
return task, err
|
38
|
return task, err
|
39
|
}
|
39
|
}
|
40
|
} else {
|
40
|
} else {
|
|
@@ -49,9 +49,9 @@ func (repository *TaskRepository) Save(task *domain.Task) (*domain.Task, error) |
|
@@ -49,9 +49,9 @@ func (repository *TaskRepository) Save(task *domain.Task) (*domain.Task, error) |
49
|
taskReceiverUid = 0
|
49
|
taskReceiverUid = 0
|
50
|
}
|
50
|
}
|
51
|
if _, err := tx.QueryOne(
|
51
|
if _, err := tx.QueryOne(
|
52
|
- 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),
|
|
|
53
|
- "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",
|
|
|
54
|
- 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, taskReceiverUid, 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, task.Identify()); err != nil {
|
52
|
+ 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.MinSuMoney, &task.MaxSuMoney, &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),
|
|
|
53
|
+ "UPDATE tasks SET company_id=?, task_name=?, task_type=?, sponsor=?, task_status=?, reference_resource=?, project_belong=?, customer_values=?, task_nature=?, su_money=?, min_su_money=?, max_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, min_su_money, max_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",
|
|
|
54
|
+ task.CompanyId, task.TaskName, task.TaskType, task.Sponsor, task.TaskStatus, task.ReferenceResource, task.ProjectBelong, pg.Array(task.CustomerValues), task.TaskNature, task.SuMoney, task.MinSuMoney, task.MaxSuMoney, task.AcceptanceStandard, task.TaskDescription, pg.Array(task.TaskPictureUrls), task.IsRewardTake, taskReceiverUid, 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, task.Identify()); err != nil {
|
55
|
return task, err
|
55
|
return task, err
|
56
|
}
|
56
|
}
|
57
|
}
|
57
|
}
|