...
|
...
|
@@ -75,7 +75,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
|
|
|
|
|
// Sponsor
|
|
|
var sponsor *domain.User
|
|
|
if data, err := userService.UserFrom(createCooperationProjectCommand.CompanyId, createCooperationProjectCommand.OrgId, createCooperationProjectCommand.UserId); err != nil {
|
|
|
if data, err := userService.UserFrom(createCooperationProjectCommand.CompanyId, createCooperationProjectCommand.OrgId, createCooperationProjectCommand.SponsorUid); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
sponsor = data
|
...
|
...
|
@@ -83,7 +83,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
|
|
|
|
|
// Publisher
|
|
|
var publisher *domain.User
|
|
|
if data, err := userService.UserFrom(createCooperationProjectCommand.CompanyId, createCooperationProjectCommand.OrgId, createCooperationProjectCommand.UserId); err != nil {
|
|
|
if data, err := userService.UserFrom(createCooperationProjectCommand.CompanyId, createCooperationProjectCommand.OrgId, createCooperationProjectCommand.PublisherUid); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
publisher = data
|
...
|
...
|
@@ -121,6 +121,14 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
|
|
organization = data
|
|
|
}
|
|
|
|
|
|
// 获取组织机构信息
|
|
|
var department *domain.Org
|
|
|
if data, err := organizationService.OrgFrom(createCooperationProjectCommand.CompanyId, createCooperationProjectCommand.DepartmentId); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
} else {
|
|
|
department = data
|
|
|
}
|
|
|
|
|
|
// 查找共创模式
|
|
|
var cooperationModeRepository domain.CooperationModeRepository
|
|
|
if value, err := factory.CreateCooperationModeRepository(map[string]interface{}{
|
...
|
...
|
@@ -171,7 +179,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
|
|
CooperationProjectPublishTime: time.Now(),
|
|
|
Attachment: createCooperationProjectCommand.Attachment,
|
|
|
Company: company,
|
|
|
Department: organization.ToDepartment(),
|
|
|
Department: department.ToDepartment(),
|
|
|
Org: organization,
|
|
|
Operator: operator,
|
|
|
OperateTime: time.Now(),
|
...
|
...
|
|