From f7a70e984766d87aa63eb18d048a55d62268a054 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 24 Oct 2024 16:01:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/task/svc/svc_tik_tok_chanxuan.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/task/svc/svc_tik_tok_chanxuan.go b/app/task/svc/svc_tik_tok_chanxuan.go index 0bf56fb..68d7268 100644 --- a/app/task/svc/svc_tik_tok_chanxuan.go +++ b/app/task/svc/svc_tik_tok_chanxuan.go @@ -10,7 +10,6 @@ import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/chanxuanTikTok" "fmt" "github.com/tidwall/gjson" - "strings" "time" ) @@ -25,11 +24,7 @@ func TikTokChanxuan(ordType int) { } // 所有时间都是在操作秒数 now := time.Now().Unix() - strs := strings.Split(latest.V, ":") timeStr := latest.V - if len(strs) == 3 { - timeStr = strs[0] + ":" + strs[1] + ":00" - } fmt.Println(timeStr) past := utils.TimeParseStd(timeStr).Unix() // 如果上次记录超过30天或者 过去时间大于当前时间戳, 把时间设置为此前20分钟 @@ -50,7 +45,7 @@ func TikTokChanxuan(ordType int) { leave = 0 } past = past + leave - beginTime = past - 300 + beginTime = past - 20*60 endTime = past if endTime > now { @@ -78,7 +73,7 @@ func TikTokChanxuan(ordType int) { pageNo = 1 offical.DbsSysCfgUpdate(pvdTimeKey, utils.TimeToStr(endTime)) beginTime = endTime - endTime = endTime + 300 + endTime = endTime + 20*60 if endTime > now { endTime = now }