修复 查询用户事件历史 bug
This commit is contained in:
		
							parent
							
								
									68341adf80
								
							
						
					
					
						commit
						fef3c0f6ba
					
				
							
								
								
									
										71
									
								
								cmd/main/main.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								cmd/main/main.go
									
									
									
									
									
										Normal file
									
								
							@ -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:
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@ -55,7 +55,7 @@ func main() {
 | 
			
		||||
	app.RunManager()
 | 
			
		||||
 | 
			
		||||
	app.WaitForExitSign(func() {
 | 
			
		||||
		logs.Logger.Sugar().Infof("数据上报服务停止成功...")
 | 
			
		||||
		logs.Logger.Sugar().Infof("BI 服务停止成功...")
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -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.
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -49,7 +49,7 @@
 | 
			
		||||
        <template slot="paneR">
 | 
			
		||||
          <a-spin tip="计算中..." :spinning="spinning">
 | 
			
		||||
            <div class="spin-content">
 | 
			
		||||
              <user-info-res :user_id="uid" />
 | 
			
		||||
              <user-info-res :userId="uid" />
 | 
			
		||||
            </div>
 | 
			
		||||
          </a-spin>
 | 
			
		||||
        </template>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user