Exemplo n.º 1
0
func main() {
	c := conf.Load("../../app/app.conf")
	db.Init("app", c.GetConf("db").MapData())
	db.Current().Log = log.NewEmpty()
	log.Level = log.LOG_ERR

	fmt.Println(dzh.FillStockInfo())
}
Exemplo n.º 2
0
func main() {
	c := conf.Load("../../app/app.conf")
	db.Init("app", c.GetConf("db").MapData())
	db.Current().Log = log.NewEmpty()
	log.Level = log.LOG_ERR

	hexun.FillPingGuData()
}
Exemplo n.º 3
0
func main() {
	c := conf.Load("../../app/app.conf")
	db.Init("app", c.GetConf("db").MapData())
	db.Current().Log = log.NewEmpty()
	log.Level = log.LOG_ERR

	dfcf.FillCwfx("2015-09-30")
}
Exemplo n.º 4
0
func main() {
	c := conf.Load("../../app/app.conf")
	db.Init("app", c.GetConf("db").MapData())
	db.Current().Log = log.NewEmpty()

	tdx.ScanAndStore("sh", `C:\Program360\new_tdx\vipdoc\sh\fzline`, ".lc5")

	tdx.ScanAndStore("sz", `C:\Program360\new_tdx\vipdoc\sz\fzline`, ".lc5")
}
Exemplo n.º 5
0
func main() {
	c := conf.Load("../../app/app.conf")
	db.Init("app", c.GetConf("db").MapData())
	db.Current().Log = log.NewEmpty()
	log.Level = log.LOG_ERR

	fmt.Println(dfcf.FillDzjy(gos.NowInLocation()), "finished")

}
Exemplo n.º 6
0
func main() {
	c := conf.Load("../../app/app.conf")
	db.Init("app", c.GetConf("db").MapData())
	db.Current().Log = log.NewEmpty()
	log.Level = log.LOG_ERR

	// hexun.FillFundRank(1, "2015-09-30")
	// return
	hexun.FillFundRankAll("2015-09-30")
}
Exemplo n.º 7
0
func main() {
	c := conf.Load("../../app/app.conf")
	db.Init("app", c.GetConf("db").MapData())
	db.Current().Log = log.NewEmpty()
	// log.Level = log.LOG_ERR
	log.Init("", nil)
	gos.Log = log.App

	err := dfcf.FillYyb()
	if err != nil {
		fmt.Println(err)
	}
}
Exemplo n.º 8
0
func main() {
	c := conf.Load("../../app/app.conf")
	db.Init("app", c.GetConf("db").MapData())
	db.Current().Log = log.NewEmpty()

	lastDate := "2015-09-30"
	ist := db.NewInsertBuilder("fin_dubang")
	exist := db.NewExistsBuilder("fin_dubang")
	dataset, _ := db.NewQueryBuilder("stock").Select("id,code,ctype").Limit(0).Query()
	isIst := false

	for i, data := range dataset {
		fmt.Println("--", i, "--", data.GetString("code"))
		if exist.Where("stock_id=? and date=?", data.GetInt64("id"), lastDate).Exists() {
			fmt.Println("exists", lastDate, "return")
			continue
		}

		dubangList, err := dfcf.FetchDubang(data.GetString("code"), data.GetString("ctype"))
		if err != nil {
			fmt.Println(err)
			continue
		}

		if len(dubangList) == 0 {
			continue
		}

		isIst = false
		for _, dubang := range dubangList {
			dubang.StockId = data.GetInt64("id")

			if exist.Where("stock_id=? and date=?", dubang.StockId, dubang.Date).Exists() {
				fmt.Println("exists", dubang.Date, "return")
				continue
			}

			fmt.Println("insert", dubang.Date)
			ist.Insert(dubang)
			isIst = true
		}

		if isIst {
			time.Sleep(1 * time.Second)
		}
	}

}