作者 陈志颖

fix:增加应用名

... ... @@ -86,6 +86,8 @@ spec:
value: "dev"
- name: Log_PREFIX
value: "[partnermg_dev]"
- name: APP_NAME
value: ""
volumes:
- name: accesslogs
emptyDir: {}
... ...
... ... @@ -83,6 +83,8 @@ spec:
value: "dev"
- name: Log_PREFIX
value: "[partnermg_prd]"
- name: APP_NAME
value: "mmm-partnermg"
volumes:
- name: accesslogs
emptyDir: {}
... ...
... ... @@ -83,6 +83,8 @@ spec:
value: "dev"
- name: Log_PREFIX
value: "[partnermg_test]"
- name: APP_NAME
value: "partnermg"
volumes:
- name: accesslogs
emptyDir: {}
... ...
... ... @@ -8,6 +8,7 @@ var LOG_LEVEL = "debug"
var LOG_File = "./logs/partnermg.log"
var IMPORT_EXCEL = "./download/订单数据模板.xlsx"
var Log_PREFIX = "[partnermg_dev]"
var APP_NAME = ""
var (
UCENTER_HOST = "https://suplus-ucenter-test.fjmaimaimai.com" //统一用户中心地址
UCENTER_SECRET = "cykbjnfqgctn"
... ... @@ -43,4 +44,7 @@ func init() {
if os.Getenv("Log_PREFIX") != "" {
Log_PREFIX = os.Getenv("Log_PREFIX")
}
if os.Getenv("APP_NAME") != "" {
APP_NAME = os.Getenv("APP_NAME")
}
}
... ...
... ... @@ -682,7 +682,7 @@ func (c *OrderInfoController) DownloadTemplate() {
} else {
logs.Info(resp)
ret = map[string]interface{}{
"url": "http://" + c.Ctx.Request.Host + "/partnermg/download/订单数据模板.xlsx",
"url": "http://" + c.Ctx.Request.Host + "/" + constant.APP_NAME + "/download/订单数据模板.xlsx",
}
c.ResponseData(ret)
}
... ...