Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
加钱居士.
foot
提交
424ee60f
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 搜索 >>
提交
424ee60f
编写于
3月 18, 2020
作者:
M
monomania
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.调试C3模型中...
上级
09276f31
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
193 addition
and
156 deletion
+193
-156
FC002AnalyTest.go
FC002AnalyTest.go
+2
-6
foot-core/module/analy/service/A1Service.go
foot-core/module/analy/service/A1Service.go
+4
-0
foot-core/module/analy/service/A2Service.go
foot-core/module/analy/service/A2Service.go
+4
-0
foot-core/module/analy/service/A3Service.go
foot-core/module/analy/service/A3Service.go
+5
-3
foot-core/module/analy/service/AnalyService.go
foot-core/module/analy/service/AnalyService.go
+35
-19
foot-core/module/analy/service/C1Service.go
foot-core/module/analy/service/C1Service.go
+5
-3
foot-core/module/analy/service/C2Service.go
foot-core/module/analy/service/C2Service.go
+18
-15
foot-core/module/analy/service/C3Service.go
foot-core/module/analy/service/C3Service.go
+103
-109
foot-core/module/analy/service/E1Service.go
foot-core/module/analy/service/E1Service.go
+4
-0
foot-core/module/analy/service/E2Service.go
foot-core/module/analy/service/E2Service.go
+4
-0
foot-core/module/analy/service/E3Service.go
foot-core/module/analy/service/E3Service.go
+5
-1
foot-core/module/analy/service/Q1Service.go
foot-core/module/analy/service/Q1Service.go
+4
-0
未找到文件。
FC002AnalyTest.go
浏览文件 @
424ee60f
package
main
import
(
"fmt"
"math/rand"
"strconv"
"tesou.io/platform/foot-parent/foot-api/common/base"
"tesou.io/platform/foot-parent/foot-core/common/base/service/mysql"
"tesou.io/platform/foot-parent/foot-core/module/analy/service"
...
...
@@ -12,14 +9,13 @@ import (
func
main
()
{
//关闭SQL输出
fmt
.
Println
(
strconv
.
FormatFloat
(
rand
.
Float64
(),
'f'
,
-
1
,
64
))
mysql
.
ShowSQL
(
false
)
base
.
Log
.
Info
(
"---------------------------------------------------------------"
)
base
.
Log
.
Info
(
"---------------C1模型--------------"
)
base
.
Log
.
Info
(
"---------------------------------------------------------------"
)
c1
:=
new
(
service
.
C
2
Service
)
c1
:=
new
(
service
.
C
3
Service
)
c1
.
MaxLetBall
=
1
//c1.Analy(true
)
c1
.
AnalyTest
(
)
base
.
Log
.
Info
(
"---------------------------------------------------------------"
)
base
.
Log
.
Info
(
"---------------E1模型--------------"
)
base
.
Log
.
Info
(
"---------------------------------------------------------------"
)
...
...
foot-core/module/analy/service/A1Service.go
浏览文件 @
424ee60f
...
...
@@ -23,6 +23,10 @@ func (this *A1Service) ModelName() string {
return
"A1"
}
func
(
this
*
A1Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
/**
分析比赛数据,, 结合亚赔 赔赔差异
( 1.欧赔降水,亚赔反之,以亚赔为准)
...
...
foot-core/module/analy/service/A2Service.go
浏览文件 @
424ee60f
...
...
@@ -24,6 +24,10 @@ func (this *A2Service) ModelName() string {
return
"A2"
}
func
(
this
*
A2Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
/**
分析比赛数据,, 结合亚赔 赔赔差异
( 1.欧赔降水,亚赔反之,以亚赔为准)
...
...
foot-core/module/analy/service/A3Service.go
浏览文件 @
424ee60f
...
...
@@ -27,6 +27,10 @@ func (this *A3Service) ModelName() string {
return
"A3"
}
func
(
this
*
A3Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
func
(
this
*
A3Service
)
Analy
(
analyAll
bool
)
{
this
.
AnalyService
.
Analy
(
analyAll
,
this
)
}
...
...
@@ -64,9 +68,7 @@ func (this *A3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
}
//限制初盘,即时盘让球在0.25以内
sLetBall
:=
math
.
Abs
(
a18Bet
.
SLetBall
)
eLetBall
:=
math
.
Abs
(
a18Bet
.
ELetBall
)
if
math
.
Abs
(
sLetBall
-
eLetBall
)
>
0.25
{
if
math
.
Abs
(
a18Bet
.
SLetBall
-
a18Bet
.
ELetBall
)
>
0.25
{
//temp_data.Result =""
//return -2, temp_data
//return -2, nil
...
...
foot-core/module/analy/service/AnalyService.go
浏览文件 @
424ee60f
...
...
@@ -23,6 +23,8 @@ import (
type
AnalyInterface
interface
{
ModelName
()
string
AnalyTest
()
Analy_Near
()
Analy
(
analyAll
bool
)
...
...
@@ -54,10 +56,25 @@ func (this *AnalyService) FindAll() []*entity5.AnalyResult {
return
dataList
}
func
(
this
*
AnalyService
)
AnalyTest
(
thiz
AnalyInterface
)
{
var
currentPage
,
pageSize
int64
=
1
,
30000
var
page
*
pojo
.
Page
page
=
new
(
pojo
.
Page
)
page
.
PageSize
=
pageSize
page
.
CurPage
=
currentPage
matchList
:=
make
([]
*
entity2
.
MatchLast
,
0
)
err
:=
this
.
MatchHisService
.
PageSql
(
"SELECT mh.* FROM foot.t_match_his mh WHERE mh.`MatchDate` > '2020-03-01 00:00:00' "
,
page
,
&
matchList
)
if
nil
!=
err
{
base
.
Log
.
Error
(
err
)
return
}
this
.
Analy_Process
(
matchList
,
thiz
,
false
)
}
func
(
this
*
AnalyService
)
Analy
(
analyAll
bool
,
thiz
AnalyInterface
)
{
var
matchList
[]
*
entity2
.
MatchLast
if
analyAll
{
var
currentPage
,
pageSize
int64
=
1
,
1000
var
currentPage
,
pageSize
int64
=
1
,
1000
var
page
*
pojo
.
Page
page
=
new
(
pojo
.
Page
)
page
.
PageSize
=
pageSize
...
...
@@ -68,7 +85,7 @@ func (this *AnalyService) Analy(analyAll bool, thiz AnalyInterface) {
base
.
Log
.
Error
(
err
)
return
}
go
this
.
Analy_Process
(
matchList
,
thiz
)
go
this
.
Analy_Process
(
matchList
,
thiz
,
true
)
for
currentPage
<=
page
.
TotalPage
{
currentPage
++
page
=
new
(
pojo
.
Page
)
...
...
@@ -80,24 +97,23 @@ func (this *AnalyService) Analy(analyAll bool, thiz AnalyInterface) {
base
.
Log
.
Error
(
err
)
continue
}
go
this
.
Analy_Process
(
matchList
,
thiz
)
go
this
.
Analy_Process
(
matchList
,
thiz
,
true
)
}
}
else
{
matchList
=
this
.
MatchLastService
.
FindNotFinished
()
this
.
Analy_Process
(
matchList
,
thiz
)
this
.
Analy_Process
(
matchList
,
thiz
,
true
)
}
}
func
(
this
*
AnalyService
)
Analy_Near
(
thiz
AnalyInterface
)
{
matchList
:=
this
.
MatchLastService
.
FindNear
()
this
.
Analy_Process
(
matchList
,
thiz
)
this
.
Analy_Process
(
matchList
,
thiz
,
true
)
}
/**
汇总结果并输出,且持久化
*/
func
(
this
*
AnalyService
)
Analy_Process
(
matchList
[]
*
entity2
.
MatchLast
,
thiz
AnalyInterface
)
{
func
(
this
*
AnalyService
)
Analy_Process
(
matchList
[]
*
entity2
.
MatchLast
,
thiz
AnalyInterface
,
persisted
bool
)
{
hit_count_str
:=
utils
.
GetVal
(
constants
.
SECTION_NAME
,
"hit_count"
)
hit_count
,
_
:=
strconv
.
Atoi
(
hit_count_str
)
data_list_slice
:=
make
([]
interface
{},
0
)
...
...
@@ -108,15 +124,6 @@ func (this *AnalyService) Analy_Process(matchList []*entity2.MatchLast, thiz Ana
for
_
,
v
:=
range
matchList
{
stub
,
temp_data
:=
thiz
.
analyStub
(
v
)
if
nil
!=
temp_data
{
if
strings
.
EqualFold
(
temp_data
.
Result
,
"命中"
)
{
rightCount
++
}
if
strings
.
EqualFold
(
temp_data
.
Result
,
"错误"
)
{
errorCount
++
}
}
if
stub
==
0
||
stub
==
1
{
temp_data
.
TOVoid
=
false
hours
:=
v
.
MatchDate
.
Sub
(
time
.
Now
())
.
Hours
()
...
...
@@ -130,6 +137,14 @@ func (this *AnalyService) Analy_Process(matchList []*entity2.MatchLast, thiz Ana
}
else
if
stub
==
1
{
data_modify_list_slice
=
append
(
data_modify_list_slice
,
temp_data
)
}
if
strings
.
EqualFold
(
temp_data
.
Result
,
"命中"
)
{
rightCount
++
}
if
strings
.
EqualFold
(
temp_data
.
Result
,
"错误"
)
{
errorCount
++
}
}
else
if
nil
!=
temp_data
{
temp_data
.
TOVoid
=
true
if
len
(
temp_data
.
Id
)
>
0
{
...
...
@@ -150,8 +165,10 @@ func (this *AnalyService) Analy_Process(matchList []*entity2.MatchLast, thiz Ana
base
.
Log
.
Info
(
"X0000场次:"
,
errorCount
)
base
.
Log
.
Info
(
"------------------"
)
this
.
SaveList
(
data_list_slice
)
this
.
ModifyList
(
data_modify_list_slice
)
if
persisted
{
this
.
SaveList
(
data_list_slice
)
this
.
ModifyList
(
data_modify_list_slice
)
}
}
/**
...
...
@@ -459,7 +476,6 @@ func (this *AnalyService) ActualResult(last *entity2.MatchLast, analy *entity5.A
return
result
}
/**
是否是主队让球,反之是客队让球
*/
...
...
foot-core/module/analy/service/C1Service.go
浏览文件 @
424ee60f
...
...
@@ -28,6 +28,10 @@ func (this *C1Service) ModelName() string {
return
"C1"
}
func
(
this
*
C1Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
func
(
this
*
C1Service
)
Analy
(
analyAll
bool
)
{
this
.
AnalyService
.
Analy
(
analyAll
,
this
)
...
...
@@ -65,9 +69,7 @@ func (this *C1Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
}
//限制初盘,即时盘让球在0.25以内
sLetBall
:=
math
.
Abs
(
a18Bet
.
SLetBall
)
eLetBall
:=
math
.
Abs
(
a18Bet
.
ELetBall
)
if
math
.
Abs
(
sLetBall
-
eLetBall
)
>
0.25
{
if
math
.
Abs
(
a18Bet
.
SLetBall
-
a18Bet
.
ELetBall
)
>
0.25
{
//temp_data.Result = ""
//return -2, temp_data
}
...
...
foot-core/module/analy/service/C2Service.go
浏览文件 @
424ee60f
...
...
@@ -27,9 +27,12 @@ func (this *C2Service) ModelName() string {
return
"C2"
}
func
(
this
*
C2Service
)
Analy
(
analyAll
bool
)
{
this
.
AnalyService
.
Analy
(
analyAll
,
this
)
func
(
this
*
C2Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
func
(
this
*
C2Service
)
Analy
(
analyAll
bool
)
{
this
.
AnalyService
.
Analy
(
analyAll
,
this
)
}
func
(
this
*
C2Service
)
Analy_Near
()
{
...
...
@@ -64,9 +67,7 @@ func (this *C2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
}
//限制初盘,即时盘让球在0.25以内
sLetBall
:=
math
.
Abs
(
a18Bet
.
SLetBall
)
eLetBall
:=
math
.
Abs
(
a18Bet
.
ELetBall
)
if
math
.
Abs
(
sLetBall
-
eLetBall
)
>
0.25
{
if
math
.
Abs
(
a18Bet
.
SLetBall
-
a18Bet
.
ELetBall
)
>
0.25
{
//temp_data.Result =""
//return -2, temp_data
}
...
...
@@ -169,8 +170,8 @@ func (this *C2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
letBall
-=
baseVal
+
float64
(
guestWin
-
mainWin
)
*
baseVal
*
3
}
//
bfj_main
:=
this
.
BFJinService
.
FindNearByTeamName
(
v
.
MatchDate
,
v
.
MainTeamId
,
4
)
bfj_guest
:=
this
.
BFJinService
.
FindNearByTeamName
(
v
.
MatchDate
,
v
.
GuestTeamId
,
4
)
bfj_main
:=
this
.
BFJinService
.
FindNearByTeamName
(
v
.
MatchDate
,
v
.
MainTeamId
,
4
)
bfj_guest
:=
this
.
BFJinService
.
FindNearByTeamName
(
v
.
MatchDate
,
v
.
GuestTeamId
,
4
)
bfj_mainWin
:=
0
bfj_guestWin
:=
0
for
_
,
e
:=
range
bfj_main
{
...
...
@@ -201,7 +202,7 @@ func (this *C2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
bffe_main
:=
this
.
BFFutureEventService
.
FindNextBattle
(
matchId
,
v
.
MainTeamId
)
bffe_guest
:=
this
.
BFFutureEventService
.
FindNextBattle
(
matchId
,
v
.
GuestTeamId
)
if
this
.
IsCupMatch
(
bffe_main
.
EventLeagueId
){
if
this
.
IsCupMatch
(
bffe_main
.
EventLeagueId
)
{
//下一场打杯赛
return
-
3
,
temp_data
}
else
{
...
...
@@ -210,7 +211,7 @@ func (this *C2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
letBall
+=
(
baseVal
)
}
}
if
this
.
IsCupMatch
(
bffe_guest
.
EventLeagueId
){
if
this
.
IsCupMatch
(
bffe_guest
.
EventLeagueId
)
{
//下一场打杯赛
return
-
3
,
temp_data
}
else
{
...
...
@@ -224,6 +225,8 @@ func (this *C2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
mainLetball
:=
this
.
AnalyService
.
mainLetball
(
a18Bet
)
//2.0区间段
sLetBall
:=
math
.
Abs
(
a18Bet
.
SLetBall
)
eLetBall
:=
math
.
Abs
(
a18Bet
.
ELetBall
)
var
sectionBlock1
,
sectionBlock2
int
tLetBall
:=
math
.
Abs
(
letBall
)
//maxLetBall := math.Max(sLetBall, eLetBall)
...
...
@@ -288,23 +291,23 @@ func (this *C2Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
}
}
temp_bfj_main
:=
this
.
BFJinService
.
FindNearByTeamName
(
v
.
MatchDate
,
v
.
MainTeamId
,
1
)
temp_bfj_guest
:=
this
.
BFJinService
.
FindNearByTeamName
(
v
.
MatchDate
,
v
.
GuestTeamId
,
1
)
temp_bfj_main
:=
this
.
BFJinService
.
FindNearByTeamName
(
v
.
MatchDate
,
v
.
MainTeamId
,
1
)
temp_bfj_guest
:=
this
.
BFJinService
.
FindNearByTeamName
(
v
.
MatchDate
,
v
.
GuestTeamId
,
1
)
for
_
,
e
:=
range
temp_bfj_main
{
if
e
.
HomeTeam
==
v
.
MainTeamId
&&
e
.
HomeScore
>
e
.
GuestScore
{
continue
}
else
if
e
.
GuestTeam
==
v
.
MainTeamId
&&
e
.
GuestScore
>
e
.
HomeScore
{
}
else
if
e
.
GuestTeam
==
v
.
MainTeamId
&&
e
.
GuestScore
>
e
.
HomeScore
{
continue
}
else
{
}
else
{
return
-
3
,
temp_data
}
}
for
_
,
e
:=
range
temp_bfj_guest
{
if
e
.
HomeTeam
==
v
.
GuestTeamId
&&
e
.
HomeScore
>
e
.
GuestScore
{
return
-
3
,
temp_data
}
else
if
e
.
GuestTeam
==
v
.
GuestTeamId
&&
e
.
GuestScore
>
e
.
HomeScore
{
}
else
if
e
.
GuestTeam
==
v
.
GuestTeamId
&&
e
.
GuestScore
>
e
.
HomeScore
{
return
-
3
,
temp_data
}
else
{
}
else
{
continue
}
}
...
...
foot-core/module/analy/service/C3Service.go
浏览文件 @
424ee60f
...
...
@@ -26,9 +26,12 @@ func (this *C3Service) ModelName() string {
return
"C3"
}
func
(
this
*
C3Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
func
(
this
*
C3Service
)
Analy
(
analyAll
bool
)
{
this
.
AnalyService
.
Analy
(
analyAll
,
this
)
}
func
(
this
*
C3Service
)
Analy_Near
()
{
...
...
@@ -60,27 +63,25 @@ func (this *C3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
}
//限制初盘,即时盘让球在0.25以内
sLetBall
:=
math
.
Abs
(
a18Bet
.
SLetBall
)
eLetBall
:=
math
.
Abs
(
a18Bet
.
ELetBall
)
if
math
.
Abs
(
sLetBall
-
eLetBall
)
>
0.25
{
if
math
.
Abs
(
a18Bet
.
SLetBall
-
a18Bet
.
ELetBall
)
>
0.25
{
//temp_data.Result =""
//
return -2, temp_data
return
-
2
,
temp_data
}
//得出结果
preResult
:=
-
1
letBall
:=
0.00
//------
bfs_arr
:=
this
.
BFScoreService
.
FindByMatchId
(
matchId
)
if
len
(
bfs_arr
)
<
1
{
return
-
1
,
temp_data
}
var
temp_val
float64
var
mainZongBfs
*
pojo
.
BFScore
var
mainZhuBfs
*
pojo
.
BFScore
var
mainZhuJinBfs
*
pojo
.
BFScore
var
guestZongBfs
*
pojo
.
BFScore
var
guestKeBfs
*
pojo
.
BFScore
var
guestKeJinBfs
*
pojo
.
BFScore
for
_
,
e
:=
range
bfs_arr
{
//bfs_arr有多语言版本,条数很多
if
e
.
TeamId
==
v
.
MainTeamId
{
if
e
.
Type
==
"总"
{
...
...
@@ -89,6 +90,9 @@ func (this *C3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
if
e
.
Type
==
"主"
{
mainZhuBfs
=
e
}
if
e
.
Type
==
"近"
{
mainZhuJinBfs
=
e
}
}
else
if
e
.
TeamId
==
v
.
GuestTeamId
{
if
e
.
Type
==
"总"
{
guestZongBfs
=
e
...
...
@@ -96,140 +100,133 @@ func (this *C3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
if
e
.
Type
==
"客"
{
guestKeBfs
=
e
}
if
e
.
Type
==
"近"
{
guestKeJinBfs
=
e
}
}
}
if
mainZongBfs
==
nil
||
guestZongBfs
==
nil
||
mainZhuBfs
==
nil
||
guestKe
Bfs
==
nil
{
if
mainZongBfs
==
nil
||
mainZhuBfs
==
nil
||
mainZhuJinBfs
==
nil
||
guestZongBfs
==
nil
||
guestKeBfs
==
nil
||
guestKeJin
Bfs
==
nil
{
return
-
1
,
temp_data
}
baseVal
:=
0.068
rankDiff
:=
3.0
var
temp_zong_val_1
,
temp_zong_val_2
float64
=
0
,
0
var
temp_jin_val_1
,
temp_jin_val_2
float64
=
0
,
0
if
mainZongBfs
.
MatchCount
>=
8
&&
guestZongBfs
.
MatchCount
>=
8
{
//排名越小越好
temp_val
=
float64
(
mainZongBfs
.
Ranking
-
guestZongBfs
.
Ranking
)
if
temp_val
>=
rankDiff
{
xishu
:=
1.0
if
temp_val
>
11
{
xishu
=
3.0
}
else
if
temp_val
>
5
{
xishu
=
2.0
}
letBall
-=
(
temp_val
/
rankDiff
)
*
baseVal
*
xishu
}
temp_val
=
float64
(
guestZongBfs
.
Ranking
-
mainZongBfs
.
Ranking
)
if
temp_val
>=
rankDiff
{
xishu
:=
1.0
if
temp_val
>
11
{
xishu
=
3.0
}
else
if
temp_val
>
5
{
xishu
=
2.0
}
letBall
+=
(
temp_val
/
rankDiff
)
*
baseVal
*
xishu
}
temp_val
=
float64
(
mainZhuBfs
.
Ranking
-
guestKeBfs
.
Ranking
)
if
temp_val
>=
rankDiff
{
xishu
:=
1.0
letBall
-=
(
temp_val
/
rankDiff
/
2
)
*
baseVal
*
xishu
}
temp_val
=
float64
(
guestKeBfs
.
Ranking
-
mainZhuBfs
.
Ranking
)
if
temp_val
>=
rankDiff
{
xishu
:=
1.0
letBall
+=
(
temp_val
/
rankDiff
/
2
)
*
baseVal
*
xishu
}
temp_zong_val_1
=
float64
(
mainZongBfs
.
Ranking
-
guestZongBfs
.
Ranking
)
temp_zong_val_2
=
float64
(
mainZongBfs
.
GetGoal
-
guestZongBfs
.
GetGoal
)
temp_jin_val_1
=
float64
(
mainZhuJinBfs
.
Score
-
guestKeJinBfs
.
Score
)
temp_jin_val_2
=
float64
(
mainZhuJinBfs
.
GetGoal
-
guestKeJinBfs
.
GetGoal
)
}
else
{
//
return -1, temp_data
return
-
1
,
temp_data
}
//------
bffe_main
:=
this
.
BFFutureEventService
.
FindNextBattle
(
matchId
,
v
.
MainTeamId
)
bffe_guest
:=
this
.
BFFutureEventService
.
FindNextBattle
(
matchId
,
v
.
GuestTeamId
)
//保证积分榜上,进球能力有支持
if
(
temp_zong_val_1
>
0
&&
temp_zong_val_2
<
0
)
||
(
temp_zong_val_1
<
0
&&
temp_zong_val_2
>
0
)
{
return
-
2
,
temp_data
}
if
this
.
IsCupMatch
(
bffe_main
.
EventLeagueId
)
{
//下一场打杯赛
//return -3, temp_data
}
else
{
//如果主队下一场打客场,战意充足
if
v
.
MainTeamId
==
bffe_main
.
EventGuestTeamId
{
letBall
+=
(
baseVal
)
//2.0区间段
var
sectionBlock1
,
sectionBlock2
int
=
-
1
,
-
1
var
sectionValArr
=
[]
float64
{
0.0
,
0.25
,
0.50
,
0.75
,
1
,
1.25
,
1.5
,
1.75
,
2
}
//总积分的让球值
tempLetball1
:=
math
.
Abs
(
temp_zong_val_1
)
/
10
for
i
,
e
:=
range
sectionValArr
{
if
tempLetball1
<=
e
{
sectionBlock1
=
i
break
;
}
}
if
this
.
IsCupMatch
(
bffe_guest
.
EventLeagueId
)
{
//下一场打杯赛
//return -3, temp_data
}
else
{
//如果客队下一场打主场,战意懈怠
if
v
.
GuestTeamId
==
bffe_guest
.
EventMainTeamId
{
letBall
+=
(
baseVal
)
tempLetball2
:=
math
.
Abs
(
temp_zong_val_2
)
/
10
for
i
,
e
:=
range
sectionValArr
{
if
tempLetball2
<=
e
{
sectionBlock2
=
i
break
;
}
}
//1.0判断主队是否是让球方
mainLetball
:=
this
.
AnalyService
.
mainLetball
(
a18Bet
)
//2.0区间段
var
sectionBlock1
,
sectionBlock2
int
tLetBall
:=
math
.
Abs
(
letBall
)
//maxLetBall := math.Max(sLetBall, eLetBall)
tempLetball1
:=
math
.
Abs
(
sLetBall
-
tLetBall
)
if
tempLetball1
<
0.0
{
sectionBlock1
=
1
}
else
if
tempLetball1
<
0.256
{
sectionBlock1
=
2
}
else
if
tempLetball1
<
0.51
{
sectionBlock1
=
3
}
else
if
tempLetball1
<
0.76
{
sectionBlock1
=
4
}
else
{
sectionBlock1
=
10000
}
tempLetball2
:=
math
.
Abs
(
eLetBall
-
tLetBall
)
if
tempLetball2
<
0.0
{
sectionBlock2
=
1
}
else
if
tempLetball2
<
0.256
{
sectionBlock2
=
2
}
else
if
tempLetball2
<
0.51
{
sectionBlock2
=
3
}
else
if
tempLetball2
<
0.76
{
sectionBlock2
=
4
}
else
{
sectionBlock2
=
10000
if
sectionBlock1
==
-
1
||
sectionBlock2
==
-
1
{
return
-
3
,
temp_data
}
//3.0即时盘赔率大于等于初盘赔率
sLetBall
:=
math
.
Abs
(
a18Bet
.
SLetBall
)
eLetBall
:=
math
.
Abs
(
a18Bet
.
ELetBall
)
endUp
:=
eLetBall
>=
sLetBall
//3.1即时盘初盘
notZero
:=
tLetBall
>=
eLetBall
&&
tLetBall
>=
sLetBall
if
!
endUp
{
return
-
3
,
temp_data
}
//看两个区间是否属于同一个区间
//if sectionBlock1 == 1 && sectionBlock2 == 1 {
if
sectionBlock1
<=
2
&&
sectionBlock2
<=
2
{
if
mainLetball
&&
letBall
>
0.1
&&
endUp
&&
notZero
{
preResult
=
3
}
else
if
!
mainLetball
&&
letBall
<
-
0.1
&&
endUp
&&
notZero
{
//preResult = 0
if
matchId
==
"1721267"
{
fmt
.
Println
(
""
)
}
//
var
bf_begin
,
bf_end
float64
if
sectionBlock1
==
sectionBlock2
{
if
sectionBlock1
==
0
{
return
-
3
,
temp_data
}
bf_begin
=
sectionValArr
[
sectionBlock1
]
-
0.25
bf_end
=
sectionValArr
[
sectionBlock1
]
+
0.25
}
else
if
sectionBlock1
-
sectionBlock2
==
1
||
sectionBlock1
-
sectionBlock2
==
-
1
{
if
sectionBlock1
<
sectionBlock2
{
bf_begin
=
sectionValArr
[
sectionBlock1
]
-
0.25
bf_end
=
sectionValArr
[
sectionBlock2
]
+
0.25
}
else
{
bf_begin
=
sectionValArr
[
sectionBlock2
]
-
0.25
bf_end
=
sectionValArr
[
sectionBlock1
]
+
0.25
}
}
if
preResult
<
0
{
//存在合理区间里
var
smallLetBall
float64
if
eLetBall
-
sLetBall
>=
0
{
smallLetBall
=
sLetBall
}
else
{
smallLetBall
=
eLetBall
}
if
bf_end
-
smallLetBall
>=
0.5
{
return
-
3
,
temp_data
}
var
reasonable
=
false
if
bf_begin
<=
eLetBall
&&
eLetBall
<=
bf_end
{
reasonable
=
true
}
if
preResult
==
3
&&
this
.
IsCupMatch
(
bffe_main
.
EventLeagueId
)
{
//下一场打杯赛
return
-
3
,
temp_data
}
else
if
preResult
==
0
&&
this
.
IsCupMatch
(
bffe_guest
.
EventLeagueId
)
{
//下一场打杯赛
//1.0判断主队是否是让球方
mainLetball
:=
this
.
AnalyService
.
mainLetball
(
a18Bet
)
if
reasonable
{
if
mainLetball
{
preResult
=
3
}
else
{
preResult
=
0
}
}
else
{
}
if
preResult
==
3
&&
(
temp_jin_val_1
<
0
||
temp_jin_val_2
<
0
)
{
preResult
=
-
1
}
if
preResult
==
3
&&
(
temp_jin_val_1
>
0
||
temp_jin_val_2
>
0
)
{
preResult
=
-
1
}
if
preResult
<
0
{
return
-
3
,
temp_data
}
base
.
Log
.
Info
(
"所属于区间:
"
,
sectionBlock1
,
"-"
,
sectionBlock2
,
",对阵"
,
v
.
MainTeamId
+
":"
+
v
.
GuestTeamId
,
",计算得出让球为:"
,
letBall
,
",初盘让球:"
,
a18Bet
.
SLetBall
,
",即时盘让球:"
,
a18Bet
.
ELetBall
)
base
.
Log
.
Info
(
"所属于区间:
"
,
bf_begin
,
" - "
,
bf_end
,
" ,对阵"
,
v
.
MainTeamId
+
":"
+
v
.
GuestTeamId
,
",初盘让球:"
,
a18Bet
.
SLetBall
,
",即时盘让球:"
,
a18Bet
.
ELetBall
)
var
data
*
entity5
.
AnalyResult
if
len
(
temp_data
.
Id
)
>
0
{
temp_data
.
PreResult
=
preResult
temp_data
.
HitCount
=
temp_data
.
HitCount
+
1
temp_data
.
LetBall
=
a18Bet
.
ELetBall
temp_data
.
MyLetBall
=
Decimal
(
letBall
)
data
=
temp_data
//比赛结果
data
.
Result
=
this
.
IsRight
(
v
,
data
)
...
...
@@ -245,11 +242,8 @@ func (this *C3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
data
.
AlSeq
=
format
data
.
PreResult
=
preResult
data
.
HitCount
=
3
data
.
MyLetBall
=
Decimal
(
letBall
)
//比赛结果
data
.
Result
=
this
.
IsRight
(
v
,
data
)
return
0
,
data
}
}
foot-core/module/analy/service/E1Service.go
浏览文件 @
424ee60f
...
...
@@ -19,6 +19,10 @@ func (this *E1Service) ModelName() string {
return
"E1"
}
func
(
this
*
E1Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
/**
计算欧赔81 616的即时盘,和初盘的差异
*/
...
...
foot-core/module/analy/service/E2Service.go
浏览文件 @
424ee60f
...
...
@@ -19,6 +19,10 @@ func (this *E2Service) ModelName() string {
return
"E2"
}
func
(
this
*
E2Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
/**
计算欧赔81 616的即时盘,和初盘的差异
*/
...
...
foot-core/module/analy/service/E3Service.go
浏览文件 @
424ee60f
...
...
@@ -23,6 +23,10 @@ func (this *E3Service) ModelName() string {
return
"E3"
}
func
(
this
*
E3Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
/**
计算欧赔81 616的即时盘,和初盘的差异
*/
...
...
@@ -83,7 +87,7 @@ func (this *E3Service) analyStub(v *pojo.MatchLast) (int, *entity5.AnalyResult)
//得出结果
//1.0判断主队是否是让球方
mainLetball
:=
this
.
AnalyService
.
mainLetball
(
a
18Bet
)
mainLetball
:=
this
.
AnalyService
.
mainLetball
(
a
Bet365
)
preResult
:=
-
1
if
mainLetball
{
...
...
foot-core/module/analy/service/Q1Service.go
浏览文件 @
424ee60f
...
...
@@ -19,6 +19,10 @@ func (this *Q1Service) ModelName() string {
return
"Q1"
}
func
(
this
*
Q1Service
)
AnalyTest
()
{
this
.
AnalyService
.
AnalyTest
(
this
)
}
func
(
this
*
Q1Service
)
Analy
(
analyAll
bool
)
{
this
.
AnalyService
.
Analy
(
analyAll
,
this
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录