|
@@ -7,7 +7,6 @@ import ( |
|
@@ -7,7 +7,6 @@ import ( |
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/command"
|
7
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/command"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/dto"
|
8
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/dto"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/query"
|
9
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/query"
|
10
|
- "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
|
|
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
|
10
|
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
|
12
|
)
|
11
|
)
|
13
|
|
12
|
|
|
@@ -22,12 +21,6 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
|
@@ -22,12 +21,6 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
22
|
}
|
21
|
}
|
23
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator)
|
22
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator)
|
24
|
|
23
|
|
25
|
- var images []*domain.Attachment
|
|
|
26
|
- for _, v := range createCooperationProjectCommand.Images {
|
|
|
27
|
- images = append(images, &domain.Attachment{
|
|
|
28
|
- Url: v,
|
|
|
29
|
- })
|
|
|
30
|
- }
|
|
|
31
|
result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
|
24
|
result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
|
32
|
CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
|
25
|
CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
|
33
|
CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,
|
26
|
CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,
|
|
@@ -36,7 +29,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
|
@@ -36,7 +29,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro |
36
|
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
|
29
|
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
|
37
|
DepartmentId: int(createCooperationProjectCommand.DepartmentId),
|
30
|
DepartmentId: int(createCooperationProjectCommand.DepartmentId),
|
38
|
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
|
31
|
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
|
39
|
- Attachment: images,
|
32
|
+ Attachment: createCooperationProjectCommand.Images,
|
40
|
})
|
33
|
})
|
41
|
|
34
|
|
42
|
if err != nil {
|
35
|
if err != nil {
|
|
@@ -141,12 +134,6 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
@@ -141,12 +134,6 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
141
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
134
|
return nil, application.ThrowError(application.ARG_ERROR, err.Error())
|
142
|
}
|
135
|
}
|
143
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator)
|
136
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator)
|
144
|
- var images []domain.Attachment
|
|
|
145
|
- for _, v := range updateCooperationProjectCommand.Images {
|
|
|
146
|
- images = append(images, domain.Attachment{
|
|
|
147
|
- Url: v,
|
|
|
148
|
- })
|
|
|
149
|
- }
|
|
|
150
|
_, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{
|
137
|
_, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{
|
151
|
CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
|
138
|
CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
|
152
|
CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,
|
139
|
CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,
|
|
@@ -155,7 +142,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
@@ -155,7 +142,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
155
|
SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,
|
142
|
SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,
|
156
|
PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
|
143
|
PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
|
157
|
CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
|
144
|
CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
|
158
|
- Attachment: images,
|
145
|
+ Attachment: updateCooperationProjectCommand.Images,
|
159
|
DepartmentId: updateCooperationProjectCommand.DepartmentId,
|
146
|
DepartmentId: updateCooperationProjectCommand.DepartmentId,
|
160
|
})
|
147
|
})
|
161
|
if err != nil {
|
148
|
if err != nil {
|
|
@@ -165,7 +152,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
@@ -165,7 +152,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
165
|
return updateCooperationProjectCommand, nil
|
152
|
return updateCooperationProjectCommand, nil
|
166
|
}
|
153
|
}
|
167
|
|
154
|
|
168
|
-// 返回共创项目管理列表
|
155
|
+// 返回共创项目管理列表下拉选择框
|
169
|
func (cooperationProjectService *CooperationProjectService) ListCooperationProjectSelector(listCooperationProjectQuery *query.ListCooperationProjectQuery) (int64, interface{}, error) {
|
156
|
func (cooperationProjectService *CooperationProjectService) ListCooperationProjectSelector(listCooperationProjectQuery *query.ListCooperationProjectQuery) (int64, interface{}, error) {
|
170
|
listCooperationProjectQuery.PageSize = 999
|
157
|
listCooperationProjectQuery.PageSize = 999
|
171
|
if err := listCooperationProjectQuery.ValidateQuery(); err != nil {
|
158
|
if err := listCooperationProjectQuery.ValidateQuery(); err != nil {
|