提交 cdc986a4 编写于 作者: M monomania

1.结版

上级 adfed63c
......@@ -11,7 +11,8 @@ func main() {
base.Log.Info("---------------处理结果--------------")
base.Log.Info("---------------------------------------------------------------")
analyService := new(service.AnalyService)
analyService.ModifyAllResult()
//analyService.ModifyAllResult()
analyService.ModifyResult()
mysql.ShowSQL(true)
}
......@@ -4,7 +4,6 @@ import (
"fmt"
"strconv"
"tesou.io/platform/foot-parent/foot-core/module/spider/constants"
"tesou.io/platform/foot-parent/foot-core/module/wechat/service"
"time"
)
......@@ -34,12 +33,10 @@ func set() {
func main(){
go func() {
set()
new(service.SuggestTodayService).Print11()
}()
time.Sleep(1 * time.Second)
h2, _ := time.ParseDuration("129m")
//比赛结束的时间点
matchEndDate := time.Now().Add(h2)
fmt.Println(matchEndDate.Format("2006-01-02 15:04:05"))
}
//func main() {
......
......@@ -5,7 +5,7 @@
<ul style="color: red;font-weight: bold;font-size: 12px">
<li><strong>1.比赛为程序自动处理,自动更新同步,目前更新周期为60分钟一次,临场比赛(30分钟内开赛)为5分钟一次.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)2.获取最新推荐请点击"今日推荐"菜单按钮.</strong></li>
<li><strong>3.待选的场次为当前时间"往前推12小时"至"往后推24小时"的场次.</strong></li>
<li><strong>3.待选的场次为当前时间"往前推96小时"至"往后推24小时"的场次.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)4.待选的场次会随指数的变化而变化(即时盘),包含"今日推荐"中的比赛.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)5.以下待选的场次,未被模型认可.如被后续被认可成功,则会上升到"今日推荐"中.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)6.公众号主推模型为E2,请重点关注.</strong></li>
......
......@@ -5,7 +5,7 @@
<ul style="color: red;font-weight: bold;font-size: 12px">
<li><strong>1.比赛为程序自动处理,自动更新同步,目前更新周期为60分钟一次,临场比赛(30分钟内开赛)为5分钟一次.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)2.获取最新推荐请点击"今日推荐"菜单按钮.</strong></li>
<li><strong>3.推荐的场次为当前时间"往前推12个小时"至"往后推24小时"的场次.</strong></li>
<li><strong>3.推荐的场次为当前时间"往前推24个小时"至"往后推24小时"的场次.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)4.推荐的场次会随指数的变化而变化(即时盘),如再次进入不见上次推荐的比赛,请查看"待选场次".</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)5.以下推荐的场次,当前己被模型认可.如后续被认可失败,则会下放到"待选场次"中.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)6.公众号主推模型为E2,请重点关注.</strong></li>
......
......@@ -5,7 +5,7 @@
<ul style="color: red;font-weight: bold;font-size: 12px">
<li><strong>1.比赛为程序自动处理,自动更新同步,目前更新周期为60分钟一次,临场比赛(30分钟内开赛)为5分钟一次.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)2.获取最新推荐请点击"今日推荐"菜单按钮.</strong></li>
<li><strong>3.待选的场次为当前时间"往前推12小时"至"往后推24小时"的场次.</strong></li>
<li><strong>3.待选的场次为当前时间"往前推24小时"至"往后推24小时"的场次.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)4.待选的场次会随指数的变化而变化(即时盘),包含"今日推荐"中的比赛.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)5.以下待选的场次,未被模型认可.如被后续被认可成功,则会上升到"今日推荐"中.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)6.公众号主推模型为E2,请重点关注.</strong></li>
......
[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]
......
......@@ -52,7 +52,7 @@ content_tpl="本次推荐为程序全自动处理,全程无人为参与干预.
price_strategy=0
[wechat]
###推荐使用的算法
al_flag='A1','C1','E2'
al_flag='C1','E2'
main_al_flag='','C1'
OriId=gh_a8328f3c25d2
AppID=wx76e3dd0445aa0055
......
......@@ -3,6 +3,7 @@ package utils
import (
"runtime"
"strings"
"time"
)
/**
......@@ -16,3 +17,17 @@ func RunFuncName() string {
funcName = funcName[strings.LastIndex(funcName, ".")+1:]
return funcName
}
//获取相差时间
func GetHourDiffer(t1, t2 time.Time) int64 {
var hour int64
if t1.After(t2) {
diff := t1.Unix() - t2.Unix()
hour = diff / 3600
return hour
} else {
diff := t2.Unix() - t1.Unix()
hour = diff / 3600
return 0 - hour
}
}
......@@ -11,6 +11,7 @@ import (
entity2 "tesou.io/platform/foot-parent/foot-api/module/match/pojo"
entity3 "tesou.io/platform/foot-parent/foot-api/module/odds/pojo"
"tesou.io/platform/foot-parent/foot-core/common/base/service/mysql"
"tesou.io/platform/foot-parent/foot-core/common/utils"
"tesou.io/platform/foot-parent/foot-core/module/analy/constants"
service3 "tesou.io/platform/foot-parent/foot-core/module/elem/service"
service2 "tesou.io/platform/foot-parent/foot-core/module/match/service"
......@@ -93,6 +94,7 @@ FROM
continue
}
last := new(entity2.MatchLast)
last.Id = his.Id
last.MatchDate = his.MatchDate
last.DataDate = his.DataDate
last.LeagueId = his.LeagueId
......@@ -119,7 +121,7 @@ SELECT
ar.*
FROM
foot.t_analy_result ar
WHERE DATE_ADD(ar.MatchDate, INTERVAL 3 HOUR) > NOW()
WHERE DATE_ADD(ar.MatchDate, INTERVAL 6 HOUR) > NOW()
`
//结果值
entitys := make([]*entity5.AnalyResult, 0)
......@@ -140,6 +142,7 @@ WHERE DATE_ADD(ar.MatchDate, INTERVAL 3 HOUR) > NOW()
continue
}
last := new(entity2.MatchLast)
last.Id = his.Id
last.MatchDate = his.MatchDate
last.DataDate = his.DataDate
last.LeagueId = his.LeagueId
......@@ -226,12 +229,12 @@ WHERE ml.id = el.matchid
}
func (this *AnalyService) IsRight2Option(v *entity2.MatchLast, analy *entity5.AnalyResult) string {
if strings.EqualFold(analy.MatchId, "1826976") {
fmt.Println("--")
}
//比赛结果
var globalResult int
h2, _ := time.ParseDuration("129m")
//比赛结束的时间点
matchEndDate := v.MatchDate.Add(h2)
if matchEndDate.Before(time.Now()) {
if utils.GetHourDiffer(time.Now(), v.MatchDate) < 2 {
//比赛未结束
globalResult = -1
} else {
......@@ -285,9 +288,7 @@ func (this *AnalyService) IsRight(last *entity2.MatchLast, analy *entity5.AnalyR
*/
func (this *AnalyService) ActualResult(last *entity2.MatchLast, analy *entity5.AnalyResult) int {
var result int
h2, _ := time.ParseDuration("129m")
matchEndDate := last.MatchDate.Add(h2)
if matchEndDate.Before(time.Now()) {
if utils.GetHourDiffer(time.Now(), last.MatchDate) < 2 {
//比赛未结束
return -1
}
......
......@@ -295,7 +295,7 @@ func (this *SuggestTodayService) ModifyTodayDetailNew(wcClient *core.Client) {
func (this *SuggestTodayService) ModifyTodayC1(wcClient *core.Client) {
param := new(vo.SuggStubVO)
now := time.Now()
h12, _ := time.ParseDuration("-12h")
h12, _ := time.ParseDuration("-24h")
beginDate := now.Add(h12)
param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05")
h12, _ = time.ParseDuration("24h")
......@@ -397,7 +397,7 @@ func (this *SuggestTodayService) ModifyTodayGuts(wcClient *core.Client) {
func (this *SuggestTodayService) ModifyTodayA1(wcClient *core.Client) {
param := new(vo.SuggStubVO)
now := time.Now()
h12, _ := time.ParseDuration("-12h")
h12, _ := time.ParseDuration("-96h")
beginDate := now.Add(h12)
param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05")
h12, _ = time.ParseDuration("24h")
......@@ -450,7 +450,7 @@ func (this *SuggestTodayService) Print11(){
func (this *SuggestTodayService) ModifyTodayTbs(wcClient *core.Client) {
param := new(vo.SuggStubVO)
now := time.Now()
h12, _ := time.ParseDuration("-12h")
h12, _ := time.ParseDuration("-24h")
beginDate := now.Add(h12)
param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05")
h12, _ = time.ParseDuration("24h")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册