From ffdee9a1e2395ec33e120c982861577faaa2ed98 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 3 May 2024 23:30:32 +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_cinema5bms_order.go | 22 +++++----------------- go.mod | 1 - 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/app/task/svc/svc_cinema5bms_order.go b/app/task/svc/svc_cinema5bms_order.go index dfda5c9..55f5562 100644 --- a/app/task/svc/svc_cinema5bms_order.go +++ b/app/task/svc/svc_cinema5bms_order.go @@ -18,9 +18,9 @@ func Cinema5bmsOrder() { cinema5bmsAppsecret := offical.SysCfgByKeyStr("cinema5bms_appSecret") uid := "0" // 获取上次获取订单时候的时间戳 - pvdTimeKey := "cinema5bms_order_time" + now := time.Now().Unix() - past := GetRunTime(uid, pvdTimeKey, "短剧获取订单时间") + past := time.Now().Unix() var ( beginTime int64 = 0 endTime int64 = 0 @@ -53,28 +53,16 @@ func Cinema5bmsOrder() { count := GetNewVideoOrder(uid, cinema5bmsAppsecret, arg) if count == 0 { - goto ChkArg + break } if count == pageSize { pageNo++ continue } - ChkArg: - // 查询完后重置时间, 最后查询时间 - if endTime < now { - pageNo = 1 - SetRunTime(uid, pvdTimeKey, utils.TimeToStr(endTime)) - beginTime = endTime - endTime = endTime + eveTime - if endTime > now { - endTime = now - } - continue - } - break + } // 更新最后供应商执行订单时间 - SetRunTime(uid, pvdTimeKey, utils.TimeToStr(now)) + //SetRunTime(uid, pvdTimeKey, utils.TimeToStr(now)) } func Cinema5bmsOrderDate() { cinema5bmsAppid := offical.SysCfgByKeyStr("cinema5bms_appid") diff --git a/go.mod b/go.mod index b5a802b..df88f43 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,6 @@ require ( github.com/gomodule/redigo v2.0.0+incompatible github.com/jinzhu/copier v0.3.5 github.com/makiuchi-d/gozxing v0.1.1 - github.com/mcuadros/go-defaults v1.2.0 github.com/olivere/elastic/v7 v7.0.32 github.com/qiniu/api.v7/v7 v7.8.2 github.com/robfig/cron/v3 v3.0.1