From 7e43ac0ea27cb2c23d15dc1f4be953925299a638 Mon Sep 17 00:00:00 2001 From: monomania Date: Thu, 13 Feb 2020 02:07:01 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B0=83=E6=95=B4=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/wechat/html/month.html | 2 +- assets/wechat/html/week.html | 2 +- conf/app.ini | 9 +++-- conf/app_prod.ini | 5 ++- .../module/analy/service/AnalyService.go | 38 +++++++++++++------ .../wechat/service/SuggestMonthService.go | 2 +- .../wechat/service/SuggestTodayService.go | 5 +++ .../wechat/service/SuggestWeekService.go | 2 +- 8 files changed, 44 insertions(+), 21 deletions(-) diff --git a/assets/wechat/html/month.html b/assets/wechat/html/month.html index 8d6de2b..b558364 100644 --- a/assets/wechat/html/month.html +++ b/assets/wechat/html/month.html @@ -13,7 +13,7 @@ 黑:{{.BlackCount}}, 胜率:{{.RedCount}}/({{.RedCount}}+{{.BlackCount}})={{.Val}} -
  • C1模型统计, +
  • 次防平统计, 红:{{.MainRedCount}}, 黑:{{.MainBlackCount}}, 胜率:{{.MainRedCount}}/({{.MainRedCount}}+{{.MainBlackCount}})={{.MainVal}} diff --git a/assets/wechat/html/week.html b/assets/wechat/html/week.html index 554d4a6..04e1deb 100644 --- a/assets/wechat/html/week.html +++ b/assets/wechat/html/week.html @@ -13,7 +13,7 @@ 黑:{{.BlackCount}}, 胜率:{{.RedCount}}/({{.RedCount}}+{{.BlackCount}})={{.Val}}
  • -
  • C1模型统计, +
  • 次防平统计, 红:{{.MainRedCount}}, 黑:{{.MainBlackCount}}, 胜率:{{.MainRedCount}}/({{.MainRedCount}}+{{.MainBlackCount}})={{.MainVal}} diff --git a/conf/app.ini b/conf/app.ini index 1abb4cc..376f8cb 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -1,6 +1,6 @@ [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] @@ -53,8 +53,9 @@ content_tpl="本次推荐为程序全自动处理,全程无人为参与干预. price_strategy=0 [wechat] ###推荐使用的算法 -al_flag='A1','C1' -main_al_flag='','C1' +al_flag='A1','C1','E2' +stat_al_flag='','A1' +main_al_flag='','A1' OriId=gh_a8328f3c25d2 AppID=wx76e3dd0445aa0055 AppSecret=4257a40eb6f59e50777fdcc2b47b31a4 diff --git a/conf/app_prod.ini b/conf/app_prod.ini index 997dcc6..688a605 100644 --- a/conf/app_prod.ini +++ b/conf/app_prod.ini @@ -52,8 +52,9 @@ content_tpl="本次推荐为程序全自动处理,全程无人为参与干预. price_strategy=0 [wechat] ###推荐使用的算法 -al_flag='C1','E2' -main_al_flag='','C1' +al_flag='A1','C1','E2' +stat_al_flag='','A1' +main_al_flag='','A1' OriId=gh_a8328f3c25d2 AppID=wx76e3dd0445aa0055 AppSecret=4257a40eb6f59e50777fdcc2b47b31a4 diff --git a/foot-core/module/analy/service/AnalyService.go b/foot-core/module/analy/service/AnalyService.go index e8eb8fb..bfdccbe 100644 --- a/foot-core/module/analy/service/AnalyService.go +++ b/foot-core/module/analy/service/AnalyService.go @@ -317,7 +317,7 @@ func (this *AnalyService) ActualResult(last *entity2.MatchLast, analy *entity5.A 1.欧赔是主降还是主升 主降为true */ func EuroMainDown(e81 *entity3.EuroHis, e616 *entity3.EuroHis) int { - if e81.Ep3 <= e81.Sp3 && e616.Ep3 <= e616.Sp3 && e616.Ep3 <= e81.Ep3{ + if e81.Ep3 <= e81.Sp3 && e616.Ep3 <= e616.Sp3 && e616.Ep3 <= e81.Ep3 { return 3 } else if e81.Ep0 <= e81.Sp0 && e616.Ep0 <= e616.Sp0 && e616.Ep0 <= e81.Ep0 { return 0 @@ -328,18 +328,34 @@ func EuroMainDown(e81 *entity3.EuroHis, e616 *entity3.EuroHis) int { /** 2.亚赔是主降还是主升 主降为true */ -func AsiaMainDown(his *entity3.AsiaHis) bool { - slb_sum := his.SLetBall - elb_sum := his.ELetBall - - if elb_sum > slb_sum { - return true - } else if elb_sum < slb_sum { - return false +func AsiaMainDown(ahis *entity3.AsiaHis) bool { + slb := ahis.SLetBall + elb := ahis.ELetBall + if elb > 0 { + if elb > slb { + return true + } else if elb < slb { + return false + } else { + //初始让球和即时让球一致 + if ahis.Ep3-ahis.Sp3 > 0 { + return false + } else { + return true + } + } } else { - //初始让球和即时让球一致 - if his.Ep3 < his.Sp3 { + if elb < slb { + return false + } else if elb > slb { return true + } else { + //初始让球和即时让球一致 + if ahis.Ep0-ahis.Sp0 > 0 { + return true + } else { + return false + } } } return false diff --git a/foot-core/module/wechat/service/SuggestMonthService.go b/foot-core/module/wechat/service/SuggestMonthService.go index 7c2c835..5d6b950 100644 --- a/foot-core/module/wechat/service/SuggestMonthService.go +++ b/foot-core/module/wechat/service/SuggestMonthService.go @@ -59,7 +59,7 @@ func (this *SuggestMonthService) ModifyMonth(wcClient *core.Client) { param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05") param.IsDesc = true //今日推荐 - param.AlFlag = getAlFlag() + param.AlFlag = getStatAlFlag() tempList := this.SuggestService.Query(param) //更新推送 first := material.Article{} diff --git a/foot-core/module/wechat/service/SuggestTodayService.go b/foot-core/module/wechat/service/SuggestTodayService.go index 3f95d00..523072d 100644 --- a/foot-core/module/wechat/service/SuggestTodayService.go +++ b/foot-core/module/wechat/service/SuggestTodayService.go @@ -86,6 +86,11 @@ func getAlFlag() string { return al_flag; } +func getStatAlFlag() string { + al_flag := utils.GetVal("wechat", "stat_al_flag") + return al_flag; +} + func getMainAlFlag() string { al_flag := utils.GetVal("wechat", "main_al_flag") return al_flag; diff --git a/foot-core/module/wechat/service/SuggestWeekService.go b/foot-core/module/wechat/service/SuggestWeekService.go index 4d680e4..5d48de4 100644 --- a/foot-core/module/wechat/service/SuggestWeekService.go +++ b/foot-core/module/wechat/service/SuggestWeekService.go @@ -59,7 +59,7 @@ func (this *SuggestWeekService) ModifyWeek(wcClient *core.Client) { param.BeginDateStr = beginDate.Format("2006-01-02 15:04:05") param.IsDesc = true //今日推荐 - param.AlFlag = getAlFlag() + param.AlFlag = getStatAlFlag() tempList := this.SuggestService.Query(param) //更新推送 first := material.Article{} -- GitLab