正在显示
13 个修改的文件
包含
197 行增加
和
191 行删除
@@ -11,15 +11,15 @@ type AuditCooperationApplicationCommand struct { | @@ -11,15 +11,15 @@ type AuditCooperationApplicationCommand struct { | ||
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | // 共创申请ID | 13 | // 共创申请ID |
14 | - CooperationApplicationId []int `json:"cooperationApplicationId,string" valid:"Required"` | ||
15 | - // 共创申请审核状态,1待审核,2已同意,3已拒绝 | 14 | + CooperationApplicationId []int `json:"cooperationApplicationId" valid:"Required"` |
15 | + // 审核动作,1同意,2拒绝 | ||
16 | CooperationApplicationStatus int `json:"cooperationApplicationStatus" valid:"Required"` | 16 | CooperationApplicationStatus int `json:"cooperationApplicationStatus" valid:"Required"` |
17 | // 共创申请审核描述 | 17 | // 共创申请审核描述 |
18 | CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription" valid:"Required"` | 18 | CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription" valid:"Required"` |
19 | } | 19 | } |
20 | 20 | ||
21 | func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) Valid(validation *validation.Validation) { | 21 | func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) Valid(validation *validation.Validation) { |
22 | - validation.SetError("CustomValid", "未实现的自定义认证") | 22 | + |
23 | } | 23 | } |
24 | 24 | ||
25 | func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) ValidateCommand() error { | 25 | func (auditCooperationApplicationCommand *AuditCooperationApplicationCommand) ValidateCommand() error { |
@@ -2,6 +2,7 @@ package command | @@ -2,6 +2,7 @@ package command | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + | ||
5 | "github.com/beego/beego/v2/core/validation" | 6 | "github.com/beego/beego/v2/core/validation" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" |
7 | ) | 8 | ) |
@@ -12,7 +13,9 @@ type CreateCooperationApplicationCommand struct { | @@ -12,7 +13,9 @@ type CreateCooperationApplicationCommand struct { | ||
12 | // 共创申请描述 | 13 | // 共创申请描述 |
13 | CooperationApplicationDescription string `json:"cooperationApplicationDescription" valid:"Required"` | 14 | CooperationApplicationDescription string `json:"cooperationApplicationDescription" valid:"Required"` |
14 | // 申请人的id | 15 | // 申请人的id |
15 | - UserId int64 `json:"userId,omitempty"` | 16 | + UserId int `json:"userId"` |
17 | + // | ||
18 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
16 | // 附件列表 | 19 | // 附件列表 |
17 | Attachment []domain.Attachment `json:"attachment"` | 20 | Attachment []domain.Attachment `json:"attachment"` |
18 | } | 21 | } |
@@ -16,7 +16,7 @@ type GetCooperationApplicationQuery struct { | @@ -16,7 +16,7 @@ type GetCooperationApplicationQuery struct { | ||
16 | } | 16 | } |
17 | 17 | ||
18 | func (getCooperationApplicationQuery *GetCooperationApplicationQuery) Valid(validation *validation.Validation) { | 18 | func (getCooperationApplicationQuery *GetCooperationApplicationQuery) Valid(validation *validation.Validation) { |
19 | - validation.SetError("CustomValid", "未实现的自定义认证") | 19 | + |
20 | } | 20 | } |
21 | 21 | ||
22 | func (getCooperationApplicationQuery *GetCooperationApplicationQuery) ValidateQuery() error { | 22 | func (getCooperationApplicationQuery *GetCooperationApplicationQuery) ValidateQuery() error { |
1 | package dto | 1 | package dto |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
4 | "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" |
5 | ) | 6 | ) |
6 | 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 | + | ||
7 | //CooperationProjectItem 返回共创项目列表项 | 29 | //CooperationProjectItem 返回共创项目列表项 |
8 | type CooperationProjectItem struct { | 30 | type CooperationProjectItem struct { |
9 | - CooperationMode struct { | ||
10 | - CooperationModeId int `json:"cooperationModeId,string"` | ||
11 | - CooperationModeName string `json:"cooperationModeName"` | ||
12 | - CooperationModeNumber string `json:"cooperationModeNumber"` | ||
13 | - } `json:"cooperationMode"` //项目模式 | ||
14 | - CooperationProjectID int `json:"cooperationProjectId,string,"` //id | ||
15 | - CooperationProjectName string `json:"cooperationProjectName"` //共创项目名称 | ||
16 | - CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号 | ||
17 | - CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //承接对象 | ||
18 | - Department struct { | ||
19 | - DepartmentNumber string `json:"departmentNumber"` | ||
20 | - DepartmentId int `json:"departmentId,string,"` | ||
21 | - DepartmentName string `json:"departmentName"` | ||
22 | - } `json:"department"` //项目发起部门 | ||
23 | - Status int `json:"status"` //项目状态 | ||
24 | - CooperationProjectPublishTime int `json:"cooperationProjectPublishTime"` | ||
25 | - CooperationProjectSponsor struct { | ||
26 | - UsersId int `json:"usersId"` | ||
27 | - UserInfo struct { | ||
28 | - UsersName string `json:"usersName"` | ||
29 | - Phone string `json:"phone"` | ||
30 | - UsersId int `json:"userId,string"` | ||
31 | - } `json:"UserInfo"` | 31 | + CooperationMode CooperationMode `json:"cooperationMode"` //项目模式 |
32 | + CooperationProjectID int `json:"cooperationProjectId,string,"` //id | ||
33 | + CooperationProjectName string `json:"cooperationProjectName"` //共创项目名称 | ||
34 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号 | ||
35 | + CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //承接对象 | ||
36 | + Department Department `json:"department"` //项目发起部门 | ||
37 | + Status int `json:"status"` //项目状态 | ||
38 | + CooperationProjectPublishTime int `json:"cooperationProjectPublishTime"` | ||
39 | + CooperationProjectSponsor struct { | ||
40 | + UsersId int `json:"usersId"` | ||
41 | + UserInfo UserInfo `json:"UserInfo"` | ||
32 | } `json:"cooperationProjectSponsor"` //共创发起人 | 42 | } `json:"cooperationProjectSponsor"` //共创发起人 |
33 | } | 43 | } |
34 | 44 | ||
@@ -52,32 +62,20 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera | @@ -52,32 +62,20 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera | ||
52 | 62 | ||
53 | //CooperationProjectInfo 返回共创项目详情 | 63 | //CooperationProjectInfo 返回共创项目详情 |
54 | type CooperationProjectInfo struct { | 64 | type CooperationProjectInfo struct { |
55 | - CooperationMode struct { | ||
56 | - CooperationModeId int `json:"cooperationModeId,string"` | ||
57 | - CooperationModeName string `json:"cooperationModeName"` | ||
58 | - CooperationModeNumber string `json:"cooperationModeNumber"` | ||
59 | - } `json:"cooperationMode"` //共创模式 | ||
60 | - CooperationProjectID int `json:"cooperationProjectId,string,"` //id | ||
61 | - CooperationProjectName string `json:"cooperationProjectName"` //共创项目名称 | ||
62 | - CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号 | ||
63 | - CooperationProjectPublishTime int `json:"cooperationProjectPublishTime"` //共创项目发布时间 | ||
64 | - CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //承接对象 | ||
65 | - CooperationProjectDescription string `json:"cooperationProjectDescription"` //共创描述 | ||
66 | - Department struct { | ||
67 | - DepartmentNumber string `json:"departmentNumber"` | ||
68 | - DepartmentId int `json:"departmentId,string,"` | ||
69 | - DepartmentName string `json:"departmentName"` | ||
70 | - } `json:"department"` //项目发起部门 | ||
71 | - Status int `json:"status"` //项目状态 | ||
72 | - CooperationProjectSponsor struct { | ||
73 | - UsersId int `json:"usersId"` | ||
74 | - UserInfo struct { | ||
75 | - UsersName string `json:"usersName"` | ||
76 | - Phone string `json:"phone"` | ||
77 | - UsersId int `json:"userId,string"` | ||
78 | - } `json:"UserInfo"` | 65 | + CooperationMode CooperationMode `json:"cooperationMode"` //共创模式 |
66 | + CooperationProjectID int `json:"cooperationProjectId,string,"` //id | ||
67 | + CooperationProjectName string `json:"cooperationProjectName"` //共创项目名称 | ||
68 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号 | ||
69 | + CooperationProjectPublishTime int `json:"cooperationProjectPublishTime"` //共创项目发布时间 | ||
70 | + CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` //承接对象 | ||
71 | + CooperationProjectDescription string `json:"cooperationProjectDescription"` //共创描述 | ||
72 | + Department Department `json:"department"` //项目发起部门 | ||
73 | + Status int `json:"status"` //项目状态 | ||
74 | + CooperationProjectSponsor struct { | ||
75 | + UsersId int `json:"usersId"` | ||
76 | + UserInfo UserInfo `json:"UserInfo"` | ||
79 | } `json:"cooperationProjectSponsor"` //共创发起人 | 77 | } `json:"cooperationProjectSponsor"` //共创发起人 |
80 | - Attachment []allied_creation_cooperation.ProjectAttachment `json:"attachment"` //图片附件 | 78 | + Attachment []domain.Attachment `json:"attachment"` //图片附件 |
81 | } | 79 | } |
82 | 80 | ||
83 | func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo { | 81 | func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo { |
@@ -100,3 +98,44 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera | @@ -100,3 +98,44 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera | ||
100 | 98 | ||
101 | return &data | 99 | return &data |
102 | } | 100 | } |
101 | + | ||
102 | +type CooperationApplication struct { | ||
103 | + CooperationApplicationApplicant struct { | ||
104 | + UserId int `json:"userId"` | ||
105 | + UserInfo UserInfo `json:"userInfo"` | ||
106 | + Department Department `json:"department"` //申请人部门 | ||
107 | + } `json:"cooperationApplicationApplicant"` //申请人 | ||
108 | + CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件信息 | ||
109 | + CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //申请描述 | ||
110 | + CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //审核描述 | ||
111 | + CooperationApplicationId int `json:"cooperationApplicationId"` //申请id | ||
112 | + CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //审核状态 | ||
113 | + CooperationApplicationVerifyTime int `json:"cooperationApplicationVerifyTime"` //审核的时间 | ||
114 | + CooperationProjectId int `json:"cooperationProjectId"` //项目id | ||
115 | + CooperationProjectName string `json:"cooperationProjectName"` | ||
116 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
117 | +} | ||
118 | + | ||
119 | +func ToCooperationApplication(applicationParam *allied_creation_cooperation.CooperationApplication) *CooperationApplication { | ||
120 | + data := CooperationApplication{ | ||
121 | + CooperationApplicationAttachment: applicationParam.CooperationApplicationAttachment, //附件信息 | ||
122 | + CooperationApplicationDescription: applicationParam.CooperationApplicationDescription, | ||
123 | + CooperationApplicationId: applicationParam.CooperationApplicationID, | ||
124 | + CooperationApplicationStatus: applicationParam.CooperationApplicationStatus, //共创申请审核状态,1待审核,2已同意,3已拒绝 | ||
125 | + CooperationApplicationVerifyTime: int(applicationParam.CooperationApplicationVerifyTime.Unix()), //审核的时间 | ||
126 | + CooperationProjectId: applicationParam.CooperationProject.CooperationProjectID, | ||
127 | + CooperationProjectName: applicationParam.CooperationProject.CooperationProjectName, | ||
128 | + CooperationProjectNumber: applicationParam.CooperationProject.CooperationProjectNumber, | ||
129 | + CooperationApplicationVerifyDescription: applicationParam.CooperationApplicationVerifyDescription, | ||
130 | + } | ||
131 | + | ||
132 | + data.CooperationApplicationApplicant.UserId = applicationParam.CooperationApplicationApplicant.UserID | ||
133 | + data.CooperationApplicationApplicant.UserInfo.Phone = applicationParam.CooperationApplicationApplicant.UserInfo.UserPhone | ||
134 | + data.CooperationApplicationApplicant.UserInfo.UsersName = applicationParam.CooperationApplicationApplicant.UserInfo.UserName | ||
135 | + data.CooperationApplicationApplicant.UserInfo.UsersId = applicationParam.CooperationApplicationApplicant.UserID | ||
136 | + data.CooperationApplicationApplicant.Department.DepartmentId = applicationParam.CooperationApplicationApplicant.Department.DepartmentID | ||
137 | + data.CooperationApplicationApplicant.Department.DepartmentName = applicationParam.CooperationApplicationApplicant.Department.DepartmentName | ||
138 | + data.CooperationApplicationApplicant.Department.DepartmentNumber = applicationParam.CooperationApplicationApplicant.Department.DepartmentNumber | ||
139 | + return &data | ||
140 | + | ||
141 | +} |
1 | package service | 1 | package service |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | + "strconv" | ||
5 | + | ||
4 | "github.com/linmadan/egglib-go/core/application" | 6 | "github.com/linmadan/egglib-go/core/application" |
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" |
8 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto" | ||
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
7 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | ||
8 | ) | 10 | ) |
9 | 11 | ||
10 | // CooperationApplicationsService 共创申请服务 | 12 | // CooperationApplicationsService 共创申请服务 |
@@ -13,41 +15,45 @@ type CooperationApplicationsService struct { | @@ -13,41 +15,45 @@ type CooperationApplicationsService struct { | ||
13 | 15 | ||
14 | /***** 企业端 *****/ | 16 | /***** 企业端 *****/ |
15 | 17 | ||
16 | -// GetCooperationApplications TODO:企业获取共创申请详情 | ||
17 | -func (srv CooperationApplicationsService) GetCooperationApplications(userMenusCommand *command.GetCooperationApplicationQuery) (interface{}, error) { | ||
18 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
19 | - userMenusCommand.Operator) | ||
20 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
21 | - UserId: int(userMenusCommand.Operator.UserId), | 18 | +// GetCooperationApplications 企业获取共创申请详情 |
19 | +func (srv CooperationApplicationsService) GetCooperationApplications(applicationQuery *command.GetCooperationApplicationQuery) (interface{}, error) { | ||
20 | + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
21 | + applicationQuery.Operator) | ||
22 | + result, err := creationCooperationGateway.CooperationApplicationGet(allied_creation_cooperation.ReqCooperationApplicationGet{ | ||
23 | + CooperationApplicationId: applicationQuery.CooperationApplicationId, | ||
22 | }) | 24 | }) |
23 | if err != nil { | 25 | if err != nil { |
24 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 26 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
25 | } | 27 | } |
26 | - return map[string]interface{}{ | ||
27 | - "accessMenus": resultMenu.Menus, | ||
28 | - }, nil | 28 | + data := dto.ToCooperationApplication(&result.CooperationApplication) |
29 | + return data, nil | ||
29 | } | 30 | } |
30 | 31 | ||
31 | -// GetCooperationApplications TODO:企业审核共创申请 | ||
32 | -func (srv CooperationApplicationsService) AuditCooperationApplications(userMenusCommand *command.AuditCooperationApplicationCommand) (interface{}, error) { | ||
33 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
34 | - userMenusCommand.Operator) | ||
35 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
36 | - UserId: int(userMenusCommand.Operator.UserId), | 32 | +// AuditCooperationApplications 企业审核共创申请 |
33 | +func (srv CooperationApplicationsService) AuditCooperationApplications(auditCommand *command.AuditCooperationApplicationCommand) (interface{}, error) { | ||
34 | + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
35 | + auditCommand.Operator) | ||
36 | + applicationIds := []string{} | ||
37 | + for _, v := range auditCommand.CooperationApplicationId { | ||
38 | + idStr := strconv.Itoa(v) | ||
39 | + applicationIds = append(applicationIds, idStr) | ||
40 | + } | ||
41 | + _, err := creationCooperationGateway.CooperationApplicationsBatchApproval(allied_creation_cooperation.ReqCooperationApplicationBatchApproval{ | ||
42 | + CooperationApplicationIds: applicationIds, | ||
43 | + CooperationApplicationDescription: auditCommand.CooperationApplicationVerifyDescription, | ||
44 | + Action: auditCommand.CooperationApplicationStatus, | ||
37 | }) | 45 | }) |
38 | if err != nil { | 46 | if err != nil { |
39 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 47 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
40 | } | 48 | } |
41 | - return map[string]interface{}{ | ||
42 | - "accessMenus": resultMenu.Menus, | ||
43 | - }, nil | 49 | + return auditCommand, nil |
44 | } | 50 | } |
45 | 51 | ||
46 | -// GetCooperationApplications TODO:企业获取共创申请列表 | 52 | +// SearchCooperationApplications 企业获取共创申请列表 |
47 | func (srv CooperationApplicationsService) SearchCooperationApplications(applicationQuery *command.ListCooperationApplicationQuery) (interface{}, error) { | 53 | func (srv CooperationApplicationsService) SearchCooperationApplications(applicationQuery *command.ListCooperationApplicationQuery) (interface{}, error) { |
48 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 54 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
49 | applicationQuery.Operator) | 55 | applicationQuery.Operator) |
50 | - resultMenu, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{ | 56 | + resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{ |
51 | PageNumber: applicationQuery.PageNumber, | 57 | PageNumber: applicationQuery.PageNumber, |
52 | PageSize: applicationQuery.PageSize, | 58 | PageSize: applicationQuery.PageSize, |
53 | CompanyId: int(applicationQuery.Operator.CompanyId), | 59 | CompanyId: int(applicationQuery.Operator.CompanyId), |
@@ -56,67 +62,45 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat | @@ -56,67 +62,45 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat | ||
56 | if err != nil { | 62 | if err != nil { |
57 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 63 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
58 | } | 64 | } |
59 | - return resultMenu, nil | 65 | + return resultApplications, nil |
60 | } | 66 | } |
61 | 67 | ||
62 | /***** 共创用户端 *****/ | 68 | /***** 共创用户端 *****/ |
63 | 69 | ||
64 | -// GetCooperationApplications TODO:创建共创申请管理 | ||
65 | -func (srv CooperationApplicationsService) CreateCooperationApplications(userMenusCommand *command.CreateCooperationApplicationCommand) (interface{}, error) { | ||
66 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
67 | - userMenusCommand.Operator) | ||
68 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
69 | - UserId: int(userMenusCommand.Operator.UserId), | 70 | +// CreateCooperationApplications 创建共创申请管理 |
71 | +func (srv CooperationApplicationsService) CreateCooperationApplications(createApplicationsCommand *command.CreateCooperationApplicationCommand) (interface{}, error) { | ||
72 | + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
73 | + createApplicationsCommand.Operator) | ||
74 | + result, err := creationCooperationGateway.CooperationApplicationAdd(allied_creation_cooperation.ReqCooperationApplicationAdd{ | ||
75 | + ApplicantUid: strconv.Itoa(createApplicationsCommand.UserId), | ||
76 | + CooperationApplicationDescription: createApplicationsCommand.CooperationApplicationDescription, | ||
77 | + CooperationApplicationAttachment: createApplicationsCommand.Attachment, | ||
78 | + CooperationProjectNumber: createApplicationsCommand.CooperationProjectNumber, | ||
70 | }) | 79 | }) |
71 | if err != nil { | 80 | if err != nil { |
72 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 81 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
73 | } | 82 | } |
74 | - return map[string]interface{}{ | ||
75 | - "accessMenus": resultMenu.Menus, | ||
76 | - }, nil | 83 | + data := struct { |
84 | + CooperationApplicationId int `json:"cooperationApplicationId"` | ||
85 | + command.CreateCooperationApplicationCommand | ||
86 | + }{ | ||
87 | + CooperationApplicationId: result.CooperationApplicationId, | ||
88 | + CreateCooperationApplicationCommand: *createApplicationsCommand, | ||
89 | + } | ||
90 | + return data, err | ||
77 | } | 91 | } |
78 | 92 | ||
79 | -//PersonGetCooperationApplications TODO:共创用户获取共创申请详情 | 93 | +//PersonGetCooperationApplications 共创用户获取共创申请详情 |
80 | func (srv CooperationApplicationsService) PersonGetCooperationApplications(userMenusCommand *command.GetCooperationApplicationQuery) (interface{}, error) { | 94 | func (srv CooperationApplicationsService) PersonGetCooperationApplications(userMenusCommand *command.GetCooperationApplicationQuery) (interface{}, error) { |
81 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
82 | - userMenusCommand.Operator) | ||
83 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
84 | - UserId: int(userMenusCommand.Operator.UserId), | ||
85 | - }) | ||
86 | - if err != nil { | ||
87 | - return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
88 | - } | ||
89 | - return map[string]interface{}{ | ||
90 | - "accessMenus": resultMenu.Menus, | ||
91 | - }, nil | 95 | + return nil, nil |
92 | } | 96 | } |
93 | 97 | ||
94 | -// GetCooperationApplications TODO:共创用户取消共创申请 | 98 | +// PersonCancelCooperationApplications 共创用户取消共创申请 |
95 | func (srv CooperationApplicationsService) PersonCancelCooperationApplications(userMenusCommand *command.CancelCooperationApplicationCommand) (interface{}, error) { | 99 | func (srv CooperationApplicationsService) PersonCancelCooperationApplications(userMenusCommand *command.CancelCooperationApplicationCommand) (interface{}, error) { |
96 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
97 | - userMenusCommand.Operator) | ||
98 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
99 | - UserId: int(userMenusCommand.Operator.UserId), | ||
100 | - }) | ||
101 | - if err != nil { | ||
102 | - return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
103 | - } | ||
104 | - return map[string]interface{}{ | ||
105 | - "accessMenus": resultMenu.Menus, | ||
106 | - }, nil | 100 | + return nil, nil |
107 | } | 101 | } |
108 | 102 | ||
109 | -// GetCooperationApplications TODO:共创用户获取共创申请列表 | 103 | +// PersonSearchCooperationApplications 共创用户获取共创申请列表 |
110 | func (srv CooperationApplicationsService) PersonSearchCooperationApplications(userMenusCommand *command.ListCooperationApplicationQuery) (interface{}, error) { | 104 | func (srv CooperationApplicationsService) PersonSearchCooperationApplications(userMenusCommand *command.ListCooperationApplicationQuery) (interface{}, error) { |
111 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
112 | - userMenusCommand.Operator) | ||
113 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
114 | - UserId: int(userMenusCommand.Operator.UserId), | ||
115 | - }) | ||
116 | - if err != nil { | ||
117 | - return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
118 | - } | ||
119 | - return map[string]interface{}{ | ||
120 | - "accessMenus": resultMenu.Menus, | ||
121 | - }, nil | 105 | + return nil, nil |
122 | } | 106 | } |
@@ -6,6 +6,7 @@ import ( | @@ -6,6 +6,7 @@ import ( | ||
6 | "github.com/linmadan/egglib-go/core/application" | 6 | "github.com/linmadan/egglib-go/core/application" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" |
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/dto" |
9 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 10 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
10 | ) | 11 | ) |
11 | 12 | ||
@@ -19,9 +20,9 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP | @@ -19,9 +20,9 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP | ||
19 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | 20 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) |
20 | } | 21 | } |
21 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator) | 22 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator) |
22 | - var images []allied_creation_cooperation.ProjectAttachment | 23 | + var images []domain.Attachment |
23 | for _, v := range createCooperationProjectCommand.Images { | 24 | for _, v := range createCooperationProjectCommand.Images { |
24 | - images = append(images, allied_creation_cooperation.ProjectAttachment{ | 25 | + images = append(images, domain.Attachment{ |
25 | Url: v, | 26 | Url: v, |
26 | }) | 27 | }) |
27 | } | 28 | } |
@@ -64,9 +65,9 @@ func (srv CooperationProjectService) GetCooperationProject(projectQuery *command | @@ -64,9 +65,9 @@ func (srv CooperationProjectService) GetCooperationProject(projectQuery *command | ||
64 | // UpdateCooperationProject | 65 | // UpdateCooperationProject |
65 | func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationProjectCommand *command.UpdateCooperationProjectCommand) (interface{}, error) { | 66 | func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationProjectCommand *command.UpdateCooperationProjectCommand) (interface{}, error) { |
66 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) | 67 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) |
67 | - var images []allied_creation_cooperation.ProjectAttachment | 68 | + var images []domain.Attachment |
68 | for _, v := range updateCooperationProjectCommand.Images { | 69 | for _, v := range updateCooperationProjectCommand.Images { |
69 | - images = append(images, allied_creation_cooperation.ProjectAttachment{ | 70 | + images = append(images, domain.Attachment{ |
70 | Url: v, | 71 | Url: v, |
71 | }) | 72 | }) |
72 | } | 73 | } |
@@ -3,6 +3,7 @@ package dto | @@ -3,6 +3,7 @@ package dto | ||
3 | import ( | 3 | import ( |
4 | "time" | 4 | "time" |
5 | 5 | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
7 | ) | 8 | ) |
8 | 9 | ||
@@ -18,18 +19,13 @@ type CooperationApplicationItem struct { | @@ -18,18 +19,13 @@ type CooperationApplicationItem struct { | ||
18 | DepartmentName string `json:"departmentName"` //申请人部门 | 19 | DepartmentName string `json:"departmentName"` //申请人部门 |
19 | Phone string `json:"userPhone"` //申请人电话 | 20 | Phone string `json:"userPhone"` //申请人电话 |
20 | } `json:"cooperationApplicationApplicant"` | 21 | } `json:"cooperationApplicationApplicant"` |
21 | - CooperationApplicationAttachment []struct { | ||
22 | - FileSize float64 `json:"fileSize"` | ||
23 | - FileType string `json:"fileType"` | ||
24 | - Name string `json:"name"` | ||
25 | - URL string `json:"url"` | ||
26 | - } `json:"cooperationApplicationAttachment"` //附件 | ||
27 | - CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述 | ||
28 | - CooperationApplicationID int `json:"cooperationApplicationId"` //id | ||
29 | - IsCanceled bool `json:"isCanceled"` //是否取消 | ||
30 | - CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //审核描述 | ||
31 | - CooperationApplicationVerifyTime time.Time `json:"cooperationApplicationVerifyTime"` //审核时间 | ||
32 | - CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //申请状态 | 22 | + CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件 |
23 | + CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述 | ||
24 | + CooperationApplicationID int `json:"cooperationApplicationId"` //id | ||
25 | + IsCanceled bool `json:"isCanceled"` //是否取消 | ||
26 | + CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //审核描述 | ||
27 | + CooperationApplicationVerifyTime time.Time `json:"cooperationApplicationVerifyTime"` //审核时间 | ||
28 | + CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //申请状态 | ||
33 | Org struct { | 29 | Org struct { |
34 | OrgID int `json:"orgId"` | 30 | OrgID int `json:"orgId"` |
35 | OrgName string `json:"orgName"` | 31 | OrgName string `json:"orgName"` |
@@ -74,18 +70,13 @@ type CooperationApplicationInfo struct { | @@ -74,18 +70,13 @@ type CooperationApplicationInfo struct { | ||
74 | DepartmentName string `json:"departmentName"` //申请人部门 | 70 | DepartmentName string `json:"departmentName"` //申请人部门 |
75 | Phone string `json:"userPhone"` //申请人电话 | 71 | Phone string `json:"userPhone"` //申请人电话 |
76 | } `json:"cooperationApplicationApplicant"` | 72 | } `json:"cooperationApplicationApplicant"` |
77 | - CooperationApplicationAttachment []struct { | ||
78 | - FileSize float64 `json:"fileSize"` | ||
79 | - FileType string `json:"fileType"` | ||
80 | - Name string `json:"name"` | ||
81 | - URL string `json:"url"` | ||
82 | - } `json:"cooperationApplicationAttachment"` //附件 | ||
83 | - CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述 | ||
84 | - CooperationApplicationID int `json:"cooperationApplicationId"` //id | ||
85 | - IsCanceled bool `json:"isCanceled"` //是否取消 | ||
86 | - CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //审核描述 | ||
87 | - CooperationApplicationVerifyTime time.Time `json:"cooperationApplicationVerifyTime"` //审核时间 | ||
88 | - CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //申请状态 | 73 | + CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件 |
74 | + CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述 | ||
75 | + CooperationApplicationID int `json:"cooperationApplicationId"` //id | ||
76 | + IsCanceled bool `json:"isCanceled"` //是否取消 | ||
77 | + CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //审核描述 | ||
78 | + CooperationApplicationVerifyTime time.Time `json:"cooperationApplicationVerifyTime"` //审核时间 | ||
79 | + CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //申请状态 | ||
89 | Org struct { | 80 | Org struct { |
90 | OrgID int `json:"orgId"` | 81 | OrgID int `json:"orgId"` |
91 | OrgName string `json:"orgName"` | 82 | OrgName string `json:"orgName"` |
@@ -3,6 +3,7 @@ package dto | @@ -3,6 +3,7 @@ package dto | ||
3 | import ( | 3 | import ( |
4 | "time" | 4 | "time" |
5 | 5 | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
7 | ) | 8 | ) |
8 | 9 | ||
@@ -21,13 +22,13 @@ type CooperationProjectInfo struct { | @@ -21,13 +22,13 @@ type CooperationProjectInfo struct { | ||
21 | CooperationModeName string `json:"cooperationModeName"` | 22 | CooperationModeName string `json:"cooperationModeName"` |
22 | CooperationModeNumber string `json:"cooperationModeNumber"` | 23 | CooperationModeNumber string `json:"cooperationModeNumber"` |
23 | } `json:"cooperationMode"` //项目模式 | 24 | } `json:"cooperationMode"` //项目模式 |
24 | - CooperationProjectDescription string `json:"cooperationProjectDescription"` | ||
25 | - Attachment []allied_creation_cooperation.ProjectAttachment `json:"attachment"` //图片附件 | ||
26 | - CooperationProjectId int `json:"cooperationProjectId,string,"` | ||
27 | - CooperationProjectName string `json:"cooperationProjectName"` | ||
28 | - CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
29 | - CooperationProjectPublishTime time.Time `json:"cooperationProjectPublishTime"` | ||
30 | - CreatedAt time.Time `json:"createdAt"` | 25 | + CooperationProjectDescription string `json:"cooperationProjectDescription"` |
26 | + Attachment []domain.Attachment `json:"attachment"` //图片附件 | ||
27 | + CooperationProjectId int `json:"cooperationProjectId,string,"` | ||
28 | + CooperationProjectName string `json:"cooperationProjectName"` | ||
29 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
30 | + CooperationProjectPublishTime time.Time `json:"cooperationProjectPublishTime"` | ||
31 | + CreatedAt time.Time `json:"createdAt"` | ||
31 | CooperationProjectSponsor struct { | 32 | CooperationProjectSponsor struct { |
32 | UsersId int `json:"usersId"` | 33 | UsersId int `json:"usersId"` |
33 | UsersName string `json:"usersName"` | 34 | UsersName string `json:"usersName"` |
@@ -100,16 +101,11 @@ type CooperationApplicationItem struct { | @@ -100,16 +101,11 @@ type CooperationApplicationItem struct { | ||
100 | } `json:"userInfo"` | 101 | } `json:"userInfo"` |
101 | UserType int `json:"userType"` | 102 | UserType int `json:"userType"` |
102 | } `json:"cooperationApplicationApplicant"` //申请人 | 103 | } `json:"cooperationApplicationApplicant"` //申请人 |
103 | - CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述 | ||
104 | - CooperationApplicationID int `json:"cooperationApplicationId"` //申请id | ||
105 | - CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //状态 | ||
106 | - CooperationApplyTime int `json:"cooperationApplyTime"` //申请时间 | ||
107 | - CooperationApplicationAttachment []struct { | ||
108 | - FileSize float64 `json:"fileSize"` | ||
109 | - FileType string `json:"fileType"` | ||
110 | - Name string `json:"name"` | ||
111 | - URL string `json:"url"` | ||
112 | - } `json:"cooperationApplicationAttachment"` //附件 | 104 | + CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述 |
105 | + CooperationApplicationID int `json:"cooperationApplicationId"` //申请id | ||
106 | + CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //状态 | ||
107 | + CooperationApplyTime int `json:"cooperationApplyTime"` //申请时间 | ||
108 | + CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件 | ||
113 | } | 109 | } |
114 | 110 | ||
115 | func ToCooperationApplicationItem(param *allied_creation_cooperation.CooperationApplication) *CooperationApplicationItem { | 111 | func ToCooperationApplicationItem(param *allied_creation_cooperation.CooperationApplication) *CooperationApplicationItem { |
@@ -4,6 +4,7 @@ import ( | @@ -4,6 +4,7 @@ import ( | ||
4 | "strconv" | 4 | "strconv" |
5 | 5 | ||
6 | "github.com/linmadan/egglib-go/core/application" | 6 | "github.com/linmadan/egglib-go/core/application" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/command" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/command" |
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/dto" | 9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/dto" |
9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/query" | 10 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/query" |
@@ -21,9 +22,9 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro | @@ -21,9 +22,9 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro | ||
21 | } | 22 | } |
22 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator) | 23 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createCooperationProjectCommand.Operator) |
23 | 24 | ||
24 | - var images []allied_creation_cooperation.ProjectAttachment | 25 | + var images []domain.Attachment |
25 | for _, v := range createCooperationProjectCommand.Images { | 26 | for _, v := range createCooperationProjectCommand.Images { |
26 | - images = append(images, allied_creation_cooperation.ProjectAttachment{ | 27 | + images = append(images, domain.Attachment{ |
27 | Url: v, | 28 | Url: v, |
28 | }) | 29 | }) |
29 | } | 30 | } |
@@ -133,9 +134,9 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro | @@ -133,9 +134,9 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro | ||
133 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | 134 | return nil, application.ThrowError(application.ARG_ERROR, err.Error()) |
134 | } | 135 | } |
135 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) | 136 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationProjectCommand.Operator) |
136 | - var images []allied_creation_cooperation.ProjectAttachment | 137 | + var images []domain.Attachment |
137 | for _, v := range updateCooperationProjectCommand.Images { | 138 | for _, v := range updateCooperationProjectCommand.Images { |
138 | - images = append(images, allied_creation_cooperation.ProjectAttachment{ | 139 | + images = append(images, domain.Attachment{ |
139 | Url: v, | 140 | Url: v, |
140 | }) | 141 | }) |
141 | } | 142 | } |
@@ -39,15 +39,10 @@ type CooperationApplication struct { | @@ -39,15 +39,10 @@ type CooperationApplication struct { | ||
39 | } `json:"userInfo"` | 39 | } `json:"userInfo"` |
40 | UserType int `json:"userType"` | 40 | UserType int `json:"userType"` |
41 | } `json:"cooperationApplicationApplicant"` | 41 | } `json:"cooperationApplicationApplicant"` |
42 | - CooperationApplicationAttachment []struct { | ||
43 | - FileSize float64 `json:"fileSize"` | ||
44 | - FileType string `json:"fileType"` | ||
45 | - Name string `json:"name"` | ||
46 | - URL string `json:"url"` | ||
47 | - } `json:"cooperationApplicationAttachment"` | ||
48 | - CooperationApplicationDescription string `json:"cooperationApplicationDescription"` | ||
49 | - CooperationApplicationID int `json:"cooperationApplicationId"` | ||
50 | - CooperationApplicationStatus int `json:"cooperationApplicationStatus"` | 42 | + CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` |
43 | + CooperationApplicationDescription string `json:"cooperationApplicationDescription"` | ||
44 | + CooperationApplicationID int `json:"cooperationApplicationId"` | ||
45 | + CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //共创申请审核状态,1待审核,2已同意,3已拒绝 | ||
51 | CooperationApplicationVerifier struct { | 46 | CooperationApplicationVerifier struct { |
52 | Company struct { | 47 | Company struct { |
53 | CompanyID int `json:"companyId"` | 48 | CompanyID int `json:"companyId"` |
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | -import "time" | ||
4 | - | ||
5 | -type ProjectAttachment struct { | ||
6 | - FileType string `json:"fileType"` | ||
7 | - Name string `json:"name"` | ||
8 | - Url string `json:"url"` | ||
9 | - FileSize int `json:"fileSize"` | ||
10 | -} //图片附件 | 3 | +import ( |
4 | + "time" | ||
5 | + | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
7 | +) | ||
8 | + | ||
11 | type CooperationProject struct { | 9 | type CooperationProject struct { |
12 | Company struct { | 10 | Company struct { |
13 | CompanyId int `json:"companyId,string,"` | 11 | CompanyId int `json:"companyId,string,"` |
@@ -24,7 +22,7 @@ type CooperationProject struct { | @@ -24,7 +22,7 @@ type CooperationProject struct { | ||
24 | CooperationModeNumber string `json:"cooperationModeNumber"` | 22 | CooperationModeNumber string `json:"cooperationModeNumber"` |
25 | } `json:"cooperationMode"` //项目模式 | 23 | } `json:"cooperationMode"` //项目模式 |
26 | CooperationProjectDescription string `json:"cooperationProjectDescription"` | 24 | CooperationProjectDescription string `json:"cooperationProjectDescription"` |
27 | - Attachment []ProjectAttachment `json:"attachment"` | 25 | + Attachment []domain.Attachment `json:"attachment"` |
28 | CooperationProjectId int `json:"cooperationProjectId,string,"` | 26 | CooperationProjectId int `json:"cooperationProjectId,string,"` |
29 | CooperationProjectName string `json:"cooperationProjectName"` | 27 | CooperationProjectName string `json:"cooperationProjectName"` |
30 | CooperationProjectNumber string `json:"cooperationProjectNumber"` | 28 | CooperationProjectNumber string `json:"cooperationProjectNumber"` |
@@ -67,7 +65,7 @@ type ( | @@ -67,7 +65,7 @@ type ( | ||
67 | SponsorUid int `json:"sponsorUid,string"` | 65 | SponsorUid int `json:"sponsorUid,string"` |
68 | DepartmentId int `json:"departmentId,string"` | 66 | DepartmentId int `json:"departmentId,string"` |
69 | CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` | 67 | CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` |
70 | - Attachment []ProjectAttachment `json:"attachment"` | 68 | + Attachment []domain.Attachment `json:"attachment"` |
71 | } | 69 | } |
72 | 70 | ||
73 | DataCooperationProjectAdd struct { | 71 | DataCooperationProjectAdd struct { |
@@ -111,7 +109,7 @@ type ( | @@ -111,7 +109,7 @@ type ( | ||
111 | PublisherUid string `json:"publisherUid"` | 109 | PublisherUid string `json:"publisherUid"` |
112 | // 共创项目描述 | 110 | // 共创项目描述 |
113 | CooperationProjectDescription string `json:"cooperationProjectDescription"` | 111 | CooperationProjectDescription string `json:"cooperationProjectDescription"` |
114 | - Attachment []ProjectAttachment `json:"attachment"` | 112 | + Attachment []domain.Attachment `json:"attachment"` |
115 | } | 113 | } |
116 | 114 | ||
117 | DataCooperationProjectUpdate struct { | 115 | DataCooperationProjectUpdate struct { |
-
请 注册 或 登录 后发表评论