...
|
...
|
@@ -7,7 +7,6 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/command"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/dto"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/query"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
|
|
|
)
|
|
|
|
...
|
...
|
@@ -22,12 +21,6 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
|
|
}
|
|
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator)
|
|
|
|
|
|
var images []*domain.Attachment
|
|
|
for _, v := range createCooperationProjectCommand.Images {
|
|
|
images = append(images, &domain.Attachment{
|
|
|
Url: v,
|
|
|
})
|
|
|
}
|
|
|
result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
|
|
|
CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
|
|
|
CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,
|
...
|
...
|
@@ -36,7 +29,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
|
|
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
|
|
|
DepartmentId: int(createCooperationProjectCommand.DepartmentId),
|
|
|
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
|
|
|
Attachment: images,
|
|
|
Attachment: createCooperationProjectCommand.Images,
|
|
|
})
|
|
|
|
|
|
if err != nil {
|
...
|
...
|
@@ -141,12 +134,6 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
|
|
}
|
|
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator)
|
|
|
var images []domain.Attachment
|
|
|
for _, v := range updateCooperationProjectCommand.Images {
|
|
|
images = append(images, domain.Attachment{
|
|
|
Url: v,
|
|
|
})
|
|
|
}
|
|
|
_, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{
|
|
|
CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
|
|
|
CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,
|
...
|
...
|
@@ -155,7 +142,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
|
SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,
|
|
|
PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
|
|
|
CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
|
|
|
Attachment: images,
|
|
|
Attachment: updateCooperationProjectCommand.Images,
|
|
|
DepartmentId: updateCooperationProjectCommand.DepartmentId,
|
|
|
})
|
|
|
if err != nil {
|
...
|
...
|
@@ -165,7 +152,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
|
return updateCooperationProjectCommand, nil
|
|
|
}
|
|
|
|
|
|
// 返回共创项目管理列表
|
|
|
// 返回共创项目管理列表下拉选择框
|
|
|
func (cooperationProjectService *CooperationProjectService) ListCooperationProjectSelector(listCooperationProjectQuery *query.ListCooperationProjectQuery) (int64, interface{}, error) {
|
|
|
listCooperationProjectQuery.PageSize = 999
|
|
|
if err := listCooperationProjectQuery.ValidateQuery(); err != nil {
|
...
|
...
|
|