...
|
...
|
@@ -20,12 +20,12 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP |
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator)
|
|
|
var images []domain.Attachment
|
|
|
for _, v := range createCooperationProjectCommand.Images {
|
|
|
images = append(images, domain.Attachment{
|
|
|
Url: v,
|
|
|
})
|
|
|
}
|
|
|
//var images []domain.Attachment
|
|
|
//for _, v := range createCooperationProjectCommand.Attachment {
|
|
|
// images = append(images, domain.Attachment{
|
|
|
// Url: v,
|
|
|
// })
|
|
|
//}
|
|
|
result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
|
|
|
CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
|
|
|
CooperationModeNumber: createCooperationProjectCommand.CooperationModeNumber,
|
...
|
...
|
@@ -33,7 +33,7 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP |
|
|
PublisherUid: int(createCooperationProjectCommand.Operator.UserId),
|
|
|
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
|
|
|
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
|
|
|
Attachment: images,
|
|
|
Attachment: createCooperationProjectCommand.Attachment,
|
|
|
})
|
|
|
|
|
|
if err != nil {
|
...
|
...
|
|