作者 yangfu

共创项目修改

... ... @@ -13,9 +13,9 @@ type UpdateCooperationProjectCommand struct {
// 共创项目ID
CooperationProjectId string `json:"cooperationProjectId,string" valid:"Required"`
// 模式编码,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
//CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
// 组织ID
OrgId string `json:"orgId" valid:"Required"`
OrgId int64 `json:"departmentId,string" valid:"Required"`
// 共创项目名称
CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
// 共创发起人id
... ...
... ... @@ -75,12 +75,13 @@ func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationP
_, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{
CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,
CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber,
//CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber,
CooperationProjectUndertakerType: updateCooperationProjectCommand.CooperationProjectUndertakerType,
SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,
PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
Attachment: images,
OrgId: updateCooperationProjectCommand.OrgId,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -11,11 +11,11 @@ type UpdateCooperationProjectCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 共创项目ID
CooperationProjectId string `json:"cooperationProjectId,string" valid:"Required"`
CooperationProjectId string `json:"cooperationProjectId" valid:"Required"`
// 模式编码,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
// 组织ID
OrgId string `json:"orgId" valid:"Required"`
OrgId int64 `json:"departmentId,string" valid:"Required"`
// 共创项目名称
CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
// 共创发起人id
... ...
... ... @@ -149,6 +149,9 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro
PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
Attachment: images,
UserId: updateCooperationProjectCommand.Operator.UserId,
UserBaseId: updateCooperationProjectCommand.Operator.UserBaseId,
OrgId: updateCooperationProjectCommand.OrgId,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -104,7 +104,7 @@ func (gateway HttplibAlliedCreationCooperation) CooperationProjectGet(param ReqC
// CooperationProjectUpdate 更新共创项目
func (gateway HttplibAlliedCreationCooperation) CooperationProjectUpdate(param ReqCooperationProjectUpdate) (*DataCooperationProjectUpdate, error) {
url := gateway.baseUrL + "/cooperation-projects/{cooperationProjectId}"
url := gateway.baseUrL + "/cooperation-projects/" + param.CooperationProjectId
method := "PUT"
req := gateway.CreateRequest(url, method)
log.Logger.Debug("向业务模块请求数据:更新共创项目。", map[string]interface{}{
... ...
... ... @@ -108,7 +108,7 @@ type (
CooperationProjectName string `json:"cooperationProjectName"`
CooperationModeNumber string `json:"cooperationModeNumber"`
// 承接对象,1员工,2共创用户,3公开,可以多选
CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerTypes"`
CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType"`
// 共创项目发起人uid
SponsorUid string `json:"sponsorUid"`
// 共创项目发布人uid
... ... @@ -116,6 +116,12 @@ type (
// 共创项目描述
CooperationProjectDescription string `json:"cooperationProjectDescription"`
Attachment []domain.Attachment `json:"attachment"`
// 组织机构ID
OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"`
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"`
// 用户基础数据id
UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"`
}
DataCooperationProjectUpdate struct {
... ...