作者 tangxuhui

数据结构调整

... ... @@ -52,11 +52,11 @@ type (
DataContractUndertakerFeedbackSearch struct {
Grid struct {
List []struct {
FeedbackID string `json:"feedbackId"`
FeedbackAttachment interface{} `json:"feedbackAttachment"`
FeedbackContent string `json:"feedbackContent"`
CooperationContractNumber string `json:"cooperationContractNumber"`
CooperationContractName string `json:"cooperationContractName"`
FeedbackID string `json:"feedbackId"`
FeedbackAttachment []domain.Attachment `json:"feedbackAttachment"`
FeedbackContent string `json:"feedbackContent"`
CooperationContractNumber string `json:"cooperationContractNumber"`
CooperationContractName string `json:"cooperationContractName"`
ContractUndertaker struct {
UserId int `json:"userId,string,"`
UserPhone string `json:"userPhone"`
... ... @@ -69,19 +69,18 @@ type (
UserCode string `json:"userCode"`
} `json:"userInfo"`
} `json:"contractUndertaker"`
Org interface{} `json:"org"`
Company interface{} `json:"company"`
//UpdatedAt time.Time `json:"updatedAt"`
//DeletedAt time.Time `json:"deletedAt"`
CreatedAt jtime.TimeToUnixMsec `json:"createdAt"`
CooperationMode struct {
// 共创模式ID
CooperationModeId int `json:"cooperationModeId,string,"`
// 共创模式编码,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber"`
// 模式名称,唯一确定
CooperationModeName string `json:"cooperationModeName"`
} `json:"cooperationMode"`
Org struct {
OrgId int64 `json:"orgId,string"` // 组织机构ID
OrgName string `json:"orgName"` // 组织名称
} `json:"org"`
Company struct {
CompanyId int64 `json:"companyId,string"` // 公司ID
CompanyLogo string `json:"companyLogo"` // 公司logo
CompanyName string `json:"companyName"` // 公司名称
} `json:"company"`
CreatedAt jtime.TimeToUnixMsec `json:"createdAt"`
// 共创模式名称
CooperationModeName string `json:"cooperationModeName"`
} `json:"list"`
Total int `json:"total"`
} `json:"grid"`
... ...
... ... @@ -2,16 +2,16 @@ package beego
import (
"encoding/json"
"os"
"strconv"
"github.com/beego/beego/v2/server/web/context"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/middleware"
"os"
"strconv"
"github.com/beego/beego/v2/server/web"
"github.com/linmadan/egglib-go/web/beego/filters"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/routers"
)
... ... @@ -20,6 +20,7 @@ func init() {
web.BConfig.CopyRequestBody = true
web.BConfig.RunMode = "dev"
web.BConfig.Listen.HTTPPort = constant.HTTP_PORT
web.BConfig.Listen.EnableAdmin = false
web.BConfig.WebConfig.CommentRouterPath = "/pkg/port/beego/routers"
if os.Getenv("RUN_MODE") != "" {
... ... @@ -31,6 +32,12 @@ func init() {
web.BConfig.Listen.HTTPPort = port
}
}
//https支持
web.BConfig.Listen.EnableHTTPS = false
web.BConfig.Listen.HTTPSPort = 80
web.BConfig.Listen.HTTPSCertFile = ""
web.BConfig.Listen.HTTPSKeyFile = ""
filters.SecureKeyMap["token"] = "x-mmm-accesstoken"
web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors())
web.InsertFilter("/*", web.BeforeRouter, filters.CreateRequstLogFilter(log.Logger))
... ...