正在显示
10 个修改的文件
包含
63 行增加
和
24 行删除
@@ -13,7 +13,7 @@ type CreateCooperationApplicationCommand struct { | @@ -13,7 +13,7 @@ type CreateCooperationApplicationCommand struct { | ||
13 | // 共创申请描述 | 13 | // 共创申请描述 |
14 | CooperationApplicationDescription string `json:"cooperationApplicationDescription" valid:"Required"` | 14 | CooperationApplicationDescription string `json:"cooperationApplicationDescription" valid:"Required"` |
15 | // 申请人的id | 15 | // 申请人的id |
16 | - UserId int `json:"userId"` | 16 | + //ApplicantUid int `json:"userId"` |
17 | // | 17 | // |
18 | CooperationProjectNumber string `json:"cooperationProjectNumber"` | 18 | CooperationProjectNumber string `json:"cooperationProjectNumber"` |
19 | // 附件列表 | 19 | // 附件列表 |
@@ -11,7 +11,7 @@ type ListCooperationApplicationQuery struct { | @@ -11,7 +11,7 @@ type ListCooperationApplicationQuery struct { | ||
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | // 查询偏离量 | 13 | // 查询偏离量 |
14 | - PageNumber int `json:"pageNumber" valid:"Required"` | 14 | + PageNumber int `json:"pageIndex" valid:"Required"` |
15 | // 查询限制 | 15 | // 查询限制 |
16 | PageSize int `json:"pageSize" valid:"Required"` | 16 | PageSize int `json:"pageSize" valid:"Required"` |
17 | //审核状态 | 17 | //审核状态 |
@@ -10,6 +10,12 @@ import ( | @@ -10,6 +10,12 @@ import ( | ||
10 | type CreateFeedbackCommand struct { | 10 | type CreateFeedbackCommand struct { |
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | + // 合约承接方反馈内容附件 | ||
14 | + FeedbackAttachment []*domain.Attachment `cname:"合约承接方反馈内容附件" json:"feedbackAttachment"` | ||
15 | + // 合约承接方反馈内容 | ||
16 | + FeedbackContent string `cname:"合约承接方反馈内容" json:"feedbackContent" valid:"Required"` | ||
17 | + // 共创合约编号 | ||
18 | + CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"` | ||
13 | } | 19 | } |
14 | 20 | ||
15 | func (cmd *CreateFeedbackCommand) Valid(validation *validation.Validation) { | 21 | func (cmd *CreateFeedbackCommand) Valid(validation *validation.Validation) { |
@@ -10,6 +10,10 @@ import ( | @@ -10,6 +10,10 @@ import ( | ||
10 | type SearchFeedbackCommand struct { | 10 | type SearchFeedbackCommand struct { |
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | + // 页面大小 | ||
14 | + PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` | ||
15 | + // 页面大小 | ||
16 | + PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` | ||
13 | } | 17 | } |
14 | 18 | ||
15 | func (cmd *SearchFeedbackCommand) Valid(validation *validation.Validation) { | 19 | func (cmd *SearchFeedbackCommand) Valid(validation *validation.Validation) { |
@@ -81,7 +81,7 @@ func (srv CooperationApplicationsService) CreateCooperationApplications(createAp | @@ -81,7 +81,7 @@ func (srv CooperationApplicationsService) CreateCooperationApplications(createAp | ||
81 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | 81 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( |
82 | createApplicationsCommand.Operator) | 82 | createApplicationsCommand.Operator) |
83 | result, err := creationCooperationGateway.CooperationApplicationAdd(allied_creation_cooperation.ReqCooperationApplicationAdd{ | 83 | result, err := creationCooperationGateway.CooperationApplicationAdd(allied_creation_cooperation.ReqCooperationApplicationAdd{ |
84 | - ApplicantUid: strconv.Itoa(createApplicationsCommand.UserId), | 84 | + ApplicantUid: strconv.Itoa(int(createApplicationsCommand.Operator.UserId)), |
85 | CooperationApplicationDescription: createApplicationsCommand.CooperationApplicationDescription, | 85 | CooperationApplicationDescription: createApplicationsCommand.CooperationApplicationDescription, |
86 | CooperationApplicationAttachment: createApplicationsCommand.Attachment, | 86 | CooperationApplicationAttachment: createApplicationsCommand.Attachment, |
87 | CooperationProjectNumber: createApplicationsCommand.CooperationProjectNumber, | 87 | CooperationProjectNumber: createApplicationsCommand.CooperationProjectNumber, |
@@ -3,7 +3,7 @@ package service | @@ -3,7 +3,7 @@ package service | ||
3 | import ( | 3 | import ( |
4 | "github.com/linmadan/egglib-go/core/application" | 4 | "github.com/linmadan/egglib-go/core/application" |
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" |
6 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user" | 6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation" |
7 | ) | 7 | ) |
8 | 8 | ||
9 | // UndertakerFeedbackService 承接反馈服务 | 9 | // UndertakerFeedbackService 承接反馈服务 |
@@ -11,31 +11,31 @@ type UndertakerFeedbackService struct { | @@ -11,31 +11,31 @@ type UndertakerFeedbackService struct { | ||
11 | } | 11 | } |
12 | 12 | ||
13 | // CreateCooperationProject TODO:承接反馈列表 | 13 | // CreateCooperationProject TODO:承接反馈列表 |
14 | -func (srv UndertakerFeedbackService) SearchFeedback(userMenusCommand *command.SearchFeedbackCommand) (interface{}, error) { | ||
15 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
16 | - userMenusCommand.Operator) | ||
17 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
18 | - UserId: int(userMenusCommand.Operator.UserId), | 14 | +func (srv UndertakerFeedbackService) SearchFeedback(cmd *command.SearchFeedbackCommand) (interface{}, error) { |
15 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
16 | + cmd.Operator) | ||
17 | + resultMenu, err := gateway.ContractUndertakerFeedbackSearch(allied_creation_cooperation.ReqContractUndertakerFeedbackSearch{ | ||
18 | + PageNumber: cmd.PageNumber, | ||
19 | + PageSize: cmd.PageSize, | ||
19 | }) | 20 | }) |
20 | if err != nil { | 21 | if err != nil { |
21 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 22 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
22 | } | 23 | } |
23 | - return map[string]interface{}{ | ||
24 | - "accessMenus": resultMenu.Menus, | ||
25 | - }, nil | 24 | + return resultMenu, nil |
26 | } | 25 | } |
27 | 26 | ||
28 | // CreateCooperationProject TODO:创建承接反馈 | 27 | // CreateCooperationProject TODO:创建承接反馈 |
29 | -func (srv UndertakerFeedbackService) CreateFeedback(userMenusCommand *command.CreateFeedbackCommand) (interface{}, error) { | ||
30 | - creationUserGateway := allied_creation_user.NewHttplibAlliedCreationUser( | ||
31 | - userMenusCommand.Operator) | ||
32 | - resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{ | ||
33 | - UserId: int(userMenusCommand.Operator.UserId), | 28 | +func (srv UndertakerFeedbackService) CreateFeedback(cmd *command.CreateFeedbackCommand) (interface{}, error) { |
29 | + gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( | ||
30 | + cmd.Operator) | ||
31 | + resultMenu, err := gateway.ContractUndertakerFeedbackAdd(allied_creation_cooperation.ReqContractUndertakerFeedbackAdd{ | ||
32 | + FeedbackAttachment: cmd.FeedbackAttachment, | ||
33 | + FeedbackContent: cmd.FeedbackContent, | ||
34 | + CooperationContractNumber: cmd.CooperationContractNumber, | ||
35 | + UnderTakerUid: cmd.Operator.UserId, | ||
34 | }) | 36 | }) |
35 | if err != nil { | 37 | if err != nil { |
36 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 38 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
37 | } | 39 | } |
38 | - return map[string]interface{}{ | ||
39 | - "accessMenus": resultMenu.Menus, | ||
40 | - }, nil | 40 | + return resultMenu, nil |
41 | } | 41 | } |
pkg/infrastructure/service_gateway/allied_creation_cooperation/param_contract_undertaker_feedback.go
1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
2 | 2 | ||
3 | +import "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
4 | + | ||
3 | //创建共创合约反馈信息 | 5 | //创建共创合约反馈信息 |
4 | type ( | 6 | type ( |
5 | ReqContractUndertakerFeedbackAdd struct { | 7 | ReqContractUndertakerFeedbackAdd struct { |
8 | + // 合约承接方反馈内容附件 | ||
9 | + FeedbackAttachment []*domain.Attachment `cname:"合约承接方反馈内容附件" json:"feedbackAttachment"` | ||
10 | + // 合约承接方反馈内容 | ||
11 | + FeedbackContent string `cname:"合约承接方反馈内容" json:"feedbackContent" valid:"Required"` | ||
12 | + // 共创合约编号 | ||
13 | + CooperationContractNumber string `cname:"共创合约编号" json:"cooperationContractNumber" valid:"Required"` | ||
14 | + // 承接人uid | ||
15 | + UnderTakerUid int64 `cname:"承接人uid" json:"underTakerUid,string,omitempty"` | ||
6 | } | 16 | } |
7 | 17 | ||
8 | DataContractUndertakerFeedbackAdd struct { | 18 | DataContractUndertakerFeedbackAdd struct { |
@@ -22,9 +32,29 @@ type ( | @@ -22,9 +32,29 @@ type ( | ||
22 | //查询共创承接方反馈信息 | 32 | //查询共创承接方反馈信息 |
23 | type ( | 33 | type ( |
24 | ReqContractUndertakerFeedbackSearch struct { | 34 | ReqContractUndertakerFeedbackSearch struct { |
35 | + // 页面大小 | ||
36 | + PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` | ||
37 | + // 页面大小 | ||
38 | + PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` | ||
25 | } | 39 | } |
26 | 40 | ||
27 | DataContractUndertakerFeedbackSearch struct { | 41 | DataContractUndertakerFeedbackSearch struct { |
42 | + Grid struct { | ||
43 | + List []struct { | ||
44 | + FeedbackID string `json:"feedbackId"` | ||
45 | + FeedbackAttachment interface{} `json:"feedbackAttachment"` | ||
46 | + FeedbackContent string `json:"feedbackContent"` | ||
47 | + CooperationContractNumber string `json:"cooperationContractNumber"` | ||
48 | + CooperationContractName string `json:"cooperationContractName"` | ||
49 | + ContractUndertaker interface{} `json:"contractUndertaker"` | ||
50 | + Org interface{} `json:"org"` | ||
51 | + Company interface{} `json:"company"` | ||
52 | + //UpdatedAt time.Time `json:"updatedAt"` | ||
53 | + //DeletedAt time.Time `json:"deletedAt"` | ||
54 | + //CreatedAt time.Time `json:"createdAt"` | ||
55 | + } `json:"list"` | ||
56 | + Total int `json:"total"` | ||
57 | + } `json:"grid"` | ||
28 | } | 58 | } |
29 | ) | 59 | ) |
30 | 60 |
@@ -265,7 +265,7 @@ type ( | @@ -265,7 +265,7 @@ type ( | ||
265 | //返回共创申请详情 | 265 | //返回共创申请详情 |
266 | type ( | 266 | type ( |
267 | ReqCooperationApplicationGet struct { | 267 | ReqCooperationApplicationGet struct { |
268 | - CooperationApplicationId int `json:"cooperationApplicationId"` | 268 | + CooperationApplicationId int `json:"cooperationApplicationId,string"` |
269 | } | 269 | } |
270 | 270 | ||
271 | DataCooperationApplicationGet struct { | 271 | DataCooperationApplicationGet struct { |
@@ -100,8 +100,7 @@ func (controller *CooperationController) CreateCooperationApplication() { | @@ -100,8 +100,7 @@ func (controller *CooperationController) CreateCooperationApplication() { | ||
100 | cmd := &command.CreateCooperationApplicationCommand{} | 100 | cmd := &command.CreateCooperationApplicationCommand{} |
101 | err := controller.Unmarshal(cmd) | 101 | err := controller.Unmarshal(cmd) |
102 | if err != nil { | 102 | if err != nil { |
103 | - controller.Response(nil, err) | ||
104 | - return | 103 | + log.Logger.Error(err.Error()) |
105 | } | 104 | } |
106 | cmd.Operator = controller.GetOperator() | 105 | cmd.Operator = controller.GetOperator() |
107 | data, err := svr.CreateCooperationApplications(cmd) | 106 | data, err := svr.CreateCooperationApplications(cmd) |
@@ -24,7 +24,7 @@ func init() { | @@ -24,7 +24,7 @@ func init() { | ||
24 | 24 | ||
25 | /***** 承接反馈 *****/ | 25 | /***** 承接反馈 *****/ |
26 | web.Router("/v1/app/contract-undertaker-feedbacks", &mobile_client.CooperationController{}, "Post:CreateFeedback") | 26 | web.Router("/v1/app/contract-undertaker-feedbacks", &mobile_client.CooperationController{}, "Post:CreateFeedback") |
27 | - web.Router("/v1/app/contract-undertaker-feedbacks/search", &mobile_client.CooperationController{}, "Get:SearchFeedback") | 27 | + web.Router("/v1/app/contract-undertaker-feedbacks/search", &mobile_client.CooperationController{}, "Post:SearchFeedback") |
28 | 28 | ||
29 | /***** CompanyDividends 共创项目 *****/ | 29 | /***** CompanyDividends 共创项目 *****/ |
30 | web.Router("/v1/app/cooperation-projects", &mobile_client.CooperationController{}, "Post:CreateCooperationProject") | 30 | web.Router("/v1/app/cooperation-projects", &mobile_client.CooperationController{}, "Post:CreateCooperationProject") |
-
请 注册 或 登录 后发表评论