作者 yangfu
@@ -14,7 +14,7 @@ type UndertakerFeedbackService struct { @@ -14,7 +14,7 @@ type UndertakerFeedbackService struct {
14 func (srv UndertakerFeedbackService) SearchFeedback(cmd *command.SearchFeedbackCommand) (interface{}, error) { 14 func (srv UndertakerFeedbackService) SearchFeedback(cmd *command.SearchFeedbackCommand) (interface{}, error) {
15 gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation( 15 gateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(
16 cmd.Operator) 16 cmd.Operator)
17 - resultMenu, err := gateway.ContractUndertakerFeedbackSearch(allied_creation_cooperation.ReqContractUndertakerFeedbackSearch{ 17 + result, err := gateway.ContractUndertakerFeedbackSearch(allied_creation_cooperation.ReqContractUndertakerFeedbackSearch{
18 PageNumber: cmd.PageNumber, 18 PageNumber: cmd.PageNumber,
19 PageSize: cmd.PageSize, 19 PageSize: cmd.PageSize,
20 CooperationContractName: cmd.ContractName, 20 CooperationContractName: cmd.ContractName,
@@ -23,5 +23,10 @@ func (srv UndertakerFeedbackService) SearchFeedback(cmd *command.SearchFeedbackC @@ -23,5 +23,10 @@ func (srv UndertakerFeedbackService) SearchFeedback(cmd *command.SearchFeedbackC
23 if err != nil { 23 if err != nil {
24 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) 24 return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
25 } 25 }
26 - return resultMenu, nil 26 + for i, v := range result.Grid.List {
  27 + result.Grid.List[i].ContractUndertaker.UserCode = v.ContractUndertaker.UserInfo.UserCode
  28 + result.Grid.List[i].ContractUndertaker.UserName = v.ContractUndertaker.UserInfo.UserName
  29 + result.Grid.List[i].ContractUndertaker.UserPhone = v.ContractUndertaker.UserInfo.UserPhone
  30 + }
  31 + return result, nil
27 } 32 }
@@ -53,7 +53,7 @@ type ( @@ -53,7 +53,7 @@ type (
53 Grid struct { 53 Grid struct {
54 List []struct { 54 List []struct {
55 FeedbackID string `json:"feedbackId"` 55 FeedbackID string `json:"feedbackId"`
56 - FeedbackAttachment interface{} `json:"feedbackAttachment"` 56 + FeedbackAttachment []domain.Attachment `json:"feedbackAttachment"`
57 FeedbackContent string `json:"feedbackContent"` 57 FeedbackContent string `json:"feedbackContent"`
58 CooperationContractNumber string `json:"cooperationContractNumber"` 58 CooperationContractNumber string `json:"cooperationContractNumber"`
59 CooperationContractName string `json:"cooperationContractName"` 59 CooperationContractName string `json:"cooperationContractName"`
@@ -69,19 +69,18 @@ type ( @@ -69,19 +69,18 @@ type (
69 UserCode string `json:"userCode"` 69 UserCode string `json:"userCode"`
70 } `json:"userInfo"` 70 } `json:"userInfo"`
71 } `json:"contractUndertaker"` 71 } `json:"contractUndertaker"`
72 - Org interface{} `json:"org"`  
73 - Company interface{} `json:"company"`  
74 - //UpdatedAt time.Time `json:"updatedAt"`  
75 - //DeletedAt time.Time `json:"deletedAt"` 72 + Org struct {
  73 + OrgId int64 `json:"orgId,string"` // 组织机构ID
  74 + OrgName string `json:"orgName"` // 组织名称
  75 + } `json:"org"`
  76 + Company struct {
  77 + CompanyId int64 `json:"companyId,string"` // 公司ID
  78 + CompanyLogo string `json:"companyLogo"` // 公司logo
  79 + CompanyName string `json:"companyName"` // 公司名称
  80 + } `json:"company"`
76 CreatedAt jtime.TimeToUnixMsec `json:"createdAt"` 81 CreatedAt jtime.TimeToUnixMsec `json:"createdAt"`
77 - CooperationMode struct {  
78 - // 共创模式ID  
79 - CooperationModeId int `json:"cooperationModeId,string,"`  
80 - // 共创模式编码,唯一确定  
81 - CooperationModeNumber string `json:"cooperationModeNumber"`  
82 - // 模式名称,唯一确定 82 + // 共创模式名称
83 CooperationModeName string `json:"cooperationModeName"` 83 CooperationModeName string `json:"cooperationModeName"`
84 - } `json:"cooperationMode"`  
85 } `json:"list"` 84 } `json:"list"`
86 Total int `json:"total"` 85 Total int `json:"total"`
87 } `json:"grid"` 86 } `json:"grid"`
@@ -2,16 +2,16 @@ package beego @@ -2,16 +2,16 @@ package beego
2 2
3 import ( 3 import (
4 "encoding/json" 4 "encoding/json"
  5 + "os"
  6 + "strconv"
  7 +
5 "github.com/beego/beego/v2/server/web/context" 8 "github.com/beego/beego/v2/server/web/context"
6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" 9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/middleware" 10 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/middleware"
8 - "os"  
9 - "strconv"  
10 11
11 "github.com/beego/beego/v2/server/web" 12 "github.com/beego/beego/v2/server/web"
12 "github.com/linmadan/egglib-go/web/beego/filters" 13 "github.com/linmadan/egglib-go/web/beego/filters"
13 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" 14 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
14 - _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"  
15 _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/routers" 15 _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/routers"
16 ) 16 )
17 17
@@ -20,6 +20,7 @@ func init() { @@ -20,6 +20,7 @@ func init() {
20 web.BConfig.CopyRequestBody = true 20 web.BConfig.CopyRequestBody = true
21 web.BConfig.RunMode = "dev" 21 web.BConfig.RunMode = "dev"
22 web.BConfig.Listen.HTTPPort = constant.HTTP_PORT 22 web.BConfig.Listen.HTTPPort = constant.HTTP_PORT
  23 +
23 web.BConfig.Listen.EnableAdmin = false 24 web.BConfig.Listen.EnableAdmin = false
24 web.BConfig.WebConfig.CommentRouterPath = "/pkg/port/beego/routers" 25 web.BConfig.WebConfig.CommentRouterPath = "/pkg/port/beego/routers"
25 if os.Getenv("RUN_MODE") != "" { 26 if os.Getenv("RUN_MODE") != "" {
@@ -31,6 +32,12 @@ func init() { @@ -31,6 +32,12 @@ func init() {
31 web.BConfig.Listen.HTTPPort = port 32 web.BConfig.Listen.HTTPPort = port
32 } 33 }
33 } 34 }
  35 + //https支持
  36 + web.BConfig.Listen.EnableHTTPS = false
  37 + web.BConfig.Listen.HTTPSPort = 80
  38 + web.BConfig.Listen.HTTPSCertFile = ""
  39 + web.BConfig.Listen.HTTPSKeyFile = ""
  40 +
34 filters.SecureKeyMap["token"] = "x-mmm-accesstoken" 41 filters.SecureKeyMap["token"] = "x-mmm-accesstoken"
35 web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors()) 42 web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors())
36 web.InsertFilter("/*", web.BeforeRouter, filters.CreateRequstLogFilter(log.Logger)) 43 web.InsertFilter("/*", web.BeforeRouter, filters.CreateRequstLogFilter(log.Logger))