作者 yangfu

共创项目修改

@@ -13,9 +13,9 @@ type UpdateCooperationProjectCommand struct { @@ -13,9 +13,9 @@ type UpdateCooperationProjectCommand struct {
13 // 共创项目ID 13 // 共创项目ID
14 CooperationProjectId string `json:"cooperationProjectId,string" valid:"Required"` 14 CooperationProjectId string `json:"cooperationProjectId,string" valid:"Required"`
15 // 模式编码,唯一确定 15 // 模式编码,唯一确定
16 - CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` 16 + //CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
17 // 组织ID 17 // 组织ID
18 - OrgId string `json:"orgId" valid:"Required"` 18 + OrgId int64 `json:"departmentId,string" valid:"Required"`
19 // 共创项目名称 19 // 共创项目名称
20 CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` 20 CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
21 // 共创发起人id 21 // 共创发起人id
@@ -73,14 +73,15 @@ func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationP @@ -73,14 +73,15 @@ func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationP
73 }) 73 })
74 } 74 }
75 _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{ 75 _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{
76 - CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,  
77 - CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,  
78 - CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber, 76 + CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
  77 + CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,
  78 + //CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber,
79 CooperationProjectUndertakerType: updateCooperationProjectCommand.CooperationProjectUndertakerType, 79 CooperationProjectUndertakerType: updateCooperationProjectCommand.CooperationProjectUndertakerType,
80 SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor, 80 SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,
81 PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)), 81 PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
82 CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription, 82 CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
83 Attachment: images, 83 Attachment: images,
  84 + OrgId: updateCooperationProjectCommand.OrgId,
84 }) 85 })
85 if err != nil { 86 if err != nil {
86 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 87 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -11,11 +11,11 @@ type UpdateCooperationProjectCommand struct { @@ -11,11 +11,11 @@ type UpdateCooperationProjectCommand struct {
11 //操作人 11 //操作人
12 Operator domain.Operator `json:"-"` 12 Operator domain.Operator `json:"-"`
13 // 共创项目ID 13 // 共创项目ID
14 - CooperationProjectId string `json:"cooperationProjectId,string" valid:"Required"` 14 + CooperationProjectId string `json:"cooperationProjectId" valid:"Required"`
15 // 模式编码,唯一确定 15 // 模式编码,唯一确定
16 CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` 16 CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
17 // 组织ID 17 // 组织ID
18 - OrgId string `json:"orgId" valid:"Required"` 18 + OrgId int64 `json:"departmentId,string" valid:"Required"`
19 // 共创项目名称 19 // 共创项目名称
20 CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` 20 CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
21 // 共创发起人id 21 // 共创发起人id
@@ -149,6 +149,9 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro @@ -149,6 +149,9 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro
149 PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)), 149 PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
150 CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription, 150 CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
151 Attachment: images, 151 Attachment: images,
  152 + UserId: updateCooperationProjectCommand.Operator.UserId,
  153 + UserBaseId: updateCooperationProjectCommand.Operator.UserBaseId,
  154 + OrgId: updateCooperationProjectCommand.OrgId,
152 }) 155 })
153 if err != nil { 156 if err != nil {
154 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 157 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -104,7 +104,7 @@ func (gateway HttplibAlliedCreationCooperation) CooperationProjectGet(param ReqC @@ -104,7 +104,7 @@ func (gateway HttplibAlliedCreationCooperation) CooperationProjectGet(param ReqC
104 104
105 // CooperationProjectUpdate 更新共创项目 105 // CooperationProjectUpdate 更新共创项目
106 func (gateway HttplibAlliedCreationCooperation) CooperationProjectUpdate(param ReqCooperationProjectUpdate) (*DataCooperationProjectUpdate, error) { 106 func (gateway HttplibAlliedCreationCooperation) CooperationProjectUpdate(param ReqCooperationProjectUpdate) (*DataCooperationProjectUpdate, error) {
107 - url := gateway.baseUrL + "/cooperation-projects/{cooperationProjectId}" 107 + url := gateway.baseUrL + "/cooperation-projects/" + param.CooperationProjectId
108 method := "PUT" 108 method := "PUT"
109 req := gateway.CreateRequest(url, method) 109 req := gateway.CreateRequest(url, method)
110 log.Logger.Debug("向业务模块请求数据:更新共创项目。", map[string]interface{}{ 110 log.Logger.Debug("向业务模块请求数据:更新共创项目。", map[string]interface{}{
@@ -108,7 +108,7 @@ type ( @@ -108,7 +108,7 @@ type (
108 CooperationProjectName string `json:"cooperationProjectName"` 108 CooperationProjectName string `json:"cooperationProjectName"`
109 CooperationModeNumber string `json:"cooperationModeNumber"` 109 CooperationModeNumber string `json:"cooperationModeNumber"`
110 // 承接对象,1员工,2共创用户,3公开,可以多选 110 // 承接对象,1员工,2共创用户,3公开,可以多选
111 - CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerTypes"` 111 + CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType"`
112 // 共创项目发起人uid 112 // 共创项目发起人uid
113 SponsorUid string `json:"sponsorUid"` 113 SponsorUid string `json:"sponsorUid"`
114 // 共创项目发布人uid 114 // 共创项目发布人uid
@@ -116,6 +116,12 @@ type ( @@ -116,6 +116,12 @@ type (
116 // 共创项目描述 116 // 共创项目描述
117 CooperationProjectDescription string `json:"cooperationProjectDescription"` 117 CooperationProjectDescription string `json:"cooperationProjectDescription"`
118 Attachment []domain.Attachment `json:"attachment"` 118 Attachment []domain.Attachment `json:"attachment"`
  119 + // 组织机构ID
  120 + OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
  121 + // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
  122 + UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
  123 + // 用户基础数据id
  124 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
119 } 125 }
120 126
121 DataCooperationProjectUpdate struct { 127 DataCooperationProjectUpdate struct {