示例#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()
	//	date := "2016-01-01"
	//	now := time.Now()
	//	date := now.Format("2006-01-02")
	date := ""
	parseurl.ParseBetUrl(date, false)
	parseurl.ParseResultUrl(date, false)

	one_ago_unix := time.Now().Unix() - 86400
	t1 := time.Unix(one_ago_unix, 0)
	parseurl.ParseResultUrl(t1.Format("2006-01-02"), false)

	//moveToBackup()

	time.Sleep(30 * time.Second)
	runParseUrl()
}
示例#3
0
文件: 500kan.go 项目: ryancsq/test
func recalResult() {
	myinit.Myinit()
	//	date := "2016-01-01"
	//	now := time.Now()
	//	date := now.Format("2006-01-02")

	//	for i:=0;i<30;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")
	//		recal(date)
	//		recalSchedule(date)
	//	}
	date := "2016-02-01"

	recal(date)
	recalSchedule(date)

}
示例#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)

	}
}
示例#5
0
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)
}
示例#6
0
文件: analyse11.go 项目: ryancsq/test
func AnalysePanResult1(pan_int_info map[string]int, pan_float_info map[string]float32, pan_string_info map[string]string) (ret string, cmt string) {
	open_pan := pan_float_info["open_pan"]
	open_pan_home_water := pan_float_info["open_home_water"]
	open_pan_guest_water := pan_float_info["open_guest_water"]
	real_pan := pan_float_info["real_pan"]
	real_pan_home_water := pan_float_info["real_home_water"]
	real_pan_guest_water := pan_float_info["real_guest_water"]

	home_pan_change_type := pan_int_info["home_water_change_type"]
	schedule_game_desc := pan_string_info["schedule_game_desc"]

	schedule_fenxi_id := pan_int_info["schedule_fenxi_id"]
	company_id := pan_string_info["company_id"]
	myinit.Myinit()
	engine = myinit.Engine
	//	fmt.Println("+++++++++++")
	//	fmt.Println(schedule_fenxi_id)
	switch {
	case open_pan == 0:
		//		fmt.Println("0 open:", open_pan)

		if open_pan == real_pan {
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位	≤0.875	主队胜"
			} else {
				ret = "1/0"
				cmt = "主队水位	>0.875	平或客队胜"
				if real_pan_home_water < open_pan_home_water {
					ret = "1/0"
					cmt = "主队水位	>0.875	主队即时盘口水位小于初盘水位,多为平局"
				}
			}

			if open_pan_home_water == open_pan_guest_water {
				ret = "1"
				cmt = "主队水位=	客队水位	平"
				if real_pan_home_water < 0.875 {
					ret = "3"
					cmt = "主队水位=	客队水位	平,即时水位<0.875队胜出"

				}
			}

			if checkPanAndWaterNotChange(schedule_fenxi_id, company_id, open_pan) == true && real_pan_home_water < 0.875 {
				ret = "3"
				cmt = "盘口、水位一直不变		即时水位<0.875队胜出"
			}
		} else if home_pan_change_type == 1 {
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位	≤0.875	主队胜"
			} else {
				ret = "1/0"
				cmt = "主队水位	>0.875	平或客队胜  多为平局"
			}
		} else if home_pan_change_type == -1 {
			if real_pan_guest_water > 0.875 {
				ret = "3/1"
				cmt = "客队水位	>0.875	主队胜或平"
			} else {
				ret = "1/0"
				cmt = "客队水位	≤0.875	平或客队胜"
			}
		}

		//		fmt.Println("open:", open_pan, ret, cmt)
	case open_pan == (-0.25):
		//		fmt.Println("-0.25 open:", open_pan)
		if open_pan == real_pan {
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位	≤0.875	主队胜"
			} else {
				ret = "1/0"
				cmt = "主队水位	>0.875	平或客队胜"
			}

			if open_pan_home_water == open_pan_guest_water && real_pan_home_water > 0.875 {
				ret = "3"
				cmt = "主队水位=	客队水位	即时水位>0.875队胜出	"
			}
			if checkPanAndWaterNotChange(schedule_fenxi_id, company_id, open_pan) == true {
				ret = "3/0"
				cmt = "盘口、水位一直不变		双方能分胜负		德甲主队胜概率大"
			}
			if checkPanNotChange(schedule_fenxi_id, company_id, open_pan) == true && checkIsGermanyJia(schedule_game_desc) == true {
				ret = "1/0"
				cmt = "若为德甲,盘口不变而水位发生变化们一般是下盘胜出			对应结果:	1/0	"
			}
		} else if home_pan_change_type == 1 {
			if open_pan_home_water <= 0.875 {
				if real_pan_home_water > 0.875 && checkWaterIsDown(schedule_fenxi_id, company_id) {
					ret = "3"
					cmt = "主队水位	≤0.875	即时水位>0.875并且水位持续下降	主队胜"
				} else if real_pan_home_water <= 0.875 {
					ret = "1/0"
					cmt = "主队水位	≤0.875	即时水位≤0.875	平或客队胜"
				}
			} else {
				ret = "1/0"
				cmt = "主队水位	>0.875		平或客队胜 多为平局"
			}
		} else if home_pan_change_type == -1 {
			ret = "1/0"
			cmt = "其余情况			平或客队胜	对应结果:	1/0"
			if open_pan_home_water <= 0.875 {
				if real_pan_home_water <= 0.875 {
					ret = "0"
					cmt = "主队水位	≤0.875	即时水位≤0.875	客队胜"
				} else {
					ret = "1"
					cmt = "主队水位	≤0.875	即时水位>0.875	平"
				}
				//			} else {
				//				ret = "1/0"
				//				cmt = "其余情况			平或客队胜	对应结果:	1/0"
			}

		}
	case open_pan == (-0.5):
		if open_pan == real_pan {
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位	≤0.875	主队胜	对应结果:	3"
			} else {
				ret = "1/0"
				cmt = "主队水位	>0.875	平或客队胜	对应结果:	1/0"
			}

			if checkPanAndAllWaterNotChange(schedule_fenxi_id, company_id, open_pan) == true {
				if open_pan_home_water <= 0.875 {
					ret = "1/0"
					cmt = "盘口、水位一直不变		初盘水位	主队水位	≤0.875	平或客队胜	对应结果:	1/0"
				} else {
					ret = "3"
					cmt = "盘口、水位一直不变		初盘水位	主队水位	>0.875	主队胜	对应结果:	3"
				}
			}

		} else if home_pan_change_type == 1 {
			if open_pan_home_water <= 0.875 {
				if real_pan_home_water > 0.875 {
					ret = "3"
					cmt = "主队水位	≤0.875	即时水位>0.875	主队胜	对应结果:	3"
				} else {
					ret = "1"
					cmt = "主队水位	≤0.875	即时水位≤0.875	平	对应结果:	1"
				}
			} else {
				ret = "0"
				cmt = "主队水位	>0.875		客队胜	对应结果:	0"
			}
		} else if home_pan_change_type == -1 {
			//			fmt.Println("-0.5====")
			//			fmt.Println(open_pan_home_water)
			//			fmt.Println(real_pan_home_water)
			if open_pan_home_water > 0.875 {
				if real_pan_home_water <= 0.875 {
					ret = "3/1"
					cmt = "主队水位	>0.875	即时水位≤0.875	主胜或平	对应结果:	3、1"
				} else {
					ret = "0"
					cmt = "主队水位	>0.875	即时水位>0.875	客队胜	对应结果:	0"
				}
				//			} else {
				//				ret = "1/0"
				//				cmt = "其余情况			平或客队胜	对应结果:	1/0"
			}
		}
		//		fmt.Println("-0.5 open:", open_pan)

	case open_pan == (-0.75):
		fmt.Println(open_pan, real_pan, open_pan_home_water, real_pan_home_water)

		if open_pan == real_pan {
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位	≤0.875	主队胜	对应结果:	3"
			} else {
				if real_pan_home_water <= 0.875 {
					ret = "1/0"
					cmt = "主队水位	>0.875	即时水位≤0.875	平或客队胜	对应结果:	1/0"
				} else {
					ret = "3"
					cmt = "主队水位	>0.875	即时水位>0.875	主队胜	对应结果:	3"
				}
				if real_pan_home_water == open_pan_home_water {
					ret = "0"
					cmt = "主队水位	>0.875	即时水位=初盘水位	客队胜	对应结果:	0"
				}
			}

		} else if home_pan_change_type == 1 {
		} else if home_pan_change_type == -1 {
			if open_pan_home_water <= 0.875 {
				if real_pan_home_water > 0.875 {
					ret = "1"
					cmt = "主队水位	≤0.875	即时水位>0.875	平	对应结果:	1"
				} else {
					ret = "0"
					cmt = "主队水位	≤0.875	即时水位≤0.875	客队胜	对应结果:	0"
				}
			}

		}
		//		fmt.Println("-0.75: open:", open_pan)

	case open_pan <= -1:
		//	case -1.25:
		//	case -1.5:
		flag := false
		if checkPanNotLower(schedule_fenxi_id, company_id, open_pan) == true && checkWaterNotChange(schedule_fenxi_id, company_id) == false {
			if open_pan_home_water > 0.875 {
				ret = "3"
				cmt = "主队水位	>0.875	主队胜	对应结果:	3"
				flag = true

			}
		}
		if checkPanNotChange(schedule_fenxi_id, company_id, open_pan) == false && open_pan <= (-1) && real_pan != (-1) {
			if open_pan_home_water > 0.875 && real_pan_home_water <= 0.875 {
				ret = "3/1"
				cmt = "主队水位	>0.875	即时水位≤0.875"
				flag = true
			}
		}

		if open_pan < (-1.5) && checkPanNotChange(schedule_fenxi_id, company_id, open_pan) == true {
			if open_pan_home_water < 0.8 {
				ret = "3/0"
				cmt = "初盘盘口数值<-1.5) 初盘水位	主队水位	<0.8	有爆冷可能	胜或负 "
				flag = true
			}
		}

		if flag == false {
			if open_pan_home_water < 0.875 {
				//其他情况
				ret = "3"
				cmt = "其余情况 初盘水位	主队水位	<0.875	主队胜	对应结果:	3"
			}
		}
		//		fmt.Println("-1 open:", open_pan)
	default:
		//		fmt.Println("qita open:", open_pan)
		ret = ""
		cmt = ""

	}
	return ret, cmt
}
示例#7
0
文件: analyse1.go 项目: ryancsq/test
func AnalysePanResult1(pan_int_info map[string]int, pan_float_info map[string]float32, pan_string_info map[string]string) (ret string, cmt string) {
	open_pan := pan_float_info["open_pan"]
	open_pan_home_water := pan_float_info["open_home_water"]
	open_pan_guest_water := pan_float_info["open_guest_water"]
	real_pan := pan_float_info["real_pan"]
	real_pan_home_water := pan_float_info["real_home_water"]
	real_pan_guest_water := pan_float_info["real_guest_water"]

	home_pan_change_type := pan_int_info["home_pan_change_type"]
	schedule_game_desc := pan_string_info["schedule_game_desc"]

	fid := pan_int_info["schedule_fenxi_id"]
	cid := pan_string_info["company_id"]
	myinit.Myinit()
	engine = myinit.Engine
	//	fmt.Println("+++++++++++")
	//	fmt.Println(schedule_fenxi_id)
	pre_cmt := ""
	switch {
	case open_pan == 0:
		if checkPanNotChange(fid, cid, open_pan) == true {
			pre_cmt = "一直保持平手盘(盘口数值为0)不变"
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位≤0.875,主队胜"
			} else {
				ret = "1/0"
				cmt = "主队水位>0.875,平或客队胜"
				if real_pan_home_water < open_pan_home_water {
					ret = "1/0"
					cmt = "主队水位>0.875,主队即时盘口水位小于初盘水位,<b>多为平局</b>"
				}
			}

			if open_pan_home_water == open_pan_guest_water {
				ret = "1"
				cmt = "主队水位=客队水位,平"
				if real_pan_home_water < 0.875 {
					ret = "3"
					cmt = "主队水位=客队水位,平,即时水位<0.875队胜出"
				}
			}

			if checkWaterNotChange(fid, cid) == true && (real_pan_home_water < 0.875) {
				ret = "3"
				cmt = "盘口、水位一直不变,即时水位<0.875队胜出"
			}
		} else if home_pan_change_type == 1 {
			pre_cmt = "相对主队出现升盘(平手升平半、平手升半球)初盘盘口=0,即时盘口数值<0"
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位≤0.875,主队胜"
			} else {
				ret = "1/0"
				cmt = "主队水位>0.875,平或客队胜,<b>多为平局</b>"
			}
		} else if home_pan_change_type == -1 {
			pre_cmt = "相对主队出现降盘(初盘盘口=0,即时盘口数值>0)"

			if real_pan_guest_water > 0.875 {
				ret = "3/1"
				cmt = "客队水位>0.875,主队胜或平"
			} else {
				ret = "1/0"
				cmt = "客队水位≤0.875,平或客队胜"
			}
		}
	case open_pan == (-0.25):
		if checkPanNotChange(fid, cid, open_pan) == true {
			pre_cmt = "一直保持平半(盘口数值为-0.25)不变"
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位≤0.875,主队胜"
			} else {
				ret = "1/0"
				cmt = "主队水位>0.875,平或客队胜"
			}

			if open_pan_home_water == open_pan_guest_water && real_pan_home_water > 0.875 {
				ret = "3"
				cmt = "主队水位=客队水位,即时水位>0.875队胜出"
			}
			if checkWaterNotChange(fid, cid) == true {
				ret = "3/0"
				cmt = "盘口、水位一直不变,双方能分胜负,<b>德甲主队胜概率大</b>"
			}
			if checkWaterNotChange(fid, cid) == false && checkIsGermanyJia(schedule_game_desc) == true {
				ret = "1/0"
				cmt = "<b>若为德甲,盘口不变而水位发生变化们一般是下盘胜出</b>,对应结果:1/0"
			}
		} else if home_pan_change_type == 1 {
			pre_cmt = "相对主队出现升盘(平半升半球或一球)初盘盘口=-0.25,即时盘口数值<-0.25"
			if open_pan_home_water <= 0.875 {
				//				if real_pan_home_water > 0.875 && checkWaterIsDown(fid, cid) == false {
				if real_pan_home_water > 0.875 {
					ret = "3"
					cmt = "主队水位≤0.875,即时水位>0.875,主队胜"
				} else if real_pan_home_water <= 0.875 {
					ret = "1/0"
					cmt = "主队水位≤0.875,即时水位≤0.875,平或客队胜"
				}
			} else {
				ret = "1/0"
				cmt = "主队水位>0.875,平或客队胜,<b>多为平局</b>"
			}
		} else if home_pan_change_type == -1 {
			pre_cmt = "相对主队出现降盘(初盘盘口=-0.25,即时盘口数值>-0.25)"
			ret = "1/0"
			cmt = "其余情况:平或客队胜,对应结果:	1/0"
			if open_pan_home_water <= 0.875 {
				if real_pan_home_water <= 0.875 {
					ret = "0"
					cmt = "主队水位≤0.875,即时水位≤0.875,客队胜"
				} else {
					ret = "1"
					cmt = "主队水位≤0.875,即时水位>0.875,平"
				}
			}
		}
	case open_pan == (-0.5):
		if checkPanNotChange(fid, cid, open_pan) == true {
			pre_cmt = "一直保持半球盘(盘口数值为-0.5)不变"
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位≤0.875,主队胜,对应结果:3"
			} else {
				ret = "1/0"
				cmt = "主队水位>0.875,平或客队胜,对应结果:1/0"
			}

			if checkWaterNotChange(fid, cid) == true {
				if open_pan_home_water <= 0.875 {
					ret = "1/0"
					cmt = "盘口、水位一直不变,初盘水位-主队水位-≤0.875,平或客队胜,对应结果:1/0"
				} else {
					ret = "3"
					cmt = "盘口、水位一直不变,初盘水位-主队水位->0.875	主队胜,对应结果:3"
				}
			}
		} else if home_pan_change_type == 1 {
			pre_cmt = "相对主队出现升盘(半球升半一或半球升一球)初盘盘口=-0.5,即时盘口数值<-0.5"
			if open_pan_home_water <= 0.875 {
				if real_pan_home_water > 0.875 {
					ret = "3"
					cmt = "主队水位≤0.875	即时水位>0.875,主队胜,对应结果:	3"
				} else {
					ret = "1"
					cmt = "主队水位≤0.875	即时水位≤0.875,平,对应结果:1"
				}
			} else {
				ret = "0"
				cmt = "主队水位>0.875,客队胜,对应结果:0"
			}
		} else if home_pan_change_type == -1 {
			pre_cmt = "相对主队出现降盘(初盘盘口=-0.5,即时盘口数值>-0.5)"
			ret = "1/0"
			cmt = "其余情况:平或客队胜,对应结果:	1/0"
			if open_pan_home_water > 0.875 {
				if real_pan_home_water <= 0.875 {
					ret = "3/1"
					cmt = "主队水位>0.875,即时水位≤0.875,主胜或平,对应结果:3/1"
				} else {
					ret = "0"
					cmt = "主队水位>0.875,即时水位>0.875,客队胜,对应结果:0"
				}
			}
		}
	case open_pan == (-0.75):
		fmt.Println(open_pan, real_pan, open_pan_home_water, real_pan_home_water, home_pan_change_type)

		if checkPanNotChange(fid, cid, open_pan) == true {
			pre_cmt = "一直保持半球盘(盘口数值为-0.75)不变"
			if open_pan_home_water <= 0.875 {
				ret = "3"
				cmt = "主队水位≤0.875	主队胜,对应结果:3"
			} else {
				if real_pan_home_water <= 0.875 {
					ret = "1/0"
					cmt = "主队水位>0.875即时水位≤0.875平或客队胜,对应结果:1/0"
				} else {
					ret = "3"
					cmt = "主队水位>0.875即时水位>0.875,主队胜,对应结果:	3"
				}
				if real_pan_home_water == open_pan_home_water {
					ret = "0"
					cmt = "主队水位>0.875即时水位=初盘水位,客队胜,对应结果:0"
				}
			}

		} else if home_pan_change_type == 1 {
		} else if home_pan_change_type == -1 {
			pre_cmt = "相对主队出现降盘(初盘盘口=-0.75,即时盘口数值>-0.75)"
			if open_pan_home_water <= 0.875 {
				if real_pan_home_water > 0.875 {
					ret = "1"
					cmt = "主队水位≤0.875	即时水位>0.875,平	对应结果:1"
				} else {
					ret = "0"
					cmt = "主队水位≤0.875	即时水位≤0.875,客队胜,对应结果:0"
				}
			}
		}
	case open_pan <= -1:
		pre_cmt = "<=-1 其余情况"
		ret = "3"
		cmt = "初盘水位-主队水位<0.875	主队胜,对应结果:3"
		if checkPanNotChange(fid, cid, open_pan) == true {
			pre_cmt = "一直保持一球或以上(盘口数值为≤-1)不变"
			if open_pan_home_water > 0.875 {
				ret = "3"
				cmt = "主队水位>0.875主队胜,对应结果:3"
			}
		}
		if checkPanNotChange(fid, cid, open_pan) == false && open_pan <= (-1) && real_pan != open_pan {
						pre_cmt = "相对主队盘口变化(初盘盘口≤-1,即时盘口数值≠初盘盘口)"

			if open_pan_home_water > 0.875 && real_pan_home_water <= 0.875 {
				ret = "3/1"
				cmt = "主队水位>0.875即时水位≤0.875,胜或平,对应结果:3/1"
			}
		}

		if open_pan < (-1.5) && checkPanNotChange(fid, cid, open_pan) == true {
			if open_pan_home_water <= 0.8 {
				ret = "3/0"
				cmt = "初盘盘口数值<-1.5,初盘水位-主队水位<=0.8,有爆冷可能	胜或负3/0"
			}
		}		
	default:
		//		fmt.Println("qita open:", open_pan)
		ret = ""
		cmt = ""
	}
	return ret, pre_cmt+":"+cmt
}
示例#8
0
文件: analyse2.go 项目: ryancsq/test
func AnalysePanResult2(pan_int_info map[string]int, pan_float_info map[string]float32, pan_string_info map[string]string) (ret string, cmt string) {
	open_pan := pan_float_info["open_pan"]
	open_pan_home_water := pan_float_info["open_home_water"]
	open_pan_guest_water := pan_float_info["open_guest_water"]
	real_pan := pan_float_info["real_pan"]
	real_pan_home_water := pan_float_info["home_real_water"]
	real_pan_guest_water := pan_float_info["guest_real_water"]

	home_pan_change_type := pan_int_info["home_water_change_type"]
	schedule_game_desc := pan_string_info["schedule_game_desc"]

	fid := pan_int_info["schedule_fenxi_id"]
	cid := pan_string_info["company_id"]

	myinit.Myinit()
	engine = myinit.Engine
	//	fmt.Println("+++++++++++")
	//	fmt.Println(fid)
	switch {
	case open_pan == 0:
		if checkPanNotChange(fid, cid, open_pan) == true {
			if checkWaterNotChange(fid, cid) == true {
				cmt = "一直保持平手盘(盘口数值为0)盘口、水位一直不变"
				if real_pan_home_water < real_pan_guest_water {
					ret = "3"
					cmt += "即时水位相对小的队胜出(主队)"
				} else if real_pan_home_water > real_pan_guest_water {
					ret = "0"
					cmt += "即时水位相对小的队胜出(客队)"
				} else {

				}
			} else {
				cmt = "一直保持平手盘(盘口数值为0)不变,只是水位有涨跌。"
				if open_pan_home_water < open_pan_guest_water {
					ret = "3"
					cmt += "主队水位	<客队水位	主队胜"
				} else if open_pan_home_water > open_pan_guest_water {
					ret = "1/0"
					cmt += "主队水位	>客队水位	平或客队胜"
					if real_pan_home_water < open_pan_home_water {
						ret = "1/0"
						cmt += "主队水位	>客队水位	主队即时盘口水位小于初盘水位,多为平局"
					}
				} else {
					//open_pan_home_water == open_pan_guest_water
					ret = "1"
					cmt += "主队水位=	客队水位	平"

					if real_pan_home_water < real_pan_guest_water {
						ret = "3/" + ret
						cmt += "即时水位相对小的队胜出(主队)"

					} else if real_pan_home_water > real_pan_guest_water {
						ret = ret + "/0"
						cmt += "即时水位相对小的队胜出(客队)"
					} else {

					}
				}
			}

		} else if home_pan_change_type == 1 {
			cmt = "相对主队出现升盘(平手升平半、平手升半球)初盘盘口=0,即时盘口数值<0"
			if open_pan_home_water < open_pan_guest_water {
				ret = "3"
				cmt += "主队水位	<客队水位	主队胜"
			} else if open_pan_home_water > open_pan_guest_water {
				ret = "1/0"
				cmt += "主队水位	>客队水位	平或客队胜  多为平局"
			}
		} else if home_pan_change_type == -1 {
			cmt = "相对主队出现降盘(初盘盘口=0,即时盘口数值>0)"
			if real_pan_guest_water > real_pan_home_water {
				ret = "3/1"
				cmt += "客队水位	>主队水位	主队胜或平"
			} else if real_pan_guest_water < real_pan_home_water {
				ret = "1/0"
				cmt += "客队水位	<主队水位	平或客队胜"
			}
		}

		//		fmt.Println("open:", open_pan, ret, cmt)
	case open_pan == (-0.25):
		if checkPanNotChange(fid, cid, open_pan) == true {
			if checkWaterNotChange(fid, cid) == true {
				cmt = "一直保持平半(盘口数值为-0.25)不变 盘口、水位一直不变"
				ret = "3/0"
				cmt += "双方能分胜负 德甲主队胜概率大"

			} else {
				cmt = "一直保持平半(盘口数值为-0.25)不变,只是水位有涨跌。"
				if checkIsGermanyJia(schedule_game_desc) == true {
					ret = "1/0"
					cmt += "为德甲,盘口不变而水位发生变化们一般是下盘胜出"
				} else {
					if open_pan_home_water < open_pan_guest_water {
						ret = "3"
						cmt += "主队水位	<客队水位	主队胜"
					} else if open_pan_home_water > open_pan_guest_water {
						ret = "1/0"
						cmt += "主队水位	>客队水位	平或客队胜"
					} else {
						//open_pan_home_water == open_pan_guest_water
						cmt += "即时水位相对大的队胜出"

						if real_pan_home_water > real_pan_guest_water {
							ret = "3"
							cmt += "即时水位相对大的队胜出(主队)"

						} else if real_pan_home_water < real_pan_guest_water {
							ret = "0"
							cmt += "即时水位相对大的队胜出(客队)"
						} else {

						}
					}
				}

			}
		} else if home_pan_change_type == 1 {
			cmt = "相对主队出现升盘(平半升半球或一球)初盘盘口=-0.25,即时盘口数值<-0.25"
			if open_pan_home_water < open_pan_guest_water {
				if real_pan_home_water > real_pan_guest_water && checkWaterIsDown(fid, cid) == true {
					ret = "3"
					cmt += "主队水位	<客队水位	即时水位>客队水位并且水位持续下降	主队胜"
				} else if real_pan_home_water < real_pan_guest_water {
					ret = "1/0"
					cmt += "主队水位	<客队水位 	即时水位<客队水位	平或客队胜"
				}
			} else if open_pan_home_water > open_pan_guest_water {
				ret = "1/0"
				cmt += "主队水位	>客队水位	平或客队胜 多为平局"
			}
		} else if home_pan_change_type == -1 {
			cmt = "相对主队出现降盘(初盘盘口=-0.25,即时盘口数值>-0.25)"
			if open_pan_home_water < open_pan_guest_water {
				if real_pan_home_water < real_pan_guest_water {
					ret = "0"
					cmt += "主队水位	<客队水位 	即时水位<客队水位 	客队胜"
				} else if real_pan_home_water > real_pan_guest_water {
					ret = "1"
					cmt += "主队水位	<客队水位 	即时水位>客队水位 	平"
				}
			}

		}
	case open_pan == (-0.5):
		if checkPanNotChange(fid, cid, open_pan) == true {
			if checkWaterNotChange(fid, cid) == true {
				cmt = "一直保持半球盘(盘口数值为-0.5)不变 盘口、水位一直不变."
				if open_pan_home_water < open_pan_guest_water {
					ret = "1/0"
					cmt += "初盘水位	主队水位	<客队水位	平或客队胜	对应结果:	1/0"

				} else if open_pan_home_water > open_pan_guest_water {
					ret = "3"
					cmt += "初盘水位	主队水位	>客队水位	主队胜	对应结果:	3"
				}
			} else {
				cmt = "一直保持半球盘(盘口数值为-0.5)不变,只是水位有涨跌。"
				if open_pan_home_water < open_pan_guest_water {
					ret = "3"
					cmt += "主队水位	<客队水位	主队胜"
				} else if open_pan_home_water > open_pan_guest_water {
					ret = "1/0"
					cmt += "主队水位	>客队水位	平或客队胜"
				} else {

				}
			}
		} else if home_pan_change_type == 1 {
			cmt = "相对主队出现升盘(半球升半一或半球升一球)初盘盘口=-0.5,即时盘口数值<-0.5"
			if open_pan_home_water < open_pan_guest_water {
				if real_pan_home_water > real_pan_guest_water {
					ret = "3"
					cmt += "主队水位	<客队水位 	即时水位>客队水位	主队胜	对应结果:	3"
				} else if real_pan_home_water < real_pan_guest_water {
					ret = "1"
					cmt += "主队水位	<客队水位 	即时水位<客队水位	平	对应结果:	1"
				}
			} else if open_pan_home_water > open_pan_guest_water {
				ret = "0"
				cmt += "主队水位	>客队水位		客队胜	对应结果:	0"
			}
		} else if home_pan_change_type == -1 {
			jiang_flag := false
			cmt = "相对主队出现降盘(初盘盘口=-0.5,即时盘口数值>-0.5)"
			if open_pan_home_water > open_pan_guest_water {
				if real_pan_home_water < real_pan_guest_water {
					ret = "3/1"
					cmt += "主队水位	>客队水位	即时水位<客队水位	主胜或平	对应结果:	3、1"
					jiang_flag = true
				} else if real_pan_home_water > real_pan_guest_water {
					ret = "0"
					cmt += "主队水位	>客队水位	即时水位>客队水位	客队胜	对应结果:	0"
					jiang_flag = true

				}

			}
			if jiang_flag == false {
				ret = "1/0"
				cmt += "其余情况			平或客队胜	对应结果:	1/0"
			}
		}
	case open_pan == (-0.75):
		if checkPanNotChange(fid, cid, open_pan) == true {
			if checkWaterNotChange(fid, cid) == false {
				cmt = "一直保持半球盘(盘口数值为-0.75)不变,只是水位有涨跌。"
				if open_pan_home_water < open_pan_guest_water {
					ret = "3"
					cmt += "主队水位	<客队水位	主队胜"
				} else if open_pan_home_water > open_pan_guest_water {
					if real_pan_home_water < real_pan_guest_water {
						ret = "1/0"
						cmt += "主队水位	>客队水位 即时水位<客队水位	平或客队胜"
					} else if real_pan_home_water > real_pan_guest_water {
						ret = "3"
						cmt += "主队水位	>客队水位 即时水位<客队水位	主队胜"
					} else {

					}
					if real_pan_home_water == open_pan_home_water {
						ret = "0"
						cmt += "主队水位	>客队水位 即时水位=初盘水位	客队胜"
					}

				} else {

				}
			}
		} else if home_pan_change_type == 1 {
		} else if home_pan_change_type == -1 {
			cmt = "相对主队出现降盘(初盘盘口=-0.75,即时盘口数值>-0.75)"
			if open_pan_home_water < open_pan_guest_water {
				if real_pan_home_water > real_pan_guest_water {
					ret = "1"
					cmt += "主队水位	<客队水位	 即时水位>客队水位	平	对应结果:	1"
				} else if real_pan_home_water < real_pan_guest_water {
					ret = "0"
					cmt += "主队水位	<客队水位		即时水位< 客队水位	客队胜	对应结果:	0"
				}
			}

		}
		//		fmt.Println("-0.75: open:", open_pan)

	case open_pan <= -1:
		//	case -1.25:
		//	case -1.5:
		flag := false
		if checkPanNotChange(fid, cid, open_pan) == true && checkWaterNotChange(fid, cid) == false {
			if open_pan_home_water > open_pan_guest_water {
				ret = "3"
				cmt = "一直保持一球或以上(盘口数值为≤-1)不变,只是水位有涨跌。主队水位	>客队水位	主队胜	对应结果:	3"
				flag = true
			}
		}
		if checkPanNotChange(fid, cid, open_pan) == false && open_pan <= (-1) && real_pan != open_pan {
			if open_pan_home_water > open_pan_guest_water && real_pan_home_water <= real_pan_guest_water {
				ret = "3/1"
				cmt = "相对主队盘口变化(初盘盘口≤-1,即时盘口数值≠初盘盘口).主队水位	>客队水位	即时水位<客队水位 胜或平"
				flag = true
			}
		}

		if open_pan < (-1.5) && checkPanNotChange(fid, cid, open_pan) == true {
			if open_pan_home_water < 0.8 {
				ret = "3/0"
				cmt += "初盘盘口数值<-1.5),即时盘口数值不变 初盘水位	主队水位	<0.8	有爆冷可能	胜或负 "
				flag = true
			}
		}

		if flag == false {
			if open_pan_home_water < open_pan_guest_water {
				//其他情况
				ret = "3"
				cmt += "其余情况 初盘水位	主队水位	<客队水位	主队胜	对应结果:	3"
			}
		}
		//		fmt.Println("-1 open:", open_pan)
	default:
		//		fmt.Println("qita open:", open_pan)
		ret = ""
		cmt = ""

	}
	return ret, cmt
}