提交 1d0ff0a3 编写于 作者: M monomania

1.待选池独立出A1,C1场次

上级 1e47f108
<div>
<img src="http://mmbiz.qpic.cn/sz_mmbiz_gif/BePaFicK2B5R6lNrnAdOpR63megZibx7GnwXTAl2yZTEibKIbCFrs0QpsmOWG0CrxWEicHldX2ibqva6Ise5G5vILCQ/0?wx_fmt=gif"/>
</div>
<h1 style="color: red;font-weight: bold;font-size: 12px"><strong>注意</strong></h1>
<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.待选的场次为当前时间"往前推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>
</ul>
<hr/>
<ul style="font-size: 12px;font-weight: lighter">
<li><strong>数据爬取时间:{{.SpiderDateStr}}</strong></li>
<li><strong>微信同步时间:{{.DataDateStr}}</strong></li>
<li><strong>日期:{{.BeginDateStr}} 至 {{.EndDateStr}}</strong></li>
</ul>
<hr/>
<h1 style="margin-top: 5px">
<div style="float: left;width: 40%"><strong>赛事列表</strong></div>
<div style="float: right;width: 40%;font-weight: bold;font-size: 12px">
模型:
</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 style="color: red">
<strong>{{.HitCount}}</strong>
</td>
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}</td>
<td>
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
</td>
<td
{{if eq .Result "正确"}}
style="background-color: red"
{{else if eq .Result "错误"}}
style="background-color: gray"
{{else if eq .Result "走盘"}}
style="background-color: greenyellow"
{{else}}
{{end}}
>
{{preResultStr .PreResult .AlFlag}}
</td>
</tr>
{{end}}
{{end}}
{{else}}
<tr>
<td colspan="7" style="color: red;font-weight: bold;font-size: 12px">暂时没有符合模型的比赛推荐,感谢关注~~~</td>
</tr>
{{end}}
</table>
<span style="color: red;font-weight: bold;font-size: 12px">声明:彩市有风险,购彩需谨慎.AI球探只提供预测参考,不构成购彩建议,据AI球探购彩者风险自担.</span>
<div>
<img src="http://mmbiz.qpic.cn/sz_mmbiz_gif/BePaFicK2B5R6lNrnAdOpR63megZibx7GnwXTAl2yZTEibKIbCFrs0QpsmOWG0CrxWEicHldX2ibqva6Ise5G5vILCQ/0?wx_fmt=gif"/>
</div>
<h1 style="color: red;font-weight: bold;font-size: 12px"><strong>注意</strong></h1>
<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.待选的场次为当前时间"往前推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>
</ul>
<hr/>
<ul style="font-size: 12px;font-weight: lighter">
<li><strong>数据爬取时间:{{.SpiderDateStr}}</strong></li>
<li><strong>微信同步时间:{{.DataDateStr}}</strong></li>
<li><strong>日期:{{.BeginDateStr}} 至 {{.EndDateStr}}</strong></li>
</ul>
<hr/>
<h1 style="margin-top: 5px">
<div style="float: left;width: 40%"><strong>赛事列表</strong></div>
<div style="float: right;width: 40%;font-weight: bold;font-size: 12px">
模型:
</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 style="color: red">
<strong>{{.HitCount}}</strong>
</td>
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}</td>
<td>
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
</td>
<td
{{if eq .Result "正确"}}
style="background-color: red"
{{else if eq .Result "错误"}}
style="background-color: gray"
{{else if eq .Result "走盘"}}
style="background-color: greenyellow"
{{else}}
{{end}}
>
{{preResultStr .PreResult .AlFlag}}
</td>
</tr>
{{end}}
{{end}}
{{else}}
<tr>
<td colspan="7" style="color: red;font-weight: bold;font-size: 12px">暂时没有符合模型的比赛推荐,感谢关注~~~</td>
</tr>
{{end}}
</table>
<span style="color: red;font-weight: bold;font-size: 12px">声明:彩市有风险,购彩需谨慎.AI球探只提供预测参考,不构成购彩建议,据AI球探购彩者风险自担.</span>
......@@ -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.待选的场次为当前时间"往前推72小时"至"往后推24小时"的场次.</strong></li>
<li><strong>3.待选的场次为当前时间"往前推48小时"至"往后推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>
......
......@@ -7,14 +7,14 @@ import "tesou.io/platform/foot-parent/foot-api/common/base/pojo"
*/
type BFScore struct {
//比赛id
MatchId string `xorm:"comment('比赛ID') index"`
MatchId string `xorm:"comment('比赛ID') unique(MatchId_TeamId_Type)"`
/**
* 主队id,目前为主队名称
*/
TeamId string `xorm:"comment('球队ID') index"`
TeamId string `xorm:"comment('球队ID') unique(MatchId_TeamId_Type)"`
// 总 , 主 ,客 近
Type string `xorm:"comment('类型:总,主,客,近') index"`
Type string `xorm:"comment('类型:总,主,客,近') unique(MatchId_TeamId_Type)"`
//比赛场次
MatchCount int `xorm:"comment('比赛场次') index"`
......
......@@ -25,5 +25,8 @@ type SuggestVO struct {
//是否倒序
IsDesc bool
//算法标识
AlFlags []string
pojo.Suggest `xorm:"extends"`
}
......@@ -32,8 +32,11 @@ FROM
WHERE mh.LeagueId = l.Id
AND mh.Id = ar.MatchId
`
if len(param.AlFlag) > 0 {
sql += " AND ar.AlFlag = '" + param.AlFlag + "' "
if len(param.AlFlags) > 0 {
sql += " AND ar.AlFlag in (''"
for _, v := range param.AlFlags {
sql += ",'" + v + "'"
}
}
if len(param.BeginDateStr) > 0 {
sql += " AND mh.`MatchDate` >= '" + param.BeginDateStr + "' "
......@@ -56,7 +59,6 @@ WHERE mh.LeagueId = l.Id
}
func (this *SuggestService) Query(param *vo2.SuggestVO) []*vo2.SuggestVO {
sql := `
SELECT
......
......@@ -14,6 +14,9 @@ func (this *MaterialService) ModifyNews(wcClient *core.Client) {
this.SuggestTodayService.ModifyToday(wcClient)
this.SuggestTodayService.ModifyTodayDetail(wcClient)
this.SuggestTodayService.ModifyTodayTbs(wcClient)
this.SuggestTodayService.ModifyTodayA1(wcClient)
this.SuggestTodayService.ModifyTodayC1(wcClient)
this.SuggestWeekService.ModifyWeek(wcClient)
this.SuggestMonthService.ModifyMonth(wcClient)
}
......@@ -213,14 +213,13 @@ func (this *SuggestTodayService) ModifyTodayDetail(wcClient *core.Client) {
func (this *SuggestTodayService) ModifyTodayTbs(wcClient *core.Client) {
param := new(vo.SuggestVO)
now := time.Now()
h12, _ := time.ParseDuration("-72h")
h12, _ := time.ParseDuration("-48h")
beginDate := now.Add(h12)
param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05")
h12, _ = time.ParseDuration("24h")
endDate := now.Add(h12)
param.EndDateStr = endDate.Format("2006-01-02 15:04:05")
//待选池释放Q1
param.AlFlag = ""
param.AlFlags = []string{"E1","E2","Q1"}
tempList := this.SuggestService.QueryTbs(param)
//更新推送
first := material.Article{}
......@@ -256,3 +255,104 @@ func (this *SuggestTodayService) ModifyTodayTbs(wcClient *core.Client) {
base.Log.Error(err)
}
}
/**
今日A1待选池比赛
*/
func (this *SuggestTodayService) ModifyTodayA1(wcClient *core.Client) {
param := new(vo.SuggestVO)
now := time.Now()
h12, _ := time.ParseDuration("-96h")
beginDate := now.Add(h12)
param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05")
h12, _ = time.ParseDuration("24h")
endDate := now.Add(h12)
param.EndDateStr = endDate.Format("2006-01-02 15:04:05")
param.AlFlags = []string{"A1"}
tempList := this.SuggestService.QueryTbs(param)
//更新推送
first := material.Article{}
first.Title = fmt.Sprintf("C1场次")
first.Digest = fmt.Sprintf("%d场赛事", len(tempList))
first.ThumbMediaId = today_tbs_thumbMediaId
first.ContentSourceURL = contentSourceURL
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")
temp.DataList = make([]vo.SuggestVO, len(tempList))
for i, e := range tempList {
e.MatchDateStr = e.MatchDate.Format("02号15:04")
temp.DataList[i] = *e
}
var buf bytes.Buffer
tpl, err := template.New("today_a1.html").Funcs(getFuncMap()).ParseFiles("assets/wechat/html/today_a1.html")
if err != nil {
base.Log.Error(err)
}
if err := tpl.Execute(&buf, &temp); err != nil {
base.Log.Fatal(err)
}
first.Content = buf.String()
err = material.UpdateNews(wcClient, today_mediaId, 3, &first)
if err != nil {
base.Log.Error(err)
}
}
/**
今日C1待选池比赛
*/
func (this *SuggestTodayService) ModifyTodayC1(wcClient *core.Client) {
param := new(vo.SuggestVO)
now := time.Now()
h12, _ := time.ParseDuration("-96h")
beginDate := now.Add(h12)
param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05")
h12, _ = time.ParseDuration("24h")
endDate := now.Add(h12)
param.EndDateStr = endDate.Format("2006-01-02 15:04:05")
param.AlFlags = []string{"C1"}
tempList := this.SuggestService.QueryTbs(param)
//更新推送
first := material.Article{}
first.Title = fmt.Sprintf("C1场次")
first.Digest = fmt.Sprintf("%d场赛事", len(tempList))
first.ThumbMediaId = today_tbs_thumbMediaId
first.ContentSourceURL = contentSourceURL
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")
temp.DataList = make([]vo.SuggestVO, len(tempList))
for i, e := range tempList {
e.MatchDateStr = e.MatchDate.Format("02号15:04")
temp.DataList[i] = *e
}
var buf bytes.Buffer
tpl, err := template.New("today_c1.html").Funcs(getFuncMap()).ParseFiles("assets/wechat/html/today_c1.html")
if err != nil {
base.Log.Error(err)
}
if err := tpl.Execute(&buf, &temp); err != nil {
base.Log.Fatal(err)
}
first.Content = buf.String()
err = material.UpdateNews(wcClient, today_mediaId, 4, &first)
if err != nil {
base.Log.Error(err)
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册