提交 fe4f7769 编写于 作者: M monomania

1.xxx增加显示数据抓取时间 2.比赛结果更新时间调整为128分钟

上级 061f1763
......@@ -25,15 +25,17 @@
</h1>
<table style="font-size: 12px;font-weight: bold">
<tr>
<td>模型</td>
<td>时间</td>
<td>联赛</td>
<td>主队(让球)客队</td>
<td>比分</td>
<td>推荐(模型)</td>
<td>推荐</td>
</tr>
{{with .DataList}}
{{range .}}
<tr>
<td><span style="color: {{color .AlFlag}}">{{.AlFlag}}</span></td>
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}</td>
......@@ -51,7 +53,7 @@
{{end}}
>
{{preResultStr .PreResult .AlFlag}}<span style="color: {{color .AlFlag}}">({{.AlFlag}})</span>
{{preResultStr .PreResult .AlFlag}}
</td>
</tr>
......@@ -59,6 +61,7 @@
{{end}}
</table>
<span style="color: red;font-weight: bold;font-size: 12px">声明:彩市有风险,购彩需谨慎.AI球探只提供预测参考,不构成购彩建议,据AI球探购彩者风险自担.</span>
{{/*
<div>
<img src="http://mmbiz.qpic.cn/sz_mmbiz_png/BePaFicK2B5R6lNrnAdOpR63megZibx7Gnqj9UlhbGMnKbDYmfkFvIhRsz5LEK27Fukf0sE8NzOlNI2nALx25icQQ/0?wx_fmt=png">
</div>
\ No newline at end of file
</div>*/}}
......@@ -13,7 +13,8 @@
</ul>
<hr/>
<ul style="font-size: 12px;font-weight: lighter">
<li><strong>更新时间:{{.DataDateStr}}</strong></li>
<li><strong>数据爬取时间:{{.SpiderDateStr}}</strong></li>
<li><strong>微信同步时间:{{.DataDateStr}}</strong></li>
<li><strong>日期:{{.BeginDateStr}} 至 {{.EndDateStr}}</strong></li>
</ul>
<hr/>
......@@ -25,21 +26,23 @@
<span style="color: orangered">A2</span>
<span style="color: blue">E1</span>
<span style="color: darkblue">E2</span>
{{/*<span style="color: olivedrab">Q1</span>*/}}
<span style="color: olivedrab">Q1</span>
</div>
</h1>
<table style="font-size: 12px;font-weight: bold">
<tr>
<td>模型</td>
<td>时间</td>
<td>联赛</td>
<td>主队(让球)客队</td>
<td>比分</td>
<td>推荐(模型)</td>
<td>推荐</td>
</tr>
{{if .DataList}}
{{with .DataList}}
{{range .}}
<tr>
<td><span style="color: {{color .AlFlag}}">{{.AlFlag}}</span></td>
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}</td>
......@@ -57,7 +60,7 @@
{{end}}
>
{{preResultStr .PreResult .AlFlag}}<span style="color: {{color .AlFlag}}">({{.AlFlag}})</span>
{{preResultStr .PreResult .AlFlag}}
</td>
</tr>
......@@ -70,6 +73,3 @@
{{end}}
</table>
<span style="color: red;font-weight: bold;font-size: 12px">声明:彩市有风险,购彩需谨慎.AI球探只提供预测参考,不构成购彩建议,据AI球探购彩者风险自担.</span>
<div>
<img src="http://mmbiz.qpic.cn/sz_mmbiz_png/BePaFicK2B5R6lNrnAdOpR63megZibx7Gnqj9UlhbGMnKbDYmfkFvIhRsz5LEK27Fukf0sE8NzOlNI2nALx25icQQ/0?wx_fmt=png">
</div>
\ No newline at end of file
......@@ -13,7 +13,8 @@
</ul>
<hr/>
<ul style="font-size: 12px;font-weight: lighter">
<li><strong>更新时间:{{.DataDateStr}}</strong></li>
<li><strong>数据爬取时间:{{.SpiderDateStr}}</strong></li>
<li><strong>微信同步时间:{{.DataDateStr}}</strong></li>
<li><strong>日期:{{.BeginDateStr}} 至 {{.EndDateStr}}</strong></li>
</ul>
<hr/>
......@@ -24,7 +25,7 @@
<li>比赛时间:{{.MatchDateStr}}</li>
<li>联  赛:{{.LeagueName}}</li>
<li>对阵双方:{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}</li>
<li>算法模型:<span style="color: {{color .AlFlag}}">({{.AlFlag}})</span></li>
<li>算法模型:<span style="color: {{color .AlFlag}}">{{.AlFlag}}</span></li>
<li>球探指数:{{.HitCount}}<span style="color: red;font-weight: bold;">(指数越大,越稳定)</span></li>
<li>推荐选项:{{preResultStr .PreResult .AlFlag}}</li>
<li>说  明:
......@@ -43,7 +44,3 @@
<br/>
<span style="color: red;font-weight: bold;font-size: 12px">声明:彩市有风险,购彩需谨慎.AI球探只提供预测参考,不构成购彩建议,据AI球探购彩者风险自担.</span>
{{/*
<div>
<img src="http://mmbiz.qpic.cn/sz_mmbiz_png/BePaFicK2B5R6lNrnAdOpR63megZibx7Gnqj9UlhbGMnKbDYmfkFvIhRsz5LEK27Fukf0sE8NzOlNI2nALx25icQQ/0?wx_fmt=png">
</div>*/}}
......@@ -12,7 +12,8 @@
</ul>
<hr/>
<ul style="font-size: 12px;font-weight: lighter">
<li><strong>更新时间:{{.DataDateStr}}</strong></li>
<li><strong>数据爬取时间:{{.SpiderDateStr}}</strong></li>
<li><strong>微信同步时间:{{.DataDateStr}}</strong></li>
<li><strong>日期:{{.BeginDateStr}} 至 {{.EndDateStr}}</strong></li>
</ul>
<hr/>
......@@ -29,17 +30,22 @@
</h1>
<table style="font-size: 12px;font-weight: bold">
<tr>
<td>模型</td>
<td>指数</td>
<td>时间</td>
<td>联赛</td>
<td>主队(让球)客队</td>
<td>比分</td>
<td>推荐(模型)</td>
<td>指数</td>
<td>推荐</td>
</tr>
{{if .DataList}}
{{with .DataList}}
{{range .}}
<tr>
<td><span style="color: {{color .AlFlag}}">{{.AlFlag}}</span></td>
<td style="color: red">
<strong>{{.HitCount}}</strong>
</td>
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}</td>
......@@ -57,10 +63,7 @@
{{end}}
>
{{preResultStr .PreResult .AlFlag}}<span style="color: {{color .AlFlag}}">({{.AlFlag}})</span>
</td>
<td style="color: red">
<strong>{{.HitCount}}</strong>
{{preResultStr .PreResult .AlFlag}}
</td>
</tr>
{{end}}
......@@ -72,7 +75,3 @@
{{end}}
</table>
<span style="color: red;font-weight: bold;font-size: 12px">声明:彩市有风险,购彩需谨慎.AI球探只提供预测参考,不构成购彩建议,据AI球探购彩者风险自担.</span>
{{/*
<div>
<img src="http://mmbiz.qpic.cn/sz_mmbiz_png/BePaFicK2B5R6lNrnAdOpR63megZibx7Gnqj9UlhbGMnKbDYmfkFvIhRsz5LEK27Fukf0sE8NzOlNI2nALx25icQQ/0?wx_fmt=png">
</div>*/}}
......@@ -25,15 +25,17 @@
</h1>
<table style="font-size: 12px;font-weight: bold">
<tr>
<td>模型</td>
<td>时间</td>
<td>联赛</td>
<td>主队(让球)客队</td>
<td>比分</td>
<td>推荐(模型)</td>
<td>推荐</td>
</tr>
{{with .DataList}}
{{range .}}
<tr>
<td><span style="color: {{color .AlFlag}}">{{.AlFlag}}</span></td>
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}</td>
......@@ -51,14 +53,11 @@
{{end}}
>
{{preResultStr .PreResult .AlFlag}}<span style="color: {{color .AlFlag}}">({{.AlFlag}})</span>
{{preResultStr .PreResult .AlFlag}}
</td>
</tr>
{{end}}
{{end}}
</table>
<span style="color: red;font-weight: bold;font-size: 12px">声明:彩市有风险,购彩需谨慎.AI球探只提供预测参考,不构成购彩建议,据AI球探购彩者风险自担.</span>
<div>
<img src="http://mmbiz.qpic.cn/sz_mmbiz_png/BePaFicK2B5R6lNrnAdOpR63megZibx7Gnqj9UlhbGMnKbDYmfkFvIhRsz5LEK27Fukf0sE8NzOlNI2nALx25icQQ/0?wx_fmt=png">
</div>
\ No newline at end of file
<span style="color: red;font-weight: bold;font-size: 12px">声明:彩市有风险,购彩需谨慎.AI球探只提供预测参考,不构成购彩建议,据AI球探购彩者风险自担.</span>
\ No newline at end of file
package vo
type MonthVO struct {
SpiderDateStr string
//开始时间
BeginDateStr string
//结束时间
......@@ -28,5 +29,6 @@ type MonthVO struct {
//胜率
MainVal string
DataList []SuggestVO
}
......@@ -3,6 +3,7 @@ package vo
import "tesou.io/platform/foot-parent/foot-api/module/odds/pojo"
type TodayVO struct {
SpiderDateStr string
//开始时间
BeginDateStr string
//结束时间
......
package vo
type WeekVO struct {
SpiderDateStr string
//开始时间
BeginDateStr string
//结束时间
......
......@@ -181,7 +181,7 @@ func (this *AnalyService) IsRight(last *entity3.AsiaLast, v *entity2.MatchLast,
*/
func (this *AnalyService) ActualResult(last *entity3.AsiaLast, v *entity2.MatchLast, analy *entity5.AnalyResult) int {
var result int
h2, _ := time.ParseDuration("148m")
h2, _ := time.ParseDuration("128m")
matchDate := v.MatchDate.Add(h2)
if matchDate.After(time.Now()) {
//比赛未结束
......
......@@ -148,7 +148,7 @@ func (this *E2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
func (this *E2Service) IsRight(last *entity3.AsiaLast, v *pojo.MatchLast, analy *entity5.AnalyResult) string {
//比赛结果
var globalResult int
h2, _ := time.ParseDuration("148m")
h2, _ := time.ParseDuration("128m")
matchDate := v.MatchDate.Add(h2)
if matchDate.After(time.Now()) {
//比赛未结束
......
package constants
var (
SpiderDateStr = ""
)
......@@ -44,9 +44,9 @@ WHERE mh.LeagueId = l.Id
sql += " AND mh.`MatchDate` <= '" + param.EndDateStr + "' "
}
if param.IsDesc {
sql += " ORDER BY ar.MatchDate DESC, l.id ASC,mh.MainTeamId asc, ar.PreResult DESC "
sql += " ORDER BY ar.`AlFlag` DESC,ar.MatchDate DESC, l.id ASC,mh.MainTeamId asc, ar.PreResult DESC "
} else {
sql += " ORDER BY ar.MatchDate ASC, l.id ASC,mh.MainTeamId asc,ar.PreResult DESC "
sql += " ORDER BY ar.`AlFlag` DESC,ar.MatchDate ASC, l.id ASC,mh.MainTeamId asc,ar.PreResult DESC "
}
//结果值
entitys := make([]*vo2.SuggestVO, 0)
......@@ -91,9 +91,9 @@ WHERE mh.LeagueId = l.Id
sql += " AND mh.`MatchDate` <= '" + param.EndDateStr + "' "
}
if param.IsDesc {
sql += " ORDER BY ar.MatchDate DESC, l.id ASC,mh.MainTeamId asc, ar.PreResult DESC "
sql += " ORDER BY ar.`AlFlag` DESC,ar.MatchDate DESC, l.id ASC,mh.MainTeamId asc, ar.PreResult DESC "
} else {
sql += " ORDER BY ar.MatchDate ASC, l.id ASC,mh.MainTeamId asc,ar.PreResult DESC "
sql += " ORDER BY ar.`AlFlag` DESC,ar.MatchDate ASC, l.id ASC,mh.MainTeamId asc,ar.PreResult DESC "
}
//结果值
entitys := make([]*vo2.SuggestVO, 0)
......
......@@ -13,6 +13,7 @@ import (
"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/service"
"tesou.io/platform/foot-parent/foot-core/module/spider/constants"
service2 "tesou.io/platform/foot-parent/foot-core/module/suggest/service"
"time"
)
......@@ -65,7 +66,8 @@ func (this *SuggestMonthService) ModifyMonth(wcClient *core.Client) {
first.ContentSourceURL = contentSourceURL
first.Author = utils.GetVal("wechat", "author")
temp := vo.WeekVO{}
temp := vo.MonthVO{}
temp.SpiderDateStr = constants.SpiderDateStr
temp.BeginDateStr = param.BeginDateStr
temp.EndDateStr = param.EndDateStr
temp.MatchCount = int64(len(tempList))
......
......@@ -11,6 +11,7 @@ import (
"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/service"
"tesou.io/platform/foot-parent/foot-core/module/spider/constants"
service2 "tesou.io/platform/foot-parent/foot-core/module/suggest/service"
"time"
)
......@@ -128,6 +129,7 @@ func (this *SuggestTodayService) ModifyToday(wcClient *core.Client) {
first.Author = utils.GetVal("wechat", "author")
temp := vo.TodayVO{}
temp.SpiderDateStr = constants.SpiderDateStr
temp.BeginDateStr = param.BeginDateStr
temp.EndDateStr = param.EndDateStr
temp.DataDateStr = now.Format("2006-01-02 15:04:05")
......@@ -177,6 +179,7 @@ func (this *SuggestTodayService) ModifyTodayDetail(wcClient *core.Client) {
first.Author = utils.GetVal("wechat", "author")
temp := vo.TodayVO{}
temp.SpiderDateStr = constants.SpiderDateStr
temp.BeginDateStr = param.BeginDateStr
temp.EndDateStr = param.EndDateStr
temp.DataDateStr = now.Format("2006-01-02 15:04:05")
......@@ -226,6 +229,7 @@ func (this *SuggestTodayService) ModifyTodayTbs(wcClient *core.Client) {
first.Author = utils.GetVal("wechat", "author")
temp := vo.TodayVO{}
temp.SpiderDateStr = constants.SpiderDateStr
temp.BeginDateStr = param.BeginDateStr
temp.EndDateStr = param.EndDateStr
temp.DataDateStr = now.Format("2006-01-02 15:04:05")
......
......@@ -13,6 +13,7 @@ import (
"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/service"
"tesou.io/platform/foot-parent/foot-core/module/spider/constants"
service2 "tesou.io/platform/foot-parent/foot-core/module/suggest/service"
"time"
)
......@@ -66,6 +67,7 @@ func (this *SuggestWeekService) ModifyWeek(wcClient *core.Client) {
first.ShowCoverPic = 0
first.Author = utils.GetVal("wechat", "author")
temp := vo.WeekVO{}
temp.SpiderDateStr = constants.SpiderDateStr
temp.BeginDateStr = param.BeginDateStr
temp.EndDateStr = param.EndDateStr
temp.MatchCount = int64(len(tempList))
......
......@@ -4,6 +4,8 @@ import (
"strconv"
"tesou.io/platform/foot-parent/foot-core/common/utils"
"tesou.io/platform/foot-parent/foot-core/launch"
"tesou.io/platform/foot-parent/foot-core/module/spider/constants"
"time"
)
func Clean(){
......@@ -33,4 +35,6 @@ func Spider() {
//再对欧赔数据不完整的比赛进行两次抓取
Spider_euroHis_Incomplete()
Spider_euroHis_Incomplete()
//记录数据爬取时间
constants.SpiderDateStr = time.Now().Format("2006-01-02 15:04:05")
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册