common.go
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package constant
import (
"fmt"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/utils"
)
// var Configurator utils.Configurator = utils.NewConfig("ini","config/app_test.conf")
var Configurator utils.Configurator = utils.EnvConfigurator{}
var SERVICE_NAME = "allied-creation-manufacture"
var SERVICE_ENV = "dev"
var HTTP_PORT int = 8081
var CACHE_PREFIX = "allied-creation-manufacture-dev"
var LOG_LEVEL = "debug"
var LOG_FILE = "app.log"
var PPROF_ON = true
// 天联共创基础模块
var ALLIED_CREATION_BASIC_HOST = "http://localhost:8080" //"http://allied-creation-basic-dev.fjmaimaimai.com"
// 天联共创用户模块
// svar ALLIED_CREATION_USER_HOST = "http://localhost:8081"
var ALLIED_CREATION_USER_HOST = "http://allied-creation-user-test.fjmaimaimai.com"
// 天联共创业务模块
var ALLIED_CREATION_COOPERATION_HOST = "http://localhost:8082" // "http://allied-creation-cooperation-dev.fjmaimaimai.com"
var MMM_BYTE_BANK_HOST = "http://220.250.41.79:8301"
var CUSTOMER_ACCOUNT = []int64{3129687560814592, 3129687690100739, 3492238958608384}
const CUSTOMER_ACCOUNT_DELIMITER = ","
/***** 1.数据传输 *****/
const HeaderCompanyId = "companyId"
const HeaderUserId = "userId"
const HeaderOrgId = "orgId"
const HeaderOrgIds = "orgIds"
func init() {
LOG_LEVEL = Configurator.DefaultString("LOG_LEVEL", LOG_LEVEL)
ALLIED_CREATION_BASIC_HOST = Configurator.DefaultString("ALLIED_CREATION_BASIC_HOST", ALLIED_CREATION_BASIC_HOST)
ALLIED_CREATION_USER_HOST = Configurator.DefaultString("ALLIED_CREATION_USER_HOST", ALLIED_CREATION_USER_HOST)
ALLIED_CREATION_COOPERATION_HOST = Configurator.DefaultString("ALLIED_CREATION_COOPERATION_HOST", ALLIED_CREATION_COOPERATION_HOST)
MMM_BYTE_BANK_HOST = Configurator.DefaultString("MMM_BYTE_BANK_HOST", MMM_BYTE_BANK_HOST)
SERVICE_ENV = Configurator.DefaultString("SERVICE_ENV", SERVICE_ENV)
HTTP_PORT = Configurator.DefaultInt("HTTP_PORT", HTTP_PORT)
SERVICE_NAME = fmt.Sprintf("%v-%v", SERVICE_NAME, SERVICE_ENV)
PPROF_ON = Configurator.DefaultBool("PPROF_ON", PPROF_ON)
CACHE_PREFIX = SERVICE_NAME
}