作者 yangfu

ci : 增加报表系统配置

... ... @@ -123,6 +123,8 @@ spec:
value: "https://sms.fjmaimaimai.com:9897"
- name: COST_STRUCTURED
value: "http://cost-structured-prd.fjmaimaimai.com"
- name: ALLIED_CREATION_REPORTING_SYSTEM
value: "https://allied-creation-reporting-system-prd.fjmaimaimai.com"
- name: MANUFACTURE_WEIGH_DEFAULT_COMPANYID
value: "4"
- name: MANUFACTURE_WEIGH_DEFAULT_ORGID
... ...
... ... @@ -127,6 +127,8 @@ spec:
value: "http://cost-structured-test.fjmaimaimai.com"
- name: SUPLUS_SALE_APP
value: "http://suplus-sale-app-gateway-test.fjmaimaimai.com"
- name: ALLIED_CREATION_REPORTING_SYSTEM
value: "https://allied-creation-reporting-system-test.fjmaimaimai.com"
- name: MANUFACTURE_WEIGH_DEFAULT_COMPANYID
value: "23"
- name: MANUFACTURE_WEIGH_DEFAULT_ORGID
... ...
... ... @@ -46,8 +46,12 @@ var EnableBlockChain = true
// 天联共创 成本结构化
var COST_STRUCTURED = "http://cost-structured-dev.fjmaimaimai.com"
//var COST_STRUCTURED = "http://localhost:8085"
// 天联共创 生产制造模块
var ALLIED_CREATION_REPORTING_SYSTEM = "https://allied-creation-reporting-system-test.fjmaimaimai.com"
func init() {
if os.Getenv("LOG_LEVEL") != "" {
LOG_LEVEL = os.Getenv("LOG_LEVEL")
... ... @@ -88,4 +92,7 @@ func init() {
if os.Getenv("COST_STRUCTURED") != "" {
COST_STRUCTURED = os.Getenv("COST_STRUCTURED")
}
if os.Getenv("ALLIED_CREATION_REPORTING_SYSTEM") != "" {
ALLIED_CREATION_REPORTING_SYSTEM = os.Getenv("ALLIED_CREATION_REPORTING_SYSTEM")
}
}
... ...
package chart_editor
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway"
"time"
)
//HttpLibAlliedCreationManufacture 生产制造模块
type HttpLibAlliedChartEditor struct {
service_gateway.BaseServiceGateway
baseUrL string
}
func NewHttpLibAlliedChartEditor(operator domain.Operator) *HttpLibAlliedChartEditor {
return &HttpLibAlliedChartEditor{
BaseServiceGateway: service_gateway.BaseServiceGateway{
ConnectTimeout: 100 * time.Second,
ReadWriteTimeout: 100 * time.Second,
CompanyId: operator.CompanyId,
OrgId: operator.OrgId,
InOrgIds: operator.OrgIds,
UserId: operator.UserId,
UserBaseId: operator.UserBaseId,
},
baseUrL: constant.ALLIED_CREATION_REPORTING_SYSTEM,
}
}
func (gateway HttpLibAlliedChartEditor) BaseUrl() string {
return gateway.baseUrL
}
... ...
... ... @@ -4,6 +4,7 @@ import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_manufacture"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
chart_editor "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/chart-editor"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/cost_structured"
"net/http"
"os"
... ... @@ -70,6 +71,8 @@ func init() {
web.InsertFilter("/v1/manufacture/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/manufacture", allied_creation_manufacture.NewHttpLibAlliedCreationManufacture(domain.Operator{})))
web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.CheckAccessToken())
web.InsertFilter("/v1/cost/*", web.BeforeRouter, middleware.RedirectInternalService("/v1/cost", cost_structured.NewHttpLibCostStructured(domain.Operator{})))
web.InsertFilter("/v1/chart-editor/*", web.BeforeRouter, middleware.CheckAccessToken())
web.InsertFilter("/v1/chart-editor/*", web.BeforeRouter, middleware.RedirectInternalService("/chart-editor", chart_editor.NewHttpLibAlliedChartEditor(domain.Operator{})))
}
func AllowCors() func(ctx *context.Context) {
... ...