作者 tangxuhui

数据格式调整

@@ -21,7 +21,7 @@ type UpdateCooperationProjectCommand struct { @@ -21,7 +21,7 @@ type UpdateCooperationProjectCommand struct {
21 // 共创发起人id 21 // 共创发起人id
22 CooperationProjectSponsor string `json:"cooperationProjectSponsor,omitempty"` 22 CooperationProjectSponsor string `json:"cooperationProjectSponsor,omitempty"`
23 // 项目承接对象 23 // 项目承接对象
24 - CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerTypes,omitempty"` 24 + CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType,omitempty"`
25 // 共创项目描述 25 // 共创项目描述
26 CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"` 26 CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"`
27 //图片 27 //图片
@@ -22,14 +22,14 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro @@ -22,14 +22,14 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro
22 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator) 22 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator)
23 23
24 result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{ 24 result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
25 - CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,  
26 - CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,  
27 - CooperationModeNumber: createCooperationProjectCommand.CooperationModeNumber,  
28 - PublisherUid: int(createCooperationProjectCommand.Operator.UserId),  
29 - SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,  
30 - DepartmentId: int(createCooperationProjectCommand.DepartmentId),  
31 - CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,  
32 - Attachment: createCooperationProjectCommand.Images, 25 + CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
  26 + CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,
  27 + CooperationModeNumber: createCooperationProjectCommand.CooperationModeNumber,
  28 + PublisherUid: int(createCooperationProjectCommand.Operator.UserId),
  29 + SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
  30 + DepartmentId: int(createCooperationProjectCommand.DepartmentId),
  31 + CooperationProjectUndertakerTypes: createCooperationProjectCommand.CooperationProjectUndertakerType,
  32 + Attachment: createCooperationProjectCommand.Images,
33 }) 33 })
34 34
35 if err != nil { 35 if err != nil {
@@ -135,15 +135,15 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro @@ -135,15 +135,15 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro
135 } 135 }
136 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) 136 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator)
137 _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{ 137 _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{
138 - CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,  
139 - CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,  
140 - CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber,  
141 - CooperationProjectUndertakerType: updateCooperationProjectCommand.CooperationProjectUndertakerType,  
142 - SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,  
143 - PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),  
144 - CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,  
145 - Attachment: updateCooperationProjectCommand.Images,  
146 - DepartmentId: updateCooperationProjectCommand.DepartmentId, 138 + CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
  139 + CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,
  140 + CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber,
  141 + CooperationProjectUndertakerTypes: updateCooperationProjectCommand.CooperationProjectUndertakerType,
  142 + SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,
  143 + PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
  144 + CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
  145 + Attachment: updateCooperationProjectCommand.Images,
  146 + DepartmentId: updateCooperationProjectCommand.DepartmentId,
147 }) 147 })
148 if err != nil { 148 if err != nil {
149 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 149 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -65,14 +65,14 @@ type CooperationProject struct { @@ -65,14 +65,14 @@ type CooperationProject struct {
65 //创建共创项目 65 //创建共创项目
66 type ( 66 type (
67 ReqCooperationProjectAdd struct { 67 ReqCooperationProjectAdd struct {
68 - CooperationProjectDescription string `json:"cooperationProjectDescription"`  
69 - CooperationProjectName string `json:"cooperationProjectName"`  
70 - CooperationModeNumber string `json:"cooperationModeNumber"`  
71 - PublisherUid int `json:"publisherUid,string"`  
72 - SponsorUid int `json:"sponsorUid,string"`  
73 - DepartmentId int `json:"departmentId"`  
74 - CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"`  
75 - Attachment []*domain.Attachment `json:"attachment"` 68 + CooperationProjectDescription string `json:"cooperationProjectDescription"`
  69 + CooperationProjectName string `json:"cooperationProjectName"`
  70 + CooperationModeNumber string `json:"cooperationModeNumber"`
  71 + PublisherUid int `json:"publisherUid,string"`
  72 + SponsorUid int `json:"sponsorUid,string"`
  73 + DepartmentId int `json:"departmentId"`
  74 + CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"`
  75 + Attachment []*domain.Attachment `json:"attachment"`
76 } 76 }
77 77
78 DataCooperationProjectAdd struct { 78 DataCooperationProjectAdd struct {
@@ -110,7 +110,7 @@ type ( @@ -110,7 +110,7 @@ type (
110 CooperationProjectName string `json:"cooperationProjectName"` 110 CooperationProjectName string `json:"cooperationProjectName"`
111 CooperationModeNumber string `json:"cooperationModeNumber"` 111 CooperationModeNumber string `json:"cooperationModeNumber"`
112 // 承接对象,1员工,2共创用户,3公开,可以多选 112 // 承接对象,1员工,2共创用户,3公开,可以多选
113 - CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerTypes"` 113 + CooperationProjectUndertakerTypes []int32 `json:"cooperationProjectUndertakerTypes"`
114 // 共创项目发起人uid 114 // 共创项目发起人uid
115 SponsorUid string `json:"sponsorUid"` 115 SponsorUid string `json:"sponsorUid"`
116 // 共创项目发布人uid 116 // 共创项目发布人uid