作者 陈志颖

feat:共创项目增加发起部门

@@ -18,6 +18,8 @@ type CooperationProject struct { @@ -18,6 +18,8 @@ type CooperationProject struct {
18 CooperationProjectPublisher *User `json:"cooperationProjectPublisher"` 18 CooperationProjectPublisher *User `json:"cooperationProjectPublisher"`
19 // 共创项目发起人 19 // 共创项目发起人
20 CooperationProjectSponsor *User `json:"cooperationProjectSponsor"` 20 CooperationProjectSponsor *User `json:"cooperationProjectSponsor"`
  21 + // 共创项目发起部门
  22 + Department *Department `json:"department"`
21 // 共创项目承接对象,1员工,2共创用户,3公开,可以多选 23 // 共创项目承接对象,1员工,2共创用户,3公开,可以多选
22 CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType"` 24 CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType"`
23 // 数据所属组织机构 25 // 数据所属组织机构
@@ -21,6 +21,8 @@ type CooperationProject struct { @@ -21,6 +21,8 @@ type CooperationProject struct {
21 CooperationProjectPublisher *domain.User `comment:"共创项目发布人"` 21 CooperationProjectPublisher *domain.User `comment:"共创项目发布人"`
22 // 共创项目发起人 22 // 共创项目发起人
23 CooperationProjectSponsor *domain.User `comment:"共创项目发起人"` 23 CooperationProjectSponsor *domain.User `comment:"共创项目发起人"`
  24 + // 共创项目发起部门
  25 + Department *domain.Department `comment:"共创项目发起部门"`
24 // 共创项目承接对象,1员工,2共创用户,3公开,可以多选 26 // 共创项目承接对象,1员工,2共创用户,3公开,可以多选
25 CooperationProjectUndertakerType []int32 `comment:"共创项目承接对象,1员工,2共创用户,3公开,可以多选" pg:",array"` 27 CooperationProjectUndertakerType []int32 `comment:"共创项目承接对象,1员工,2共创用户,3公开,可以多选" pg:",array"`
26 // 数据所属组织机构 28 // 数据所属组织机构
@@ -14,6 +14,7 @@ func TransformToCooperationProjectDomainModelFromPgModels(cooperationProjectMode @@ -14,6 +14,7 @@ func TransformToCooperationProjectDomainModelFromPgModels(cooperationProjectMode
14 CooperationProjectPublishTime: cooperationProjectModel.CooperationProjectPublishTime, 14 CooperationProjectPublishTime: cooperationProjectModel.CooperationProjectPublishTime,
15 CooperationProjectPublisher: cooperationProjectModel.CooperationProjectPublisher, 15 CooperationProjectPublisher: cooperationProjectModel.CooperationProjectPublisher,
16 CooperationProjectSponsor: cooperationProjectModel.CooperationProjectSponsor, 16 CooperationProjectSponsor: cooperationProjectModel.CooperationProjectSponsor,
  17 + Department: cooperationProjectModel.Department,
17 CooperationProjectUndertakerType: cooperationProjectModel.CooperationProjectUndertakerType, 18 CooperationProjectUndertakerType: cooperationProjectModel.CooperationProjectUndertakerType,
18 Org: cooperationProjectModel.Org, 19 Org: cooperationProjectModel.Org,
19 Company: cooperationProjectModel.Company, 20 Company: cooperationProjectModel.Company,
@@ -33,6 +33,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain. @@ -33,6 +33,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
33 "cooperation_project_publish_time", 33 "cooperation_project_publish_time",
34 "cooperation_project_publisher", 34 "cooperation_project_publisher",
35 "cooperation_project_sponsor", 35 "cooperation_project_sponsor",
  36 + "department",
36 "cooperation_project_undertaker_type", 37 "cooperation_project_undertaker_type",
37 "org", 38 "org",
38 "company", 39 "company",
@@ -65,6 +66,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain. @@ -65,6 +66,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
65 &cooperationProject.CooperationProjectPublishTime, 66 &cooperationProject.CooperationProjectPublishTime,
66 &cooperationProject.CooperationProjectPublisher, 67 &cooperationProject.CooperationProjectPublisher,
67 &cooperationProject.CooperationProjectSponsor, 68 &cooperationProject.CooperationProjectSponsor,
  69 + &cooperationProject.Department,
68 pg.Array(&cooperationProject.CooperationProjectUndertakerType), 70 pg.Array(&cooperationProject.CooperationProjectUndertakerType),
69 &cooperationProject.Org, 71 &cooperationProject.Org,
70 &cooperationProject.Company, 72 &cooperationProject.Company,
@@ -83,6 +85,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain. @@ -83,6 +85,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
83 cooperationProject.CooperationProjectPublishTime, 85 cooperationProject.CooperationProjectPublishTime,
84 cooperationProject.CooperationProjectPublisher, 86 cooperationProject.CooperationProjectPublisher,
85 cooperationProject.CooperationProjectSponsor, 87 cooperationProject.CooperationProjectSponsor,
  88 + cooperationProject.Department,
86 pg.Array(cooperationProject.CooperationProjectUndertakerType), 89 pg.Array(cooperationProject.CooperationProjectUndertakerType),
87 cooperationProject.Org, 90 cooperationProject.Org,
88 cooperationProject.Company, 91 cooperationProject.Company,
@@ -105,6 +108,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain. @@ -105,6 +108,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
105 &cooperationProject.CooperationProjectPublishTime, 108 &cooperationProject.CooperationProjectPublishTime,
106 &cooperationProject.CooperationProjectPublisher, 109 &cooperationProject.CooperationProjectPublisher,
107 &cooperationProject.CooperationProjectSponsor, 110 &cooperationProject.CooperationProjectSponsor,
  111 + &cooperationProject.Department,
108 pg.Array(&cooperationProject.CooperationProjectUndertakerType), 112 pg.Array(&cooperationProject.CooperationProjectUndertakerType),
109 &cooperationProject.Org, 113 &cooperationProject.Org,
110 &cooperationProject.Company, 114 &cooperationProject.Company,
@@ -123,6 +127,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain. @@ -123,6 +127,7 @@ func (repository *CooperationProjectRepository) Save(cooperationProject *domain.
123 cooperationProject.CooperationProjectPublishTime, 127 cooperationProject.CooperationProjectPublishTime,
124 cooperationProject.CooperationProjectPublisher, 128 cooperationProject.CooperationProjectPublisher,
125 cooperationProject.CooperationProjectSponsor, 129 cooperationProject.CooperationProjectSponsor,
  130 + cooperationProject.Department,
126 pg.Array(cooperationProject.CooperationProjectUndertakerType), 131 pg.Array(cooperationProject.CooperationProjectUndertakerType),
127 cooperationProject.Org, 132 cooperationProject.Org,
128 cooperationProject.Company, 133 cooperationProject.Company,