Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
加钱居士.
foot
提交
ddea116f
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,发现更多精彩内容 >>
提交
ddea116f
编写于
1月 14, 2020
作者:
M
monomania
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.分析内容产生中
上级
34f28a6d
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
141 addition
and
15 deletion
+141
-15
assets/leisu/html/content.html
assets/leisu/html/content.html
+5
-0
foot-api/module/suggest/pojo/Suggest.go
foot-api/module/suggest/pojo/Suggest.go
+0
-2
foot-api/module/suggest/vo/SuggestDetailVO.go
foot-api/module/suggest/vo/SuggestDetailVO.go
+46
-0
foot-api/module/suggest/vo/TodayDetailVO.go
foot-api/module/suggest/vo/TodayDetailVO.go
+14
-0
foot-api/module/suggest/vo/TodayVO.go
foot-api/module/suggest/vo/TodayVO.go
+0
-6
foot-core/module/odds/service/EuroLastService.go
foot-core/module/odds/service/EuroLastService.go
+2
-2
foot-core/module/suggest/service/SuggestService.go
foot-core/module/suggest/service/SuggestService.go
+70
-1
foot-core/module/wechat/service/SuggestTodayService.go
foot-core/module/wechat/service/SuggestTodayService.go
+4
-4
未找到文件。
assets/leisu/html/content.html
浏览文件 @
ddea116f
基本面:
主队总场,积{{.Score}}分,排名:{{.Ranking}},胜率:{{.WinRate}}%
主队主场,积{{.Score}}分,排名:{{.Ranking}},胜率:{{.WinRate}}%
客队总场,积{{.Score}}分,排名:{{.Ranking}},胜率:{{.WinRate}}%
客队客场,积{{.Score}}分,排名:{{.Ranking}},胜率:{{.WinRate}}%
foot-api/module/suggest/pojo/Suggest.go
浏览文件 @
ddea116f
...
...
@@ -11,7 +11,5 @@ import (
*/
type
Suggest
struct
{
pojo2
.
AnalyResult
`xorm:"extends"`
}
foot-api/module/suggest/vo/SuggestDetailVO.go
0 → 100644
浏览文件 @
ddea116f
package
vo
import
(
pojo3
"tesou.io/platform/foot-parent/foot-api/module/match/pojo"
pojo2
"tesou.io/platform/foot-parent/foot-api/module/odds/pojo"
"tesou.io/platform/foot-parent/foot-api/module/suggest/pojo"
)
type
SuggestDetailVO
struct
{
MatchDateStr
string
//联赛
LeagueName
string
//主队
MainTeam
string
//客队
GuestTeam
string
//主队进球
MainTeamGoal
string
//客队进球
GuestTeamGoal
string
//指数
HitCount
int
//开始时间
BeginDateStr
string
//结束时间
EndDateStr
string
//是否倒序
IsDesc
bool
//算法标识
AlFlags
[]
string
pojo
.
Suggest
`xorm:"extends"`
//欧赔
EOddList
[]
*
pojo2
.
EuroLast
//亚赔
AOddList
[]
*
pojo2
.
AsiaLast
//基本面
BFSList
[]
*
pojo3
.
BFScore
BFBList
[]
*
pojo3
.
BFBattle
BFFEList
[]
*
pojo3
.
BFFutureEvent
}
foot-api/module/suggest/vo/TodayDetailVO.go
0 → 100644
浏览文件 @
ddea116f
package
vo
type
TodayDetailVO
struct
{
SpiderDateStr
string
//开始时间
BeginDateStr
string
//结束时间
EndDateStr
string
//数据时间
DataDateStr
string
DataList
[]
SuggestDetailVO
}
foot-api/module/suggest/vo/TodayVO.go
浏览文件 @
ddea116f
package
vo
import
"tesou.io/platform/foot-parent/foot-api/module/odds/pojo"
type
TodayVO
struct
{
SpiderDateStr
string
//开始时间
...
...
@@ -12,8 +10,4 @@ type TodayVO struct {
DataDateStr
string
DataList
[]
SuggestVO
EuroOddList
[]
pojo
.
EuroLast
AsiaOddList
[]
pojo
.
AsiaLast
}
foot-core/module/odds/service/EuroLastService.go
浏览文件 @
ddea116f
...
...
@@ -21,9 +21,9 @@ func (this *EuroLastService) FindExists(v *pojo.EuroLast) bool {
}
//根据比赛ID查找欧赔
func
(
this
*
EuroLastService
)
FindByMatchId
(
v
*
pojo
.
EuroLast
)
[]
*
pojo
.
EuroLast
{
func
(
this
*
EuroLastService
)
FindByMatchId
(
matchId
string
)
[]
*
pojo
.
EuroLast
{
dataList
:=
make
([]
*
pojo
.
EuroLast
,
0
)
err
:=
mysql
.
GetEngine
()
.
Where
(
" MatchId = ? "
,
v
.
M
atchId
)
.
Find
(
dataList
)
err
:=
mysql
.
GetEngine
()
.
Where
(
" MatchId = ? "
,
m
atchId
)
.
Find
(
dataList
)
if
err
!=
nil
{
base
.
Log
.
Error
(
"FindByMatchId:"
,
err
)
}
...
...
foot-core/module/suggest/service/SuggestService.go
浏览文件 @
ddea116f
...
...
@@ -4,6 +4,8 @@ import (
"strconv"
vo2
"tesou.io/platform/foot-parent/foot-api/module/suggest/vo"
"tesou.io/platform/foot-parent/foot-core/common/base/service/mysql"
service2
"tesou.io/platform/foot-parent/foot-core/module/match/service"
"tesou.io/platform/foot-parent/foot-core/module/odds/service"
)
/**
...
...
@@ -11,6 +13,11 @@ import (
*/
type
SuggestService
struct
{
mysql
.
BaseService
service
.
EuroLastService
service
.
AsiaLastService
service2
.
BFScoreService
service2
.
BFBattleService
service2
.
BFFutureEventService
}
/**
...
...
@@ -57,7 +64,6 @@ WHERE mh.LeagueId = l.Id
this
.
FindBySQL
(
sql
,
&
entitys
)
return
entitys
}
func
(
this
*
SuggestService
)
Query
(
param
*
vo2
.
SuggestVO
)
[]
*
vo2
.
SuggestVO
{
...
...
@@ -103,5 +109,68 @@ WHERE mh.LeagueId = l.Id
this
.
FindBySQL
(
sql
,
&
entitys
)
return
entitys
}
func
(
this
*
SuggestService
)
QueryDetail
(
param
*
vo2
.
SuggestDetailVO
)
[]
*
vo2
.
SuggestDetailVO
{
sql
:=
`
SELECT
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
`
if
param
.
HitCount
>
0
{
sql
+=
" AND ar.HitCount >= '"
+
strconv
.
Itoa
(
param
.
HitCount
)
+
"' "
}
if
len
(
param
.
AlFlag
)
>
0
{
sql
+=
" AND ar.AlFlag in ("
+
param
.
AlFlag
+
") "
}
if
len
(
param
.
BeginDateStr
)
>
0
{
sql
+=
" AND mh.`MatchDate` >= '"
+
param
.
BeginDateStr
+
"' "
}
if
len
(
param
.
EndDateStr
)
>
0
{
sql
+=
" AND mh.`MatchDate` <= '"
+
param
.
EndDateStr
+
"' "
}
if
param
.
IsDesc
{
sql
+=
" ORDER BY ar.`AlFlag` DESC,ar.MatchDate DESC, l.id ASC,mh.MainTeamId asc, ar.PreResult DESC "
}
else
{
sql
+=
" ORDER BY ar.`AlFlag` DESC,ar.MatchDate ASC, l.id ASC,mh.MainTeamId asc,ar.PreResult DESC "
}
//结果值
entitys
:=
make
([]
*
vo2
.
SuggestDetailVO
,
0
)
//执行查询
this
.
FindBySQL
(
sql
,
&
entitys
)
if
len
(
entitys
)
<=
0
{
return
entitys
}
for
_
,
e
:=
range
entitys
{
matchId
:=
e
.
MatchId
eOddList
:=
this
.
EuroLastService
.
FindByMatchId
(
matchId
)
aOddList
:=
this
.
AsiaLastService
.
FindByMatchId
(
matchId
)
bfsList
:=
this
.
BFScoreService
.
FindByMatchId
(
matchId
)
bfbList
:=
this
.
BFBattleService
.
FindByMatchId
(
matchId
)
bffeList
:=
this
.
BFFutureEventService
.
FindByMatchId
(
matchId
)
e
.
EOddList
=
eOddList
e
.
AOddList
=
aOddList
e
.
BFSList
=
bfsList
e
.
BFBList
=
bfbList
e
.
BFFEList
=
bffeList
}
return
entitys
}
foot-core/module/wechat/service/SuggestTodayService.go
浏览文件 @
ddea116f
...
...
@@ -161,7 +161,7 @@ func (this *SuggestTodayService) ModifyToday(wcClient *core.Client) {
今日赛事分析
*/
func
(
this
*
SuggestTodayService
)
ModifyTodayDetail
(
wcClient
*
core
.
Client
)
{
param
:=
new
(
vo
.
SuggestVO
)
param
:=
new
(
vo
.
Suggest
Detail
VO
)
now
:=
time
.
Now
()
h12
,
_
:=
time
.
ParseDuration
(
"-24h"
)
beginDate
:=
now
.
Add
(
h12
)
...
...
@@ -171,7 +171,7 @@ func (this *SuggestTodayService) ModifyTodayDetail(wcClient *core.Client) {
param
.
EndDateStr
=
endDate
.
Format
(
"2006-01-02 15:04:05"
)
//今日推荐
param
.
AlFlag
=
getAlFlag
()
tempList
:=
this
.
SuggestService
.
Query
(
param
)
tempList
:=
this
.
SuggestService
.
Query
Detail
(
param
)
//更新推送
first
:=
material
.
Article
{}
first
.
Title
=
fmt
.
Sprintf
(
"赛事解析"
)
...
...
@@ -180,12 +180,12 @@ func (this *SuggestTodayService) ModifyTodayDetail(wcClient *core.Client) {
first
.
ContentSourceURL
=
contentSourceURL
first
.
Author
=
utils
.
GetVal
(
"wechat"
,
"author"
)
temp
:=
vo
.
TodayVO
{}
temp
:=
vo
.
Today
Detail
VO
{}
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
))
temp
.
DataList
=
make
([]
vo
.
Suggest
Detail
VO
,
len
(
tempList
))
for
i
,
e
:=
range
tempList
{
e
.
MatchDateStr
=
e
.
MatchDate
.
Format
(
"02号15:04"
)
temp
.
DataList
[
i
]
=
*
e
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录