Exemplo n.º 1
0
func UpdateScheduleCalcResult(predict_json []byte, schedule_int_info map[string]int, schedule_string_info map[string]string) {
	exist_schedule := new(myinit.Schedule)
	exist_schedule.ScheduleAlResult = string(predict_json)

	myinit.Engine.Cols("schedule_al_result").
		Where("schedule_fenxi_id=? AND schedule_date = ? and schedule_no=? ", schedule_int_info["schedule_fenxi_id"], schedule_string_info["schedule_date"], schedule_string_info["schedule_no"]).Update(exist_schedule)

}
Exemplo n.º 2
0
func UpdateScheduleResult(schedule_bet_date string, schedule_float_info map[string]float32, schedule_string_info map[string]string) {
	Schedule := new(myinit.Schedule)
	Schedule.ScheduleScore = schedule_string_info["schedule_score"]
	Schedule.ScheduleSpfResult = schedule_string_info["schedule_spf_result"]
	Schedule.ScheduleSpfOdd = schedule_float_info["schedule_spf_odd"]
	Schedule.ScheduleRqspfResult = schedule_string_info["schedule_rqspf_result"]
	Schedule.ScheduleRqspfOdd = schedule_float_info["schedule_rqspf_odd"]
	Schedule.ScheduleZjqResult = schedule_string_info["schedule_zjq_result"]
	Schedule.ScheduleZjqOdd = schedule_float_info["schedule_zjq_odd"]
	Schedule.ScheduleBqcResult = schedule_string_info["schedule_bqc_result"]
	Schedule.ScheduleBqcOdd = schedule_float_info["schedule_bqc_odd"]

	myinit.Engine.
		Cols("schedule_score", "schedule_spf_result", "schedule_spf_odd", "schedule_rqspf_result", "schedule_rqspf_odd", "schedule_zjq_result", "schedule_zjq_odd", "schedule_bqc_result", "schedule_bqc_odd").
		Where("schedule_result_no=? AND schedule_date=? ", schedule_string_info["schedule_result_no"], schedule_bet_date).Update(Schedule)

}
Exemplo n.º 3
0
func calcScheduleResult(fid int, date string, schedule_no string) {
	predict1_map := getPredictResMap(1, date, schedule_no)
	predict2_map := getPredictResMap(2, date, schedule_no)

	predict_map := make(map[string]interface{})
	predict_map["predict1"] = predict1_map
	predict_map["predict2"] = predict2_map

	predict_json, _ := json.Marshal(predict_map)

	exist_schedule := new(myinit.Schedule)
	exist_schedule.ScheduleAlResult = string(predict_json)

	myinit.Engine.Cols("schedule_al_result").
		Where("schedule_fenxi_id=? AND schedule_date = ? and schedule_no=? ", fid, date, schedule_no).Update(exist_schedule)

}
Exemplo n.º 4
0
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)

	}
}