コード例 #1
0
ファイル: panmap.go プロジェクト: ryancsq/test
func Add(pan_desc string, pan_value float32) {
	myinit.Myinit()
	has := CheckExists(pan_desc, pan_value)
	//	fmt.Println(has)

	if has {
		fmt.Println(pan_desc, " => ", pan_value, "已存在!")
	} else {
		PanMap := new(myinit.PanMap)
		PanMap.PanValue = pan_value
		PanMap.PanDesc = pan_desc
		myinit.Engine.Insert(PanMap)
	}
}
コード例 #2
0
ファイル: 500kan.go プロジェクト: ryancsq/test
func runParseUrl() {
	myinit.Myinit()

	for i := 0; i < 1; i++ {
		a := 86400 * int64(i)
		one_ago_unix := time.Now().Unix() - a
		t1 := time.Unix(one_ago_unix, 0)
		date := t1.Format("2006-01-02")
		fmt.Println(date)
		//		date = "2016-01-14"
		parseurl.ParseBetUrl(date, true)
		parseurl.ParseResultUrl(date, true)
	}

}
コード例 #3
0
ファイル: asiapanbackup.go プロジェクト: ryancsq/test
func Add(pan_int_info map[string]int, pan_float_info map[string]float32, pan_string_info map[string]string) {
	myinit.Myinit()
	AsiaPanBackup := new(myinit.AsiaPanBackup)
	AsiaPanBackup.ScheduleFenxiId = pan_int_info["schedule_fenxi_id"]
	AsiaPanBackup.ScheduleDate = pan_string_info["schedule_date"]
	AsiaPanBackup.ScheduleNo = pan_string_info["schedule_no"]
	AsiaPanBackup.ScheduleResultNo = pan_string_info["schedule_result_no"]
	AsiaPanBackup.ScheduleLeague = pan_string_info["schedule_league"]
	AsiaPanBackup.ScheduleHome = pan_string_info["schedule_home"]
	AsiaPanBackup.ScheduleGuest = pan_string_info["schedule_guest"]
	AsiaPanBackup.ScheduleGameDesc = pan_string_info["schedule_game_desc"]
	AsiaPanBackup.ScheduleDateDesc = pan_string_info["schedule_date_desc"]
	AsiaPanBackup.CompanyId = pan_string_info["company_id"]
	AsiaPanBackup.CompanyName = pan_string_info["company_name"]
	AsiaPanBackup.IsBigCompany = pan_int_info["is_big_company"]
	AsiaPanBackup.OpenPan = pan_float_info["open_pan"]
	AsiaPanBackup.OpenPanDesc = pan_string_info["open_pan_desc"]
	AsiaPanBackup.OpenHomeWater = pan_float_info["open_home_water"]
	AsiaPanBackup.OpenGuestWater = pan_float_info["open_guest_water"]
	AsiaPanBackup.OpenPanTime = pan_string_info["open_pan_time"]
	AsiaPanBackup.RealPan = pan_float_info["real_pan"]
	AsiaPanBackup.RealPanDesc = pan_string_info["real_pan_desc"]
	AsiaPanBackup.RealHomeWater = pan_float_info["real_home_water"]
	AsiaPanBackup.RealGuestWater = pan_float_info["real_guest_water"]
	AsiaPanBackup.PanChangeTime = pan_string_info["pan_change_time"]
	AsiaPanBackup.HomePanChangeType = pan_int_info["home_pan_change_type"]
	AsiaPanBackup.HomePanChangeTypeDesc = pan_string_info["home_pan_change_type_desc"]
	AsiaPanBackup.HomeWaterChangeType = pan_int_info["home_water_change_type"]
	AsiaPanBackup.HomeWaterChangeTypeDesc = pan_string_info["home_water_change_type_desc"]
	AsiaPanBackup.Predict1Result = pan_string_info["predict1_result"]
	AsiaPanBackup.Predict1Comment = pan_string_info["predict1_cmt"]
	AsiaPanBackup.Predict2Result = pan_string_info["predict2_result"]
	AsiaPanBackup.Predict2Comment = pan_string_info["predict2_cmt"]

	myinit.Engine.Insert(AsiaPanBackup)
	//	fmt.Println(ins_affected)
	//	fmt.Println(ins_err)
}
コード例 #4
0
ファイル: schedule.go プロジェクト: ryancsq/test
func Add(schedule_int_info map[string]int, schedule_string_info map[string]string) {
	myinit.Myinit()
	has := CheckExists(schedule_string_info["schedule_date"], schedule_string_info["schedule_no"])

	if has == true {
		fmt.Println(schedule_string_info["schedule_home"] + " vs " + schedule_string_info["schedule_guest"] + "已存在!")
	} else {
		Schedule := new(myinit.Schedule)
		Schedule.ScheduleDate = schedule_string_info["schedule_date"]
		Schedule.ScheduleNo = schedule_string_info["schedule_no"]
		Schedule.ScheduleResultNo = schedule_string_info["schedule_result_no"]
		Schedule.ScheduleLeague = schedule_string_info["schedule_league"]
		Schedule.ScheduleHome = schedule_string_info["schedule_home"]
		Schedule.ScheduleGuest = schedule_string_info["schedule_guest"]
		Schedule.ScheduleWeekDay = schedule_string_info["schedule_week_day"]
		Schedule.ScheduleFenxiId = schedule_int_info["schedule_fenxi_id"]
		Schedule.ScheduleBetEndTime = schedule_string_info["schedule_bet_end_time"]
		Schedule.ScheduleRqNum = schedule_string_info["schedule_rq_num"]

		myinit.Engine.Insert(Schedule)

	}
}