示例#1
0
文件: dzh.fin.go 项目: jiorry/gotock
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())
}
示例#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()
}
示例#3
0
文件: cwfxapp.go 项目: jiorry/gotock
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")
}
示例#4
0
文件: tdx.5m.go 项目: jiorry/gotock
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")
}
示例#5
0
文件: dzjyapp.go 项目: jiorry/gotock
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")

}
示例#6
0
文件: fillfund.go 项目: jiorry/gotock
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")
}
示例#7
0
文件: yybapp.go 项目: jiorry/gotock
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)
	}
}
示例#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)
		}
	}

}