提交 26aa25b1 编写于 作者: S shi.zeyuan

1.xx

上级 5d4316a1
......@@ -14,7 +14,7 @@ func main() {
base.Log.Info("---------------C1模型--------------")
base.Log.Info("---------------------------------------------------------------")
c1 := new(service.C4Service)
c1.MaxLetBall = 2
c1.MaxLetBall = 5
c1.AnalyTest()
base.Log.Info("---------------------------------------------------------------")
base.Log.Info("---------------E1模型--------------")
......
[mysql]
url=root:Meta.123@tcp(mysql.io:3306)/foot?charset=utf8
#url=root:awe.FOG5188@tcp(39.108.212.245:3306)/foot?charset=utf8
#url=root:Meta.123@tcp(mysql.io:3306)/foot?charset=utf8
url=root:awe.FOG5188@tcp(39.108.212.245:3306)/foot?charset=utf8
maxIdle=10
maxConn=50
[cookies]
......
......@@ -57,13 +57,13 @@ func (this *AnalyService) FindAll() []*entity5.AnalyResult {
}
func (this *AnalyService) AnalyTest(thiz AnalyInterface) {
var currentPage, pageSize int64 = 1, 10000
var currentPage, pageSize int64 = 1, 1000
var page *pojo.Page
page = new(pojo.Page)
page.PageSize = pageSize
page.CurPage = currentPage
matchList := make([]*entity2.MatchLast, 0)
err := this.MatchHisService.PageSql("SELECT mh.* FROM foot.t_match_his mh WHERE mh.`MatchDate` > '2019-10-01 00:00:00' AND mh.`MatchDate` < '2020-02-28 00:00:00'", page, &matchList)
err := this.MatchHisService.PageSql("SELECT mh.* FROM foot.t_match_his mh WHERE mh.`MatchDate` > '2020-02-01 00:00:00' AND mh.`MatchDate` < '2020-02-28 00:00:00'", page, &matchList)
if nil != err {
base.Log.Error(err)
return
......
......@@ -72,6 +72,10 @@ func (this *C4Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
return -2, temp_data
}
if math.Abs(a18Bet.SLetBall) > math.Abs(a18Bet.ELetBall) {
return -2, temp_data
}
//得出结果
preResult := -1
......@@ -146,24 +150,41 @@ func (this *C4Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
diffGoal := float64(mainGoal-guestGoal) / 10
diffScore := float64(mainScore-guestScore) / 10
eLetBall := a18Bet.ELetBall
//if eLetBall > 0 {
// if diffGoal > 0 && diffScore > 0 && (math.Abs(diffScore-eLetBall) < 0.25 && math.Abs(diffGoal-eLetBall) < 0.25) {
// preResult = 3
// }
//
//} else if eLetBall == 0 {
//
//} else {
// //<0
// if diffGoal < 0 && diffScore < 0 && (math.Abs(diffScore-eLetBall) < 0.25 && math.Abs(diffGoal-eLetBall) < 0.25) {
// preResult = 0
// }
//}
//
//if preResult < 0 {
// return -3, temp_data
//}
base.Log.Info("对阵:", v.MainTeamId+":"+v.GuestTeamId, ",初盘让球:", a18Bet.SLetBall, ",即时盘让球:", eLetBall, ",球差:", diffGoal, ",分差:", diffScore, " ,比分:", v.MainTeamGoals, ":", v.GuestTeamGoals, " ,半场比分:", v.MainTeamHalfGoals, ":", v.GuestTeamHalfGoals)
if eLetBall > 0 {
if diffGoal > 0 || diffScore > 0 {
if math.Abs(diffGoal-eLetBall) <= 0.25 {
preResult = 3
} else if math.Abs(diffScore-eLetBall) <= 0.25 {
preResult = 3
} else if math.Abs(diffGoal-eLetBall) >= 0.5 {
preResult = 0
} else if math.Abs(diffScore-eLetBall) >= 0.5 {
preResult = 0
}
}else{
//preResult = 3
}
}
if eLetBall < 0 {
if diffGoal < 0 || diffScore < 0 {
if math.Abs(diffGoal-eLetBall) <= 0.25 {
preResult = 0
} else if math.Abs(diffScore-eLetBall) <= 0.25 {
preResult = 0
} else if math.Abs(diffGoal-eLetBall) >= 0.5 {
preResult = 3
} else if math.Abs(diffScore-eLetBall) >= 0.5 {
preResult = 3
}
}else{
//preResult = 0
}
}
if preResult < 0 {
return -3, temp_data
}
base.Log.Info("比赛时间:", matchDateStr +",对阵:"+v.GuestTeamId, ",初盘让球:", a18Bet.SLetBall, ",即时盘让球:", eLetBall, ",球差:", diffGoal, ",分差:", diffScore, " ,比分:", v.MainTeamGoals, ":", v.GuestTeamGoals, " ,半场比分:", v.MainTeamHalfGoals, ":", v.GuestTeamHalfGoals)
var data *entity5.AnalyResult
if len(temp_data.Id) > 0 {
......@@ -173,7 +194,7 @@ func (this *C4Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
temp_data.Desc = fmt.Sprintf("分差:%v ,球差:%v", diffScore, diffGoal)
data = temp_data
//比赛结果
//data.Result = this.IsRight(v, data)
data.Result = this.IsRight(v, data)
return 1, data
} else {
data = new(entity5.AnalyResult)
......@@ -188,7 +209,7 @@ func (this *C4Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
data.PreResult = preResult
data.HitCount = 3
//比赛结果
//data.Result = this.IsRight(v, data)
data.Result = this.IsRight(v, data)
return 0, data
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册