提交 9aef94ce 编写于 作者: M monomania

1.调整c1

上级 4333cb71
......@@ -13,7 +13,7 @@ func main() {
base.Log.Info("---------------------------------------------------------------")
base.Log.Info("---------------C1模型--------------")
base.Log.Info("---------------------------------------------------------------")
c1 := new(service.C2Service)
c1 := new(service.C1Service)
c1.MaxLetBall = 1
c1.Analy(true)
base.Log.Info("---------------------------------------------------------------")
......
......@@ -31,6 +31,7 @@
<td>主队(让球)客队</td>
<td>比分</td>
<td>推荐</td>
<td style="min-width: 48px">BF让球</td>
</tr>
{{with .DataList}}
{{range .}}
......@@ -39,9 +40,9 @@
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>
{{if .TOVoid}}<del><span style="color: red;">{{end}}
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
{{if .TOVoid}}{{if .TOVoidDesc}}({{.TOVoidDesc}}){{end}}</span></del>{{end}}
{{if .TOVoid}}<del><span style="color: red;">{{end}}
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
{{if .TOVoid}}{{if .TOVoidDesc}}({{.TOVoidDesc}}){{end}}</span></del>{{end}}
</td>
<td>
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
......@@ -49,7 +50,9 @@
<td style="background-color: {{resultColor .Result}}">
{{preResultStr .PreResult .AlFlag}}
</td>
<td style="color: red;font-weight: bold;font-size: 10px">
{{if eq .AlFlag "C2"}}{{.MyLetBall}}{{end}}
</td>
</tr>
{{end}}
{{end}}
......
<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.推荐的场次为当前时间"往前推720个小时"至"往后推24小时"的场次.</strong></li>
<li><strong>4.推荐的场次会随指数的变化而变化(即时盘),如再次进入不见上次推荐的比赛,请查看"待选场次".</strong></li>
<li><strong>5.以下推荐的场次,当前己被模型认可.如后续被认可失败,则会下放到"待选场次"中.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)6.公众号主推模型在"稳胆场次"中,请重点关注.</strong></li>
<li><strong>7.推荐选项跟着的字母,如A1 A2 E1 E2,为算法模型标识,仅是为了方便观察不同模型的表现.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)8."杯赛"不要参考,出现<span style="color: red; ">"斥"</span>可反买.</strong></li>
</ul>
<hr/>
<ul style="font-size: 12px;font-weight: lighter">
<li><strong>全量爬取时间:{{.FullSpiderDateStr}}</strong></li>
<li><strong>临场爬取时间:{{.SpiderDateStr}}</strong></li>
<li><strong>微信同步时间:{{.DataDateStr}}</strong></li>
<li><strong>日期:{{.BeginDateStr}} 至 {{.EndDateStr}}</strong></li>
</ul>
<hr/>
<ul style="font-size: 12px;font-weight: lighter">
<li><strong>全模型统计,
<span style="color: red; ">红:{{.RedCount}},</span>
<span style="color: gray; ">黑:{{.BlackCount}},</span>
胜率:{{.RedCount}}/({{.RedCount}}+{{.BlackCount}})={{.Val}}
</strong>
</li>
<li><strong>{{.MainAlflag}}单方向统计,
<span style="color: red; ">红:{{.MainRedCount}},</span>
<span style="color: gray; ">黑:{{.MainBlackCount}},</span>
胜率:{{.MainRedCount}}/({{.MainRedCount}}+{{.MainBlackCount}})={{.MainVal}}
</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 style="min-width: 48px">BF让球</td>
</tr>
{{if .DataList}}
{{with .DataList}}
{{range .}}
<tr style="font-weight: bold;font-size: 10px">
<td><span style="color: {{color .AlFlag}}">{{.AlFlag}}</span></td>
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>
{{if .TOVoid}}<del><span style="color: red;">{{end}}
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
{{if .TOVoid}}{{if .TOVoidDesc}}({{.TOVoidDesc}}){{end}}</span></del>{{end}}
</td>
<td>
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
</td>
<td style="background-color: {{resultColor .Result}}">
{{preResultStr .PreResult .AlFlag}}
</td>
<td style="color: red;font-weight: bold;font-size: 10px">
{{.MyLetBall}}
</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>
......@@ -10,6 +10,7 @@
<li><strong>5.以下推荐的场次,当前己被模型认可.如后续被认可失败,则会下放到"待选场次"中.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)6.公众号主推模型在"稳胆场次"中,请重点关注.</strong></li>
<li><strong>7.推荐选项跟着的字母,如A1 A2 E1 E2,为算法模型标识,仅是为了方便观察不同模型的表现.</strong></li>
<li style="text-shadow: 0 0 7px blue"><strong>(重要)8."杯赛"不要参考,出现<span style="color: red; ">"斥"</span>可反买.</strong></li>
</ul>
<hr/>
<ul style="font-size: 12px;font-weight: lighter">
......
......@@ -31,6 +31,7 @@
<td>主队(让球)客队</td>
<td>比分</td>
<td>推荐</td>
<td style="min-width: 48px">BF让球</td>
</tr>
{{with .DataList}}
{{range .}}
......@@ -39,9 +40,9 @@
<td>{{.MatchDateStr}}</td>
<td>{{.LeagueName}}</td>
<td>
{{if .TOVoid}}<del><span style="color: red;">{{end}}
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
{{if .TOVoid}}{{if .TOVoidDesc}}({{.TOVoidDesc}}){{end}}</span></del>{{end}}
{{if .TOVoid}}<del><span style="color: red;">{{end}}
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
{{if .TOVoid}}{{if .TOVoidDesc}}({{.TOVoidDesc}}){{end}}</span></del>{{end}}
</td>
<td>
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
......@@ -49,7 +50,9 @@
<td style="background-color: {{resultColor .Result}}">
{{preResultStr .PreResult .AlFlag}}
</td>
<td style="color: red;font-weight: bold;font-size: 10px">
{{if eq .AlFlag "C2"}}{{.MyLetBall}}{{end}}
</td>
</tr>
{{end}}
{{end}}
......
[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]
......
......@@ -176,6 +176,26 @@ WHERE mh.LeagueId = l.Id
}
func (this *SuggestService) Query(param *vo2.SuggStubVO) []*vo2.SuggStubVO {
// sql := `
//SELECT
// l.Id AS LeagueId,
// l.Name AS LeagueName,
// mh.MainTeamId AS MainTeam,
// mh.GuestTeamId AS GuestTeam,
// mh.MainTeamGoals AS MainTeamGoal,
// mh.GuestTeamGoals AS GuestTeamGoal,
// ar.*
//FROM
// foot.t_league l,
// foot.t_match_his mh,
// foot.t_analy_result ar
//WHERE mh.LeagueId = l.Id
// AND mh.Id = ar.MatchId
// AND ar.HitCount > 0
// AND ar.HitCount >= ar.THitCount
// AND ar.TOVoidDesc = ''
// `
sql := `
SELECT
l.Id AS LeagueId,
......@@ -191,10 +211,9 @@ FROM
foot.t_analy_result ar
WHERE mh.LeagueId = l.Id
AND mh.Id = ar.MatchId
AND ar.HitCount > 0
AND ar.HitCount >= ar.THitCount
AND ar.TOVoid IS FALSE
AND ar.TOVoidDesc = ''
`
if param.HitCount > 0 {
sql += " AND ar.HitCount >= '" + strconv.Itoa(param.HitCount) + "' "
}
......
......@@ -167,7 +167,7 @@ func (this *SuggestMonthService) ModifyGutsMonth(wcClient *core.Client) {
beginDate := now.Add(h168)
param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05")
param.IsDesc = true
tempList := this.SuggestService.QueryGutsC1E2(param)
tempList := this.SuggestService.QueryGutsC2E2(param)
//更新推送
first := material.Article{}
first.Title = "稳胆一月战绩"
......
......@@ -405,9 +405,9 @@ func (this *SuggestTodayService) ModifyTodayGutsC2E2(wcClient *core.Client) {
}
/**
今日稳胆比赛
今日稳胆比赛c1e2
*/
func (this *SuggestTodayService) ModifyTodayGutsC1E2(wcClient *core.Client) {
func (this *SuggestTodayService) __ModifyTodayGutsC1E2(wcClient *core.Client) {
param := new(vo.SuggStubVO)
now := time.Now()
h12, _ := time.ParseDuration("-24h")
......@@ -456,6 +456,58 @@ func (this *SuggestTodayService) ModifyTodayGutsC1E2(wcClient *core.Client) {
}
/**
今日稳胆比赛c1e2
*/
func (this *SuggestTodayService) ModifyTodayGutsC1E2(wcClient *core.Client) {
param := new(vo.SuggStubVO)
now := time.Now()
h12, _ := time.ParseDuration("-720h")
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"}
param.IsDesc = true
tempList := this.SuggestService.QueryTbs(param)
//更新推送
first := material.Article{}
first.Title = fmt.Sprintf("推荐场次-C1")
first.Digest = fmt.Sprintf("%d场赛事", len(tempList))
first.ThumbMediaId = today_c1_thumbMediaId
first.ContentSourceURL = contentSourceURL
first.Author = utils.GetVal("wechat", "author")
temp := vo.TTodayVO{}
temp.SpiderDateStr = constants.SpiderDateStr
temp.FullSpiderDateStr = constants.FullSpiderDateStr
temp.BeginDateStr = param.BeginDateStr
temp.EndDateStr = param.EndDateStr
temp.DataDateStr = now.Format("2006-01-02 15:04:05")
temp.DataList = make([]vo.SuggStubVO, len(tempList))
for i, e := range tempList {
e.MatchDateStr = e.MatchDate.Format("02号15:04")
temp.DataList[i] = *e
}
this.StatWinOdd_Today(&temp,tempList,"C1")
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, 3, &first)
if err != nil {
base.Log.Error(err)
}
}
/**
......
......@@ -168,7 +168,7 @@ func (this *SuggestMonthService) ModifyGutsWeek(wcClient *core.Client) {
beginDate := now.Add(h168)
param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05")
param.IsDesc = true
tempList := this.SuggestService.QueryGutsC1E2(param)
tempList := this.SuggestService.QueryGutsC2E2(param)
//更新推送
first := material.Article{}
first.Title = "稳胆七天战绩"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册