作者 yangfu

登录修改

@@ -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 +
  29 +//公司
  30 +type CompanyData struct {
  31 + CompanyID int `json:"companyId"`
  32 + CompanyLogo string `json:"companyLogo"`
  33 + CompanyName string `json:"companyName"`
  34 +}
  35 +
7 //CooperationProjectItem 返回共创项目列表项 36 //CooperationProjectItem 返回共创项目列表项
8 type CooperationProjectItem struct { 37 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"` 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"`
  46 + CooperationProjectSponsor struct {
  47 + UsersId int `json:"usersId"`
  48 + UserInfo UserInfo `json:"UserInfo"`
32 } `json:"cooperationProjectSponsor"` //共创发起人 49 } `json:"cooperationProjectSponsor"` //共创发起人
33 } 50 }
34 51
@@ -52,32 +69,20 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera @@ -52,32 +69,20 @@ func ToCooperationProjectItem(projecetParam *allied_creation_cooperation.Coopera
52 69
53 //CooperationProjectInfo 返回共创项目详情 70 //CooperationProjectInfo 返回共创项目详情
54 type CooperationProjectInfo struct { 71 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"` 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"` //项目状态
  81 + CooperationProjectSponsor struct {
  82 + UsersId int `json:"usersId"`
  83 + UserInfo UserInfo `json:"UserInfo"`
79 } `json:"cooperationProjectSponsor"` //共创发起人 84 } `json:"cooperationProjectSponsor"` //共创发起人
80 - Attachment []allied_creation_cooperation.ProjectAttachment `json:"attachment"` //图片附件 85 + Attachment []domain.Attachment `json:"attachment"` //图片附件
81 } 86 }
82 87
83 func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo { 88 func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo {
@@ -97,6 +102,47 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera @@ -97,6 +102,47 @@ func ToCooperationProjectInfo(projecetParam *allied_creation_cooperation.Coopera
97 data.CooperationProjectSponsor.UserInfo.UsersId = projecetParam.CooperationProjectSponsor.UsersId 102 data.CooperationProjectSponsor.UserInfo.UsersId = projecetParam.CooperationProjectSponsor.UsersId
98 data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.Phone 103 data.CooperationProjectSponsor.UserInfo.Phone = projecetParam.CooperationProjectSponsor.UserInfo.Phone
99 data.CooperationProjectSponsor.UserInfo.UsersName = projecetParam.CooperationProjectSponsor.UserInfo.UsersName 104 data.CooperationProjectSponsor.UserInfo.UsersName = projecetParam.CooperationProjectSponsor.UserInfo.UsersName
  105 + return &data
  106 +}
100 107
  108 +type CooperationApplication struct {
  109 + Company CompanyData `json:"company"`
  110 + CooperationApplicationApplicant struct {
  111 + UserId int `json:"userId"`
  112 + UserInfo UserInfo `json:"userInfo"`
  113 + Department Department `json:"department"` //申请人部门
  114 + } `json:"cooperationApplicationApplicant"` //申请人
  115 + CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件信息
  116 + CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //申请描述
  117 + CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //审核描述
  118 + CooperationApplicationId int `json:"cooperationApplicationId"` //申请id
  119 + CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //审核状态
  120 + CooperationApplicationVerifyTime int `json:"cooperationApplicationVerifyTime"` //审核的时间
  121 + CooperationProjectId int `json:"cooperationProjectId"` //项目id
  122 + CooperationProjectName string `json:"cooperationProjectName"`
  123 + CooperationProjectNumber string `json:"cooperationProjectNumber"`
  124 +}
  125 +
  126 +func ToCooperationApplication(applicationParam *allied_creation_cooperation.CooperationApplication) *CooperationApplication {
  127 + data := CooperationApplication{
  128 + CooperationApplicationAttachment: applicationParam.CooperationApplicationAttachment, //附件信息
  129 + CooperationApplicationDescription: applicationParam.CooperationApplicationDescription,
  130 + CooperationApplicationId: applicationParam.CooperationApplicationID,
  131 + CooperationApplicationStatus: applicationParam.CooperationApplicationStatus, //共创申请审核状态,1待审核,2已同意,3已拒绝
  132 + CooperationApplicationVerifyTime: int(applicationParam.CooperationApplicationVerifyTime.Unix()), //审核的时间
  133 + CooperationProjectId: applicationParam.CooperationProject.CooperationProjectID,
  134 + CooperationProjectName: applicationParam.CooperationProject.CooperationProjectName,
  135 + CooperationProjectNumber: applicationParam.CooperationProject.CooperationProjectNumber,
  136 + CooperationApplicationVerifyDescription: applicationParam.CooperationApplicationVerifyDescription,
  137 + }
  138 + data.CooperationApplicationApplicant.UserId = applicationParam.CooperationApplicationApplicant.UserID
  139 + data.CooperationApplicationApplicant.UserInfo.Phone = applicationParam.CooperationApplicationApplicant.UserInfo.UserPhone
  140 + data.CooperationApplicationApplicant.UserInfo.UsersName = applicationParam.CooperationApplicationApplicant.UserInfo.UserName
  141 + data.CooperationApplicationApplicant.UserInfo.UsersId = applicationParam.CooperationApplicationApplicant.UserID
  142 + data.CooperationApplicationApplicant.Department.DepartmentId = applicationParam.CooperationApplicationApplicant.Department.DepartmentID
  143 + data.CooperationApplicationApplicant.Department.DepartmentName = applicationParam.CooperationApplicationApplicant.Department.DepartmentName
  144 + data.CooperationApplicationApplicant.Department.DepartmentNumber = applicationParam.CooperationApplicationApplicant.Department.DepartmentNumber
  145 + data.Company.CompanyID = applicationParam.Company.CompanyID
  146 + data.Company.CompanyName = applicationParam.Company.CompanyName
101 return &data 147 return &data
102 } 148 }
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,54 @@ type CooperationApplicationsService struct { @@ -13,41 +15,54 @@ 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 + resultApplication, err := creationCooperationGateway.CooperationApplicationGet(allied_creation_cooperation.ReqCooperationApplicationGet{
  23 + CooperationApplicationId: applicationQuery.CooperationApplicationId,
  24 + })
  25 + if err != nil {
  26 + return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
  27 + }
  28 + resultProject, err := creationCooperationGateway.CooperationProjectGet(allied_creation_cooperation.ReqCooperationProjectGet{
  29 + CooperationProjectId: resultApplication.CooperationProject.CooperationProjectID,
22 }) 30 })
23 if err != nil { 31 if err != nil {
24 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 32 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
25 } 33 }
26 - return map[string]interface{}{  
27 - "accessMenus": resultMenu.Menus,  
28 - }, nil 34 + data := map[string]interface{}{
  35 + "cooperationApplication": dto.ToCooperationApplication(&resultApplication.CooperationApplication),
  36 + "cooperationProject": dto.ToCooperationProjectInfo(&resultProject.CooperationProject),
  37 + }
  38 + return data, nil
29 } 39 }
30 40
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), 41 +// AuditCooperationApplications 企业审核共创申请
  42 +func (srv CooperationApplicationsService) AuditCooperationApplications(auditCommand *command.AuditCooperationApplicationCommand) (interface{}, error) {
  43 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
  44 + auditCommand.Operator)
  45 + applicationIds := []string{}
  46 + for _, v := range auditCommand.CooperationApplicationId {
  47 + idStr := strconv.Itoa(v)
  48 + applicationIds = append(applicationIds, idStr)
  49 + }
  50 + _, err := creationCooperationGateway.CooperationApplicationsBatchApproval(allied_creation_cooperation.ReqCooperationApplicationBatchApproval{
  51 + CooperationApplicationIds: applicationIds,
  52 + CooperationApplicationDescription: auditCommand.CooperationApplicationVerifyDescription,
  53 + Action: auditCommand.CooperationApplicationStatus,
37 }) 54 })
38 if err != nil { 55 if err != nil {
39 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 56 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
40 } 57 }
41 - return map[string]interface{}{  
42 - "accessMenus": resultMenu.Menus,  
43 - }, nil 58 + return auditCommand, nil
44 } 59 }
45 60
46 -// GetCooperationApplications TODO:企业获取共创申请列表 61 +// SearchCooperationApplications 企业获取共创申请列表
47 func (srv CooperationApplicationsService) SearchCooperationApplications(applicationQuery *command.ListCooperationApplicationQuery) (interface{}, error) { 62 func (srv CooperationApplicationsService) SearchCooperationApplications(applicationQuery *command.ListCooperationApplicationQuery) (interface{}, error) {
48 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( 63 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
49 applicationQuery.Operator) 64 applicationQuery.Operator)
50 - resultMenu, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{ 65 + resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{
51 PageNumber: applicationQuery.PageNumber, 66 PageNumber: applicationQuery.PageNumber,
52 PageSize: applicationQuery.PageSize, 67 PageSize: applicationQuery.PageSize,
53 CompanyId: int(applicationQuery.Operator.CompanyId), 68 CompanyId: int(applicationQuery.Operator.CompanyId),
@@ -56,67 +71,80 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat @@ -56,67 +71,80 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat
56 if err != nil { 71 if err != nil {
57 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 72 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
58 } 73 }
59 - return resultMenu, nil 74 + return resultApplications, nil
60 } 75 }
61 76
62 /***** 共创用户端 *****/ 77 /***** 共创用户端 *****/
63 78
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), 79 +// CreateCooperationApplications 创建共创申请管理
  80 +func (srv CooperationApplicationsService) CreateCooperationApplications(createApplicationsCommand *command.CreateCooperationApplicationCommand) (interface{}, error) {
  81 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
  82 + createApplicationsCommand.Operator)
  83 + result, err := creationCooperationGateway.CooperationApplicationAdd(allied_creation_cooperation.ReqCooperationApplicationAdd{
  84 + ApplicantUid: strconv.Itoa(createApplicationsCommand.UserId),
  85 + CooperationApplicationDescription: createApplicationsCommand.CooperationApplicationDescription,
  86 + CooperationApplicationAttachment: createApplicationsCommand.Attachment,
  87 + CooperationProjectNumber: createApplicationsCommand.CooperationProjectNumber,
70 }) 88 })
71 if err != nil { 89 if err != nil {
72 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 90 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
73 } 91 }
74 - return map[string]interface{}{  
75 - "accessMenus": resultMenu.Menus,  
76 - }, nil 92 + data := struct {
  93 + CooperationApplicationId int `json:"cooperationApplicationId"`
  94 + command.CreateCooperationApplicationCommand
  95 + }{
  96 + CooperationApplicationId: result.CooperationApplicationId,
  97 + CreateCooperationApplicationCommand: *createApplicationsCommand,
  98 + }
  99 + return data, err
77 } 100 }
78 101
79 -//PersonGetCooperationApplications TODO:共创用户获取共创申请详情  
80 -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), 102 +//PersonGetCooperationApplications 共创用户获取共创申请详情
  103 +func (srv CooperationApplicationsService) PersonGetCooperationApplications(applicationQuery *command.GetCooperationApplicationQuery) (interface{}, error) {
  104 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
  105 + applicationQuery.Operator)
  106 + resultApplication, err := creationCooperationGateway.CooperationApplicationGet(allied_creation_cooperation.ReqCooperationApplicationGet{
  107 + CooperationApplicationId: applicationQuery.CooperationApplicationId,
85 }) 108 })
86 if err != nil { 109 if err != nil {
87 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 110 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
88 } 111 }
89 - return map[string]interface{}{  
90 - "accessMenus": resultMenu.Menus,  
91 - }, nil  
92 -}  
93 -  
94 -// GetCooperationApplications TODO:共创用户取消共创申请  
95 -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), 112 + resultProject, err := creationCooperationGateway.CooperationProjectGet(allied_creation_cooperation.ReqCooperationProjectGet{
  113 + CooperationProjectId: resultApplication.CooperationProject.CooperationProjectID,
100 }) 114 })
101 if err != nil { 115 if err != nil {
102 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 116 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
103 } 117 }
104 - return map[string]interface{}{  
105 - "accessMenus": resultMenu.Menus,  
106 - }, nil 118 + data := map[string]interface{}{
  119 + "cooperationApplication": dto.ToCooperationApplication(&resultApplication.CooperationApplication),
  120 + "cooperationProject": dto.ToCooperationProjectInfo(&resultProject.CooperationProject),
  121 + }
  122 + return data, nil
  123 +}
  124 +
  125 +// PersonCancelCooperationApplications 共创用户取消共创申请
  126 +func (srv CooperationApplicationsService) PersonCancelCooperationApplications(userMenusCommand *command.CancelCooperationApplicationCommand) (interface{}, error) {
  127 + return nil, nil
107 } 128 }
108 129
109 -// GetCooperationApplications TODO:共创用户获取共创申请列表  
110 -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), 130 +// PersonSearchCooperationApplications 共创用户获取共创申请列表
  131 +func (srv CooperationApplicationsService) PersonSearchCooperationApplications(applicationQuery *command.ListCooperationApplicationQuery) (interface{}, error) {
  132 + creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
  133 + applicationQuery.Operator)
  134 + resultApplications, err := creationCooperationGateway.CooperationApplicationsSearch(allied_creation_cooperation.ReqCooperationApplicationSearch{
  135 + PageNumber: applicationQuery.PageNumber,
  136 + PageSize: applicationQuery.PageSize,
  137 + CompanyId: int(applicationQuery.Operator.CompanyId),
  138 + CooperationApplicationStatus: applicationQuery.Status,
115 }) 139 })
116 if err != nil { 140 if err != nil {
117 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 141 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
118 } 142 }
119 - return map[string]interface{}{  
120 - "accessMenus": resultMenu.Menus,  
121 - }, nil 143 + // var dataList []dto.CooperationApplication
  144 +
  145 + // for i := range resultApplications.Gride.List {
  146 + // item := dto.ToCooperationApplication(&resultApplications.Gride.List[i])
  147 + // dataList = append(dataList, *item)
  148 + // }
  149 + return resultApplications, nil
122 } 150 }
@@ -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 }
@@ -61,12 +62,12 @@ func (srv CooperationProjectService) GetCooperationProject(projectQuery *command @@ -61,12 +62,12 @@ func (srv CooperationProjectService) GetCooperationProject(projectQuery *command
61 return dto.ToCooperationProjectInfo(&result.CooperationProject), nil 62 return dto.ToCooperationProjectInfo(&result.CooperationProject), nil
62 } 63 }
63 64
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"`
@@ -38,7 +34,6 @@ type CooperationApplicationItem struct { @@ -38,7 +34,6 @@ type CooperationApplicationItem struct {
38 34
39 func ToCooperationApplicationItem(param *allied_creation_cooperation.CooperationApplication) *CooperationApplicationItem { 35 func ToCooperationApplicationItem(param *allied_creation_cooperation.CooperationApplication) *CooperationApplicationItem {
40 data := CooperationApplicationItem{ 36 data := CooperationApplicationItem{
41 -  
42 CooperationApplicationAttachment: param.CooperationApplicationAttachment, 37 CooperationApplicationAttachment: param.CooperationApplicationAttachment,
43 CooperationApplicationDescription: param.CooperationApplicationDescription, 38 CooperationApplicationDescription: param.CooperationApplicationDescription,
44 CooperationApplicationID: param.CooperationApplicationID, 39 CooperationApplicationID: param.CooperationApplicationID,
@@ -74,18 +69,13 @@ type CooperationApplicationInfo struct { @@ -74,18 +69,13 @@ type CooperationApplicationInfo struct {
74 DepartmentName string `json:"departmentName"` //申请人部门 69 DepartmentName string `json:"departmentName"` //申请人部门
75 Phone string `json:"userPhone"` //申请人电话 70 Phone string `json:"userPhone"` //申请人电话
76 } `json:"cooperationApplicationApplicant"` 71 } `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"` //申请状态 72 + CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件
  73 + CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述
  74 + CooperationApplicationID int `json:"cooperationApplicationId"` //id
  75 + IsCanceled bool `json:"isCanceled"` //是否取消
  76 + CooperationApplicationVerifyDescription string `json:"cooperationApplicationVerifyDescription"` //审核描述
  77 + CooperationApplicationVerifyTime time.Time `json:"cooperationApplicationVerifyTime"` //审核时间
  78 + CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //申请状态
89 Org struct { 79 Org struct {
90 OrgID int `json:"orgId"` 80 OrgID int `json:"orgId"`
91 OrgName string `json:"orgName"` 81 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:"userId"` 33 UsersId int `json:"userId"`
33 UsersName string `json:"userName"` 34 UsersName string `json:"userName"`
@@ -46,7 +47,6 @@ type CooperationProjectInfo struct { @@ -46,7 +47,6 @@ type CooperationProjectInfo struct {
46 DepartmentName string `json:"departmentName"` 47 DepartmentName string `json:"departmentName"`
47 } `json:"department"` //项目发起部门 48 } `json:"department"` //项目发起部门
48 Status int `json:"status"` // 共创项目状态,1招标中,2结束 49 Status int `json:"status"` // 共创项目状态,1招标中,2结束
49 -  
50 } 50 }
51 51
52 func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo { 52 func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo {
@@ -100,16 +100,11 @@ type CooperationApplicationItem struct { @@ -100,16 +100,11 @@ type CooperationApplicationItem struct {
100 } `json:"userInfo"` 100 } `json:"userInfo"`
101 UserType int `json:"userType"` 101 UserType int `json:"userType"`
102 } `json:"cooperationApplicationApplicant"` //申请人 102 } `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"` //附件 103 + CooperationApplicationDescription string `json:"cooperationApplicationDescription"` //描述
  104 + CooperationApplicationID int `json:"cooperationApplicationId"` //申请id
  105 + CooperationApplicationStatus int `json:"cooperationApplicationStatus"` //状态
  106 + CooperationApplyTime int `json:"cooperationApplyTime"` //申请时间
  107 + CooperationApplicationAttachment []domain.Attachment `json:"cooperationApplicationAttachment"` //附件
113 } 108 }
114 109
115 func ToCooperationApplicationItem(param *allied_creation_cooperation.CooperationApplication) *CooperationApplicationItem { 110 func ToCooperationApplicationItem(param *allied_creation_cooperation.CooperationApplication) *CooperationApplicationItem {
@@ -7,6 +7,7 @@ import ( @@ -7,6 +7,7 @@ import (
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/command" 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/dto" 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/query" 9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationProject/query"
  10 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
10 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" 11 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"
11 ) 12 )
12 13
@@ -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 }
1 package domain 1 package domain
2 2
3 -//TODO 移除文件  
4 //Dictionary 字典 3 //Dictionary 字典
5 type Dictionary struct { 4 type Dictionary struct {
6 // 字典编号 主键 5 // 字典编号 主键
1 package domain 1 package domain
2 2
3 -//TODO 移除文件  
4 //DictionaryItem 字典明细项 3 //DictionaryItem 字典明细项
5 type DictionaryItem struct { 4 type DictionaryItem struct {
6 // 项编码 5 // 项编码
@@ -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" 3 +import (
  4 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
  5 + "time"
  6 +)
4 7
5 type ProjectAttachment struct { 8 type ProjectAttachment struct {
6 FileType string `json:"fileType"` 9 FileType string `json:"fileType"`
@@ -24,7 +27,7 @@ type CooperationProject struct { @@ -24,7 +27,7 @@ type CooperationProject struct {
24 CooperationModeNumber string `json:"cooperationModeNumber"` 27 CooperationModeNumber string `json:"cooperationModeNumber"`
25 } `json:"cooperationMode"` //项目模式 28 } `json:"cooperationMode"` //项目模式
26 CooperationProjectDescription string `json:"cooperationProjectDescription"` 29 CooperationProjectDescription string `json:"cooperationProjectDescription"`
27 - Attachment []ProjectAttachment `json:"attachment"` 30 + Attachment []domain.Attachment `json:"attachment"`
28 CooperationProjectId int `json:"cooperationProjectId,string,"` 31 CooperationProjectId int `json:"cooperationProjectId,string,"`
29 CooperationProjectName string `json:"cooperationProjectName"` 32 CooperationProjectName string `json:"cooperationProjectName"`
30 CooperationProjectNumber string `json:"cooperationProjectNumber"` 33 CooperationProjectNumber string `json:"cooperationProjectNumber"`
@@ -67,7 +70,7 @@ type ( @@ -67,7 +70,7 @@ type (
67 SponsorUid int `json:"sponsorUid,string"` 70 SponsorUid int `json:"sponsorUid,string"`
68 DepartmentId int `json:"departmentId,string"` 71 DepartmentId int `json:"departmentId,string"`
69 CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"` 72 CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"`
70 - Attachment []ProjectAttachment `json:"attachment"` 73 + Attachment []domain.Attachment `json:"attachment"`
71 } 74 }
72 75
73 DataCooperationProjectAdd struct { 76 DataCooperationProjectAdd struct {
@@ -111,7 +114,7 @@ type ( @@ -111,7 +114,7 @@ type (
111 PublisherUid string `json:"publisherUid"` 114 PublisherUid string `json:"publisherUid"`
112 // 共创项目描述 115 // 共创项目描述
113 CooperationProjectDescription string `json:"cooperationProjectDescription"` 116 CooperationProjectDescription string `json:"cooperationProjectDescription"`
114 - Attachment []ProjectAttachment `json:"attachment"` 117 + Attachment []domain.Attachment `json:"attachment"`
115 } 118 }
116 119
117 DataCooperationProjectUpdate struct { 120 DataCooperationProjectUpdate struct {