Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
f7a70e9847
1 changed files with 2 additions and 7 deletions
  1. +2
    -7
      app/task/svc/svc_tik_tok_chanxuan.go

+ 2
- 7
app/task/svc/svc_tik_tok_chanxuan.go View File

@@ -10,7 +10,6 @@ import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/chanxuanTikTok" "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/chanxuanTikTok"
"fmt" "fmt"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"strings"
"time" "time"
) )


@@ -25,11 +24,7 @@ func TikTokChanxuan(ordType int) {
} }
// 所有时间都是在操作秒数 // 所有时间都是在操作秒数
now := time.Now().Unix() now := time.Now().Unix()
strs := strings.Split(latest.V, ":")
timeStr := latest.V timeStr := latest.V
if len(strs) == 3 {
timeStr = strs[0] + ":" + strs[1] + ":00"
}
fmt.Println(timeStr) fmt.Println(timeStr)
past := utils.TimeParseStd(timeStr).Unix() past := utils.TimeParseStd(timeStr).Unix()
// 如果上次记录超过30天或者 过去时间大于当前时间戳, 把时间设置为此前20分钟 // 如果上次记录超过30天或者 过去时间大于当前时间戳, 把时间设置为此前20分钟
@@ -50,7 +45,7 @@ func TikTokChanxuan(ordType int) {
leave = 0 leave = 0
} }
past = past + leave past = past + leave
beginTime = past - 300
beginTime = past - 20*60
endTime = past endTime = past


if endTime > now { if endTime > now {
@@ -78,7 +73,7 @@ func TikTokChanxuan(ordType int) {
pageNo = 1 pageNo = 1
offical.DbsSysCfgUpdate(pvdTimeKey, utils.TimeToStr(endTime)) offical.DbsSysCfgUpdate(pvdTimeKey, utils.TimeToStr(endTime))
beginTime = endTime beginTime = endTime
endTime = endTime + 300
endTime = endTime + 20*60
if endTime > now { if endTime > now {
endTime = now endTime = now
} }


Loading…
Cancel
Save