提交 7e33568e 编写于 作者: M monomania

1.增加命中次数目标

上级 d287b33f
......@@ -26,8 +26,8 @@ cycle_time=68
team_option=0-3:-1,4-18:-1,19-23:-1
###使用的算法,如是推荐到雷速,使用Euro20191212Service,如是推荐到其他平台可暂不使用
#al_flag=Euro20191212Service
###处法命中次数
hit_count=3
###确认命中次数
hit_count=2
[leisu]
###执行周期间隔时间
cycle_time=30
......
......@@ -18,6 +18,8 @@ type AnalyResult struct {
PreResult int `xorm:" comment('预测结果') index"`
//命中次数
HitCount int `xorm:" comment('预测结果命中次数') index"`
//target 命中次数
THitCount int `xorm:" comment('达标预测结果命中次数') index"`
Result string `xorm:" comment('实际结果') index"`
//算法标识
AlFlag string `xorm:" comment('算法标识') index"`
......
......@@ -146,6 +146,7 @@ FROM
foot.t_analy_result ar
WHERE ml.LeagueId = l.Id
AND ml.Id = ar.MatchId
AND ar.HitCount >= THitCount
AND ar.LeisuPubd IS FALSE
AND ar.MatchDate > NOW()
`
......
package service
import (
"math"
"reflect"
"strconv"
"strings"
......@@ -138,6 +139,12 @@ func (this *Asia20191206Service) analyStub(v *pojo.MatchLast) (int, *entity5.Ana
data.AlSeq = format
data.PreResult = preResult
data.HitCount = 1
hours := v.MatchDate.Sub(time.Now()).Hours()
if hours > 0 {
hours = math.Abs(hours * 0.7)
data.THitCount = int(hours)
}
data.LetBall = a18betData.ELetBall
//比赛结果
data.Result = this.IsRight(a18betData, v, data)
......
......@@ -152,6 +152,11 @@ func (this *Euro20191206Service) analyStub(v *pojo.MatchLast) (int, *entity5.Ana
data.AlSeq = format
data.PreResult = preResult
data.HitCount = 1
hours := v.MatchDate.Sub(time.Now()).Hours()
if hours > 0 {
hours = math.Abs(hours * 0.7)
data.THitCount = int(hours)
}
data.LetBall = a18betData.ELetBall
//比赛结果
data.Result = this.IsRight(a18betData, v, data)
......
......@@ -131,6 +131,11 @@ func (this *Euro20191212Service) analyStub(v *pojo.MatchLast) (int, *entity5.Ana
data.AlSeq = format
data.PreResult = preResult
data.HitCount = 1
hours := v.MatchDate.Sub(time.Now()).Hours()
if hours > 0 {
hours = math.Abs(hours * 0.7)
data.THitCount = int(hours)
}
data.LetBall = a18betData.ELetBall
//比赛结果
data.Result = this.IsRight(a18betData, v, data)
......
......@@ -32,7 +32,7 @@ WHERE mh.LeagueId = l.Id
AND mh.Id = ar.MatchId
`
if param.HitCount > 0 {
sql += " AND ar.HitCount >= '" + strconv.Itoa(param.HitCount) + "' "
sql += " AND ar.HitCount >= THitCount AND ar.HitCount >= '" + strconv.Itoa(param.HitCount) + "' "
} else if param.MinHitCount > 0 || param.MaxHitCount > 0 {
if param.MinHitCount > 0 {
sql += " AND ar.HitCount >= '" + strconv.Itoa(param.MinHitCount) + "' "
......@@ -42,7 +42,7 @@ WHERE mh.LeagueId = l.Id
}
} else {
hit_count_str := utils.GetVal(constants.SECTION_NAME, "hit_count")
sql += " AND ar.HitCount >= '" + hit_count_str + "' "
sql += " AND ar.HitCount >= THitCount AND ar.HitCount >= '" + hit_count_str + "' "
}
if len(param.AlFlag) > 0 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册