作者 陈志颖

fix:共创项目参数修复

@@ -25,15 +25,15 @@ type CreateCooperationProjectCommand struct { @@ -25,15 +25,15 @@ type CreateCooperationProjectCommand struct {
25 // 附件 25 // 附件
26 Attachment []*domain.Attachment `cname:"附件" json:"attachment"` 26 Attachment []*domain.Attachment `cname:"附件" json:"attachment"`
27 // 所属部门Id 27 // 所属部门Id
28 - DepartmentId int64 `json:"departmentId,string"` 28 + DepartmentId int64 `cname:"所属部门ID" json:"departmentId"`
29 // 公司ID,通过集成REST上下文获取 29 // 公司ID,通过集成REST上下文获取
30 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 30 + CompanyId int64 `cname:"公司ID" json:"companyId"`
31 // 组织机构ID 31 // 组织机构ID
32 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 32 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
33 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 33 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
34 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 34 + UserId int64 `cname:"用户ID" json:"userId"`
35 // 用户基础数据id 35 // 用户基础数据id
36 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 36 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
37 } 37 }
38 38
39 func (createCooperationProjectCommand *CreateCooperationProjectCommand) Valid(validation *validation.Validation) { 39 func (createCooperationProjectCommand *CreateCooperationProjectCommand) Valid(validation *validation.Validation) {
@@ -140,7 +140,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro @@ -140,7 +140,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro
140 } 140 }
141 cooperationMode, err := cooperationModeRepository.FindOne(map[string]interface{}{"cooperationModeNumber": createCooperationProjectCommand.CooperationModeNumber}) 141 cooperationMode, err := cooperationModeRepository.FindOne(map[string]interface{}{"cooperationModeNumber": createCooperationProjectCommand.CooperationModeNumber})
142 if err != nil { 142 if err != nil {
143 - return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 143 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "共创模式不存在")
144 } 144 }
145 if cooperationMode == nil { 145 if cooperationMode == nil {
146 return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", createCooperationProjectCommand.CooperationModeNumber)) 146 return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", createCooperationProjectCommand.CooperationModeNumber))