Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
加钱居士.
foot
提交
c0eaf980
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 搜索 >>
提交
c0eaf980
编写于
2月 11, 2020
作者:
M
monomania
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.增加稳胆统计
上级
545a4ac0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
173 addition
and
3 deletion
+173
-3
assets/wechat/html/month_guts.html
assets/wechat/html/month_guts.html
+4
-1
assets/wechat/html/today_guts.html
assets/wechat/html/today_guts.html
+3
-2
assets/wechat/html/week_guts.html
assets/wechat/html/week_guts.html
+59
-0
foot-core/module/wechat/service/MaterialService.go
foot-core/module/wechat/service/MaterialService.go
+1
-0
foot-core/module/wechat/service/SuggestWeekService.go
foot-core/module/wechat/service/SuggestWeekService.go
+106
-0
未找到文件。
assets/wechat/html/month_guts.html
浏览文件 @
c0eaf980
...
...
@@ -38,7 +38,10 @@
<td><span
style=
"color: {{color .AlFlag}}"
>
{{.AlFlag}}
</span></td>
<td>
{{.MatchDateStr}}
</td>
<td>
{{.LeagueName}}
</td>
<td>
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
</td>
<td>
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
{{if .TOVoid}}
<span
style=
"color: red;"
>
{{if .TOVoidDesc}}斥{{end}}
</span></del>
{{end}}
</td>
<td>
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
</td>
...
...
assets/wechat/html/today_guts.html
浏览文件 @
c0eaf980
...
...
@@ -42,10 +42,11 @@
<td>
{{.MatchDateStr}}
</td>
<td>
{{.LeagueName}}
</td>
<td>
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
{{.MainTeam}}({{.LetBall}}){{.GuestTeam}}
{{if .TOVoid}}
<span
style=
"color: red;"
>
{{if .TOVoidDesc}}斥{{end}}
</span></del>
{{end}}
</td>
<td>
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
</td>
<td
style=
"background-color: {{resultColor .Result}}"
>
{{preResultStr .PreResult .AlFlag}}
...
...
assets/wechat/html/week_guts.html
0 → 100644
浏览文件 @
c0eaf980
<div>
<img
src=
"http://mmbiz.qpic.cn/sz_mmbiz_gif/BePaFicK2B5R6lNrnAdOpR63megZibx7GnwXTAl2yZTEibKIbCFrs0QpsmOWG0CrxWEicHldX2ibqva6Ise5G5vILCQ/0?wx_fmt=gif"
/>
</div>
<h1><strong>
概况
</strong></h1>
<ul
style=
"font-size: 12px;font-weight: bold"
>
<li>
日期:{{.BeginDateStr}} 至 {{.EndDateStr}}
</li>
<li>
总场次:{{.MatchCount}}
</li>
<li><span
style=
"color: greenyellow; "
>
走:{{.WalkCount}}
</span></li>
<li><span
style=
"color: red; "
>
最长连红:{{.LinkRedCount}}
</span></li>
<li><span
style=
"color: gray; "
>
最长连黑:{{.LinkBlackCount}}
</span></li>
<li>
全模型统计,
<span
style=
"color: red; "
>
红:{{.RedCount}},
</span>
<span
style=
"color: gray; "
>
黑:{{.BlackCount}},
</span>
胜率:{{.RedCount}}/({{.RedCount}}+{{.BlackCount}})={{.Val}}
</li>
<li>
单方向统计,
<span
style=
"color: red; "
>
红:{{.MainRedCount}},
</span>
<span
style=
"color: gray; "
>
黑:{{.MainBlackCount}},
</span>
胜率:{{.MainRedCount}}/({{.MainRedCount}}+{{.MainBlackCount}})={{.MainVal}}
</li>
</ul>
<hr/>
<h1
style=
"margin-top: 5px"
>
<div
style=
"float: left;width: 50%"
><strong>
赛事列表
</strong></div>
</h1>
<table
style=
"font-size: 12px;font-weight: bold"
>
<tr>
<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}}
{{if .TOVoid}}
<span
style=
"color: red;"
>
{{if .TOVoidDesc}}斥{{end}}
</span></del>
{{end}}
</td>
<td>
{{.MainTeamGoal}}:{{.GuestTeamGoal}}
</td>
<td
style=
"background-color: {{resultColor .Result}}"
>
{{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>
*/}}
foot-core/module/wechat/service/MaterialService.go
浏览文件 @
c0eaf980
...
...
@@ -19,5 +19,6 @@ func (this *MaterialService) ModifyNews(wcClient *core.Client) {
this
.
SuggestWeekService
.
ModifyWeek
(
wcClient
)
this
.
SuggestMonthService
.
ModifyMonth
(
wcClient
)
this
.
SuggestMonthService
.
ModifyGutsWeek
(
wcClient
)
this
.
SuggestMonthService
.
ModifyGutsMonth
(
wcClient
)
}
foot-core/module/wechat/service/SuggestWeekService.go
浏览文件 @
c0eaf980
...
...
@@ -9,6 +9,7 @@ import (
"strconv"
"strings"
"tesou.io/platform/foot-parent/foot-api/common/base"
"tesou.io/platform/foot-parent/foot-api/module/match/pojo"
"tesou.io/platform/foot-parent/foot-api/module/suggest/vo"
"tesou.io/platform/foot-parent/foot-core/common/base/service/mysql"
"tesou.io/platform/foot-parent/foot-core/common/utils"
...
...
@@ -26,6 +27,7 @@ type SuggestWeekService struct {
}
const
week_thumbMediaId
=
"chP-LBQxy9SVbAFjwZ4QEo81I0bHaY3YDYRwVGmf7o8"
const
week_guts_thumbMediaId
=
"chP-LBQxy9SVbAFjwZ4QEthz2PGUtpVZdZccay_qCi0"
const
week_mediaId
=
"chP-LBQxy9SVbAFjwZ4QEgcfOu5CZ67hiBgn5qnZ-Ac"
func
(
this
*
SuggestWeekService
)
Week
(
wcClient
*
core
.
Client
)
string
{
...
...
@@ -142,3 +144,107 @@ func (this *SuggestWeekService) ModifyWeek(wcClient *core.Client) {
base
.
Log
.
Error
(
err
)
}
}
func
(
this
*
SuggestMonthService
)
ModifyGutsWeek
(
wcClient
*
core
.
Client
)
{
param
:=
new
(
vo
.
SuggStubVO
)
now
:=
time
.
Now
()
h2
,
_
:=
time
.
ParseDuration
(
"-2h"
)
endDate
:=
now
.
Add
(
h2
)
param
.
EndDateStr
=
endDate
.
Format
(
"2006-01-02 15:04:05"
)
h168
,
_
:=
time
.
ParseDuration
(
"-168h"
)
beginDate
:=
now
.
Add
(
h168
)
param
.
BeginDateStr
=
beginDate
.
Format
(
"2006-01-02 15:04:05"
)
param
.
IsDesc
=
true
tempList
:=
this
.
SuggestService
.
QueryGuts
(
param
)
//更新推送
first
:=
material
.
Article
{}
first
.
Title
=
"稳胆七天战绩"
first
.
Digest
=
fmt
.
Sprintf
(
"%v-%v"
,
beginDate
.
Format
(
"2006年01月02日"
),
now
.
Format
(
"2006年01月02日"
))
first
.
ThumbMediaId
=
week_guts_thumbMediaId
first
.
ContentSourceURL
=
contentSourceURL
first
.
Author
=
utils
.
GetVal
(
"wechat"
,
"author"
)
temp
:=
vo
.
TMonthVO
{}
temp
.
SpiderDateStr
=
constants
.
SpiderDateStr
temp
.
FullSpiderDateStr
=
constants
.
FullSpiderDateStr
temp
.
BeginDateStr
=
param
.
BeginDateStr
temp
.
EndDateStr
=
param
.
EndDateStr
temp
.
MatchCount
=
int64
(
len
(
tempList
))
var
redCount
,
walkCount
,
blackCount
,
linkRedCount
,
tempLinkRedCount
,
linkBlackCount
,
tempLinkBlackCount
int64
temp
.
DataList
=
make
([]
vo
.
SuggStubVO
,
len
(
tempList
))
for
i
,
e
:=
range
tempList
{
if
strings
.
EqualFold
(
constants2
.
HIT
,
e
.
Result
)
||
strings
.
EqualFold
(
constants2
.
HIT_1
,
e
.
Result
)
{
redCount
++
tempLinkRedCount
++
tempLinkBlackCount
=
0
}
else
if
strings
.
EqualFold
(
constants2
.
UNHIT
,
e
.
Result
)
{
blackCount
++
tempLinkBlackCount
++
tempLinkRedCount
=
0
}
else
{
walkCount
++
}
if
tempLinkRedCount
>
linkRedCount
{
linkRedCount
=
tempLinkRedCount
}
if
tempLinkBlackCount
>
linkBlackCount
{
linkBlackCount
=
tempLinkBlackCount
}
e
.
MatchDateStr
=
e
.
MatchDate
.
Format
(
"02号15:04"
)
temp
.
DataList
[
i
]
=
*
e
}
temp
.
RedCount
=
redCount
temp
.
WalkCount
=
walkCount
temp
.
BlackCount
=
blackCount
temp
.
LinkRedCount
=
linkRedCount
temp
.
LinkBlackCount
=
linkBlackCount
val
:=
float64
(
redCount
)
/
(
float64
(
redCount
)
+
float64
(
blackCount
))
*
100
val
,
_
=
strconv
.
ParseFloat
(
fmt
.
Sprintf
(
"%.2f"
,
val
),
64
)
temp
.
Val
=
strconv
.
FormatFloat
(
val
,
'f'
,
-
1
,
64
)
+
"%"
//计算单方向胜率
var
mainRedCount
,
mainBlackCount
int64
for
_
,
e
:=
range
tempList
{
last
:=
new
(
pojo
.
MatchLast
)
last
.
Id
=
e
.
MatchId
last
.
LeagueId
=
e
.
LeagueName
last
.
MatchDate
=
e
.
MatchDate
last
.
MainTeamId
=
e
.
MainTeam
last
.
MainTeamGoals
,
_
=
strconv
.
Atoi
(
e
.
MainTeamGoal
)
last
.
GuestTeamId
=
e
.
GuestTeam
last
.
GuestTeamGoals
,
_
=
strconv
.
Atoi
(
e
.
GuestTeamGoal
)
option
:=
this
.
AnalyService
.
IsRight
(
last
,
&
e
.
AnalyResult
)
if
option
==
constants2
.
HIT
||
option
==
constants2
.
HIT_1
{
mainRedCount
++
}
if
option
==
constants2
.
UNHIT
{
mainBlackCount
++
}
}
mainRedCount
/=
2
mainBlackCount
/=
2
temp
.
MainRedCount
=
mainRedCount
temp
.
MainBlackCount
=
mainBlackCount
value
:=
float64
(
mainRedCount
)
/
(
float64
(
mainRedCount
)
+
float64
(
mainBlackCount
))
*
100
value
,
_
=
strconv
.
ParseFloat
(
fmt
.
Sprintf
(
"%.2f"
,
value
),
64
)
temp
.
MainVal
=
strconv
.
FormatFloat
(
value
,
'f'
,
-
1
,
64
)
+
"%"
var
buf
bytes
.
Buffer
tpl
,
err
:=
template
.
New
(
"week_guts.html"
)
.
Funcs
(
getFuncMap
())
.
ParseFiles
(
"assets/wechat/html/week_guts.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
,
week_mediaId
,
1
,
&
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录