作者 tangxuhui

数据格式调整

... ... @@ -21,7 +21,7 @@ type UpdateCooperationProjectCommand struct {
// 共创发起人id
CooperationProjectSponsor string `json:"cooperationProjectSponsor,omitempty"`
// 项目承接对象
CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerTypes,omitempty"`
CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType,omitempty"`
// 共创项目描述
CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"`
//图片
... ...
... ... @@ -22,14 +22,14 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator)
result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,
CooperationModeNumber: createCooperationProjectCommand.CooperationModeNumber,
PublisherUid: int(createCooperationProjectCommand.Operator.UserId),
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
DepartmentId: int(createCooperationProjectCommand.DepartmentId),
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
Attachment: createCooperationProjectCommand.Images,
CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,
CooperationModeNumber: createCooperationProjectCommand.CooperationModeNumber,
PublisherUid: int(createCooperationProjectCommand.Operator.UserId),
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
DepartmentId: int(createCooperationProjectCommand.DepartmentId),
CooperationProjectUndertakerTypes: createCooperationProjectCommand.CooperationProjectUndertakerType,
Attachment: createCooperationProjectCommand.Images,
})
if err != nil {
... ... @@ -135,15 +135,15 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro
}
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator)
_, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{
CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,
CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber,
CooperationProjectUndertakerType: updateCooperationProjectCommand.CooperationProjectUndertakerType,
SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,
PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
Attachment: updateCooperationProjectCommand.Images,
DepartmentId: updateCooperationProjectCommand.DepartmentId,
CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId,
CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName,
CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber,
CooperationProjectUndertakerTypes: updateCooperationProjectCommand.CooperationProjectUndertakerType,
SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor,
PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)),
CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription,
Attachment: updateCooperationProjectCommand.Images,
DepartmentId: updateCooperationProjectCommand.DepartmentId,
})
if err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -65,14 +65,14 @@ type CooperationProject struct {
//创建共创项目
type (
ReqCooperationProjectAdd struct {
CooperationProjectDescription string `json:"cooperationProjectDescription"`
CooperationProjectName string `json:"cooperationProjectName"`
CooperationModeNumber string `json:"cooperationModeNumber"`
PublisherUid int `json:"publisherUid,string"`
SponsorUid int `json:"sponsorUid,string"`
DepartmentId int `json:"departmentId"`
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"`
Attachment []*domain.Attachment `json:"attachment"`
CooperationProjectDescription string `json:"cooperationProjectDescription"`
CooperationProjectName string `json:"cooperationProjectName"`
CooperationModeNumber string `json:"cooperationModeNumber"`
PublisherUid int `json:"publisherUid,string"`
SponsorUid int `json:"sponsorUid,string"`
DepartmentId int `json:"departmentId"`
CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"`
Attachment []*domain.Attachment `json:"attachment"`
}
DataCooperationProjectAdd struct {
... ... @@ -110,7 +110,7 @@ type (
CooperationProjectName string `json:"cooperationProjectName"`
CooperationModeNumber string `json:"cooperationModeNumber"`
// 承接对象,1员工,2共创用户,3公开,可以多选
CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerTypes"`
CooperationProjectUndertakerTypes []int32 `json:"cooperationProjectUndertakerTypes"`
// 共创项目发起人uid
SponsorUid string `json:"sponsorUid"`
// 共创项目发布人uid
... ...