作者 tangxuhui

更新 数据结构适配调整

... ... @@ -17,7 +17,7 @@ type CreateCooperationProjectCommand struct {
// 共创项目名称
CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
// 共创发起人id
CooperationProjectSponsor string `json:"cooperationProjectSponsor,string,"`
CooperationProjectSponsor int `json:"cooperationProjectSponsor,string,"`
// 项目承接对象
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"`
// 共创项目描述
... ...
package service
import (
"strconv"
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto"
... ... @@ -23,10 +21,10 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP
result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,
PublisherUid: strconv.Itoa(int(createCooperationProjectCommand.Operator.UserId)),
PublisherUid: int(createCooperationProjectCommand.Operator.UserId),
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
Images: createCooperationProjectCommand.Images,
// Images: createCooperationProjectCommand.Images,
})
if err != nil {
... ...
... ... @@ -17,7 +17,7 @@ type CreateCooperationProjectCommand struct {
// 共创项目名称
CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
// 共创发起人id
CooperationProjectSponsor string `json:"cooperationProjectSponsor,string,"`
CooperationProjectSponsor int `json:"cooperationProjectSponsor,string,"`
// 项目承接对象
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"`
// 共创项目描述
... ...
... ... @@ -23,10 +23,11 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro
result, err := creationCooperationGateway.CooperationProjectAdd(allied_creation_cooperation.ReqCooperationProjectAdd{
CooperationProjectDescription: createCooperationProjectCommand.CooperationProjectDescription,
CooperationProjectName: createCooperationProjectCommand.CooperationProjectName,
PublisherUid: strconv.Itoa(int(createCooperationProjectCommand.Operator.UserId)),
PublisherUid: int(createCooperationProjectCommand.Operator.UserId),
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
Images: createCooperationProjectCommand.Images,
// Images: createCooperationProjectCommand.Images,
//TODO
})
if err != nil {
... ...
... ... @@ -60,12 +60,13 @@ type CooperationProject struct {
//创建共创项目
type (
ReqCooperationProjectAdd struct {
CooperationProjectDescription string `json:"cooperationProjectDescription"`
CooperationProjectName string `json:"cooperationProjectName"`
PublisherUid string `json:"publisherUid"`
SponsorUid string `json:"sponsorUid"`
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"`
Images []string `json:"images"`
CooperationProjectDescription string `json:"cooperationProjectDescription"`
CooperationProjectName string `json:"cooperationProjectName"`
PublisherUid int `json:"publisherUid,string"`
SponsorUid int `json:"sponsorUid,string"`
DepartmentId int `json:"departmentId,string"`
CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"`
Attachment []ProjectAttachment `json:"attachment"`
}
DataCooperationProjectAdd struct {
... ...