From c3ab505203594074a326c802c13e6a18fd5e1a2c Mon Sep 17 00:00:00 2001 From: monomania Date: Mon, 16 Mar 2020 00:50:31 +0800 Subject: [PATCH] 1.xxx --- conf/app_prod.ini | 2 +- foot-core/module/match/service/MatchHisService.go | 8 +++----- foot-spider/launch/FS101PortalApplication.go | 10 ++++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/conf/app_prod.ini b/conf/app_prod.ini index 1eb255a..d0eb01e 100644 --- a/conf/app_prod.ini +++ b/conf/app_prod.ini @@ -25,7 +25,7 @@ asia_comp_id= ##是否去爬取联赛信息 league_switch=false #配置要抓取的历史数据的赛季年份,使用,间隔 -history_season=2018,2019 +history_season=2015,2016,2017,2018,2019 [analy] ###确认命中次数 hit_count=3 diff --git a/foot-core/module/match/service/MatchHisService.go b/foot-core/module/match/service/MatchHisService.go index 87192c6..d0ac29b 100644 --- a/foot-core/module/match/service/MatchHisService.go +++ b/foot-core/module/match/service/MatchHisService.go @@ -42,12 +42,10 @@ func (this *MatchHisService) FindBySeason(season string) []*pojo.MatchLast { SELECT la.* FROM - foot.t_match_his la, - foot.t_league l -WHERE la.LeagueId = l.Id - AND 1=1 + foot.t_match_his la +WHERE 1=1 ` - sql_build = sql_build + " AND la.MatchDate > '" + season + "-00-01 :00:00:00'" + sql_build = sql_build + " AND la.MatchDate => '" + season + "-01-01 00:00:00' AND la.MatchDate <= '" + season + "-12-31 23:59:59'" //结果值 dataList := make([]*pojo.MatchLast, 0) diff --git a/foot-spider/launch/FS101PortalApplication.go b/foot-spider/launch/FS101PortalApplication.go index 22de3d4..ae62341 100644 --- a/foot-spider/launch/FS101PortalApplication.go +++ b/foot-spider/launch/FS101PortalApplication.go @@ -3,6 +3,7 @@ package launch import ( "strconv" "strings" + "tesou.io/platform/foot-parent/foot-core/common/base/service/mysql" "tesou.io/platform/foot-parent/foot-core/common/utils" "tesou.io/platform/foot-parent/foot-core/module/spider/constants" "time" @@ -74,16 +75,17 @@ func Spider_History() { } for _, v := range seasons { + mysql.ShowSQL(true) Spider_match_his(v) + Spider_euroLast_his(v) + time.Sleep(28 * time.Minute) + Spider_euroHis_his(v) time.Sleep(28 * time.Minute) Spider_baseFace_his(v) time.Sleep(28 * time.Minute) Spider_asiaLastNew_his(v) time.Sleep(28 * time.Minute) - Spider_euroLast_his(v) - time.Sleep(58 * time.Minute) - Spider_euroHis_his(v) - time.Sleep(108 * time.Minute) + mysql.ShowSQL(false) } } -- GitLab