diff --git a/cmd/main/main.go b/cmd/main/main.go new file mode 100644 index 0000000..0836c5f --- /dev/null +++ b/cmd/main/main.go @@ -0,0 +1,71 @@ +package main + +import ( + "flag" + "fmt" + "github.com/1340691923/xwl_bi/application" + "log" + "time" +) + +var ( + configFileDir string + configFileName string + configFileExt string +) + +func init() { + flag.StringVar(&configFileDir, "configFileDir", "config", "配置文件夹名") + flag.StringVar(&configFileName, "configFileName", "config", "配置文件名") + flag.StringVar(&configFileExt, "configFileExt", "json", "配置文件后缀") + flag.Parse() +} + +func init(){ + app := application.NewApp( + "init_app", + application.WithConfigFileDir(configFileDir), + application.WithConfigFileName(configFileName), + application.WithConfigFileExt(configFileExt), + application.RegisterInitFnObserver(application.InitLogs), + application.RegisterInitFnObserver(application.InitRedisPool), + ) + + err := app.InitConfig(). + NotifyInitFnObservers(). + Error() + + if err != nil { + log.Println(fmt.Sprintf("初始化失败%s",err.Error())) + panic(err) + } +} + +func main(){ + chExit := make(chan int,1) + go func() { + time.Sleep(1 * time.Second) + chExit <- 1 + time.Sleep(5 * time.Second) + close(chExit) + }() + + for { + select { + case v, ok := <-chExit: + if !ok { + fmt.Println("close channel 2", v) + goto EXIT2 + } + + fmt.Println("ch2 val =", v) + } + } + + EXIT2: + fmt.Println("exit testSelectFor2") + select { + default: + + } +} \ No newline at end of file diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 874e179..22c2dfe 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -55,7 +55,7 @@ func main() { app.RunManager() app.WaitForExitSign(func() { - logs.Logger.Sugar().Infof("数据上报服务停止成功...") + logs.Logger.Sugar().Infof("BI 服务停止成功...") }) } diff --git a/vue/.env.development b/vue/.env.development index 5378791..98f8d93 100644 --- a/vue/.env.development +++ b/vue/.env.development @@ -3,7 +3,7 @@ ENV = 'development' # base api # 开发环境 -VUE_APP_BASE_API = 'http://localhost:8090' +VUE_APP_BASE_API = 'http://localhost:8090/' VUE_APP_BASE_TITLE = '铸龙-埋点数据分析平台(开发)' # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, # to control whether the babel-plugin-dynamic-import-node plugin is enabled. diff --git a/vue/src/views/user-analysis/components/UserInfoRes.vue b/vue/src/views/user-analysis/components/UserInfoRes.vue index b95b02e..2cc71be 100644 --- a/vue/src/views/user-analysis/components/UserInfoRes.vue +++ b/vue/src/views/user-analysis/components/UserInfoRes.vue @@ -164,7 +164,7 @@ export default { form: { date: [], eventNames: [], - userId: this.user_id, + userId: this.userId, windowTimeFormat: '按天' }, eventName: '', @@ -172,7 +172,7 @@ export default { sortRule: 'desc', date: [], eventName: '', - userId: this.user_id, + userId: this.userId, windowTimeFormat: '按天' }, windowTimeOpt: [ @@ -245,7 +245,7 @@ export default { appid: this.$store.state.baseData.EsConnectID, orderBy: this.infoForm.sortRule, eventName: this.infoForm.eventName, - userId: this.user_id, + userId: this.userId, date: this.form.date } diff --git a/vue/src/views/user-analysis/user_info.vue b/vue/src/views/user-analysis/user_info.vue index 15d1a40..6289a05 100644 --- a/vue/src/views/user-analysis/user_info.vue +++ b/vue/src/views/user-analysis/user_info.vue @@ -49,7 +49,7 @@