作者 tangxuhui

数据结构适配调整

@@ -5,47 +5,19 @@ import ( @@ -5,47 +5,19 @@ import (
5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" 5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
6 ) 6 )
7 7
8 -//合约模式  
9 -type CooperationMode struct {  
10 - CooperationModeId int `json:"cooperationModeId,string"`  
11 - CooperationModeName string `json:"cooperationModeName"`  
12 - CooperationModeNumber string `json:"cooperationModeNumber"`  
13 -}  
14 -  
15 -//部门  
16 -type Department struct {  
17 - DepartmentNumber string `json:"departmentNumber"`  
18 - DepartmentId int `json:"departmentId,string,"`  
19 - DepartmentName string `json:"departmentName"`  
20 -}  
21 -  
22 -//用户  
23 -type UserInfo struct {  
24 - UsersName string `json:"usersName"`  
25 - Phone string `json:"phone"`  
26 - UsersId int `json:"userId,string"`  
27 -}  
28 -  
29 -//公司  
30 -type CompanyData struct {  
31 - CompanyID int `json:"companyId"`  
32 - CompanyLogo string `json:"companyLogo"`  
33 - CompanyName string `json:"companyName"`  
34 -}  
35 -  
36 //CooperationProjectItem 返回共创项目列表项 8 //CooperationProjectItem 返回共创项目列表项
37 type CooperationProjectItem struct { 9 type CooperationProjectItem struct {
38 - CooperationMode CooperationMode `json:"cooperationMode"` //项目模式  
39 - CooperationProjectID int `json:"cooperationProjectId,string,"` //id  
40 - CooperationProjectName string `json:"cooperationProjectName"` //共创项目名称  
41 - CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号  
42 - CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //承接对象  
43 - Department Department `json:"department"` //项目发起部门  
44 - Status int `json:"status"` //项目状态  
45 - CooperationProjectPublishTime int `json:"cooperationProjectPublishTime"` 10 + CooperationMode domain.CooperationMode `json:"cooperationMode"` //项目模式
  11 + CooperationProjectID int `json:"cooperationProjectId,string,"` //id
  12 + CooperationProjectName string `json:"cooperationProjectName"` //共创项目名称
  13 + CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号
  14 + CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //承接对象
  15 + Department domain.Department `json:"department"` //项目发起部门
  16 + Status int `json:"status"` //项目状态
  17 + CooperationProjectPublishTime int `json:"cooperationProjectPublishTime"`
46 CooperationProjectSponsor struct { 18 CooperationProjectSponsor struct {
47 - UsersId int `json:"usersId"`  
48 - UserInfo UserInfo `json:"UserInfo"` 19 + UsersId int `json:"usersId"`
  20 + UserInfo domain.UserInfo `json:"UserInfo"`
49 } `json:"cooperationProjectSponsor"` //共创发起人 21 } `json:"cooperationProjectSponsor"` //共创发起人
50 } 22 }
51 23
@@ -69,18 +41,18 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera @@ -69,18 +41,18 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera
69 41
70 //CooperationProjectInfo 返回共创项目详情 42 //CooperationProjectInfo 返回共创项目详情
71 type CooperationProjectInfo struct { 43 type CooperationProjectInfo struct {
72 - CooperationMode CooperationMode `json:"cooperationMode"` //共创模式  
73 - CooperationProjectID int `json:"cooperationProjectId,string,"` //id  
74 - CooperationProjectName string `json:"cooperationProjectName"` //共创项目名称  
75 - CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号  
76 - CooperationProjectPublishTime int `json:"cooperationProjectPublishTime"` //共创项目发布时间  
77 - CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //承接对象  
78 - CooperationProjectDescription string `json:"cooperationProjectDescription"` //共创描述  
79 - Department Department `json:"department"` //项目发起部门  
80 - Status int `json:"status"` //项目状态 44 + CooperationMode domain.CooperationMode `json:"cooperationMode"` //共创模式
  45 + CooperationProjectID int `json:"cooperationProjectId,string,"` //id
  46 + CooperationProjectName string `json:"cooperationProjectName"` //共创项目名称
  47 + CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号
  48 + CooperationProjectPublishTime int `json:"cooperationProjectPublishTime"` //共创项目发布时间
  49 + CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //承接对象
  50 + CooperationProjectDescription string `json:"cooperationProjectDescription"` //共创描述
  51 + Department domain.Department `json:"department"` //项目发起部门
  52 + Status int `json:"status"` //项目状态
81 CooperationProjectSponsor struct { 53 CooperationProjectSponsor struct {
82 - UsersId int `json:"usersId"`  
83 - UserInfo UserInfo `json:"UserInfo"` 54 + UsersId int `json:"usersId"`
  55 + UserInfo domain.UserInfo `json:"UserInfo"`
84 } `json:"cooperationProjectSponsor"` //共创发起人 56 } `json:"cooperationProjectSponsor"` //共创发起人
85 Attachment []domain.Attachment `json:"attachment"` //图片附件 57 Attachment []domain.Attachment `json:"attachment"` //图片附件
86 } 58 }
@@ -106,11 +78,11 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera @@ -106,11 +78,11 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera
106 } 78 }
107 79
108 type CooperationApplication struct { 80 type CooperationApplication struct {
109 - Company CompanyData `json:"company"` 81 + Company domain.CompanyData `json:"company"`
110 CooperationApplicationApplicant struct { 82 CooperationApplicationApplicant struct {
111 - UserId int `json:"userId"`  
112 - UserInfo UserInfo `json:"userInfo"`  
113 - Department Department `json:"department"` //申请人部门 83 + UserId int `json:"userId"`
  84 + UserInfo domain.UserInfo `json:"userInfo"`
  85 + Department domain.Department `json:"department"` //申请人部门
114 } `json:"cooperationApplicationApplicant"` //申请人 86 } `json:"cooperationApplicationApplicant"` //申请人
115 CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件信息 87 CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件信息
116 CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //申请描述 88 CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //申请描述
@@ -40,7 +40,7 @@ func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *comman @@ -40,7 +40,7 @@ func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *comman
40 }, nil 40 }, nil
41 } 41 }
42 42
43 -// IndexStatistics TODO:企业的合约明细列表(分红预算信息) 43 +// IndexStatistics 企业的合约明细列表(分红预算信息)
44 func (srv CompanyStatisticsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (interface{}, error) { 44 func (srv CompanyStatisticsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (interface{}, error) {
45 creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( 45 creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser(
46 userMenusCommand.Operator) 46 userMenusCommand.Operator)
  1 +package domain
  2 +
  3 +//公司
  4 +type CompanyData struct {
  5 + CompanyID int `json:"companyId"`
  6 + CompanyLogo string `json:"companyLogo"`
  7 + CompanyName string `json:"companyName"`
  8 +}
  1 +package domain
  2 +
  3 +//合约模式
  4 +type CooperationMode struct {
  5 + CooperationModeId int `json:"cooperationModeId,string"`
  6 + CooperationModeName string `json:"cooperationModeName"`
  7 + CooperationModeNumber string `json:"cooperationModeNumber"`
  8 +}
  1 +package domain
  2 +
  3 +//部门
  4 +type Department struct {
  5 + DepartmentNumber string `json:"departmentNumber"`
  6 + DepartmentId int `json:"departmentId,string,"`
  7 + DepartmentName string `json:"departmentName"`
  8 +}
  1 +package domain
  2 +
  3 +//用户
  4 +type UserInfo struct {
  5 + UsersName string `json:"usersName"`
  6 + Phone string `json:"phone"`
  7 + UsersId int `json:"userId,string"`
  8 +}
@@ -11,6 +11,7 @@ type CooperationController struct { @@ -11,6 +11,7 @@ type CooperationController struct {
11 } 11 }
12 12
13 /***** CooperationApplicationsService 共创申请服务 *****/ 13 /***** CooperationApplicationsService 共创申请服务 *****/
  14 +//SearchFeedback 承接人反馈
14 func (controller *CooperationController) SearchFeedback() { 15 func (controller *CooperationController) SearchFeedback() {
15 svr := service.UndertakerFeedbackService{} 16 svr := service.UndertakerFeedbackService{}
16 cmd := &command.SearchFeedbackCommand{} 17 cmd := &command.SearchFeedbackCommand{}
@@ -24,6 +25,7 @@ func (controller *CooperationController) SearchFeedback() { @@ -24,6 +25,7 @@ func (controller *CooperationController) SearchFeedback() {
24 controller.Response(data, err) 25 controller.Response(data, err)
25 } 26 }
26 27
  28 +// SearchFeedback 创建承接人反馈
27 func (controller *CooperationController) CreateFeedback() { 29 func (controller *CooperationController) CreateFeedback() {
28 svr := service.UndertakerFeedbackService{} 30 svr := service.UndertakerFeedbackService{}
29 cmd := &command.CreateFeedbackCommand{} 31 cmd := &command.CreateFeedbackCommand{}