Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
加钱居士.
foot
提交
1d0ff0a3
F
foot
项目概览
加钱居士.
/
foot
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
foot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1d0ff0a3
编写于
1月 13, 2020
作者:
M
monomania
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.待选池独立出A1,C1场次
上级
1e47f108
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
262 addition
and
10 deletion
+262
-10
assets/wechat/html/today_a1.html
assets/wechat/html/today_a1.html
+72
-0
assets/wechat/html/today_c1.html
assets/wechat/html/today_c1.html
+72
-0
assets/wechat/html/today_tbs.html
assets/wechat/html/today_tbs.html
+1
-1
foot-api/module/match/pojo/BFScore.go
foot-api/module/match/pojo/BFScore.go
+3
-3
foot-api/module/suggest/vo/SuggestVO.go
foot-api/module/suggest/vo/SuggestVO.go
+3
-0
foot-core/module/suggest/service/SuggestService.go
foot-core/module/suggest/service/SuggestService.go
+5
-3
foot-core/module/wechat/service/MaterialService.go
foot-core/module/wechat/service/MaterialService.go
+3
-0
foot-core/module/wechat/service/SuggestTodayService.go
foot-core/module/wechat/service/SuggestTodayService.go
+103
-3
未找到文件。
assets/wechat/html/today_a1.html
0 → 100644
浏览文件 @
1d0ff0a3
<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>
assets/wechat/html/today_c1.html
0 → 100644
浏览文件 @
1d0ff0a3
<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>
assets/wechat/html/today_tbs.html
浏览文件 @
1d0ff0a3
...
...
@@ -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>
...
...
foot-api/module/match/pojo/BFScore.go
浏览文件 @
1d0ff0a3
...
...
@@ -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"`
...
...
foot-api/module/suggest/vo/SuggestVO.go
浏览文件 @
1d0ff0a3
...
...
@@ -25,5 +25,8 @@ type SuggestVO struct {
//是否倒序
IsDesc
bool
//算法标识
AlFlags
[]
string
pojo
.
Suggest
`xorm:"extends"`
}
foot-core/module/suggest/service/SuggestService.go
浏览文件 @
1d0ff0a3
...
...
@@ -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
...
...
foot-core/module/wechat/service/MaterialService.go
浏览文件 @
1d0ff0a3
...
...
@@ -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
)
}
foot-core/module/wechat/service/SuggestTodayService.go
浏览文件 @
1d0ff0a3
...
...
@@ -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
(
"-
72
h"
)
h12
,
_
:=
time
.
ParseDuration
(
"-
48
h"
)
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录