Browse Source

更新

master
huangjiajun 7 months ago
parent
commit
ffdee9a1e2
2 changed files with 5 additions and 18 deletions
  1. +5
    -17
      app/task/svc/svc_cinema5bms_order.go
  2. +0
    -1
      go.mod

+ 5
- 17
app/task/svc/svc_cinema5bms_order.go View File

@@ -18,9 +18,9 @@ func Cinema5bmsOrder() {
cinema5bmsAppsecret := offical.SysCfgByKeyStr("cinema5bms_appSecret") cinema5bmsAppsecret := offical.SysCfgByKeyStr("cinema5bms_appSecret")
uid := "0" uid := "0"
// 获取上次获取订单时候的时间戳 // 获取上次获取订单时候的时间戳
pvdTimeKey := "cinema5bms_order_time"
now := time.Now().Unix() now := time.Now().Unix()
past := GetRunTime(uid, pvdTimeKey, "短剧获取订单时间")
past := time.Now().Unix()
var ( var (
beginTime int64 = 0 beginTime int64 = 0
endTime int64 = 0 endTime int64 = 0
@@ -53,28 +53,16 @@ func Cinema5bmsOrder() {


count := GetNewVideoOrder(uid, cinema5bmsAppsecret, arg) count := GetNewVideoOrder(uid, cinema5bmsAppsecret, arg)
if count == 0 { if count == 0 {
goto ChkArg
break
} }
if count == pageSize { if count == pageSize {
pageNo++ pageNo++
continue 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() { func Cinema5bmsOrderDate() {
cinema5bmsAppid := offical.SysCfgByKeyStr("cinema5bms_appid") cinema5bmsAppid := offical.SysCfgByKeyStr("cinema5bms_appid")


+ 0
- 1
go.mod View File

@@ -21,7 +21,6 @@ require (
github.com/gomodule/redigo v2.0.0+incompatible github.com/gomodule/redigo v2.0.0+incompatible
github.com/jinzhu/copier v0.3.5 github.com/jinzhu/copier v0.3.5
github.com/makiuchi-d/gozxing v0.1.1 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/olivere/elastic/v7 v7.0.32
github.com/qiniu/api.v7/v7 v7.8.2 github.com/qiniu/api.v7/v7 v7.8.2
github.com/robfig/cron/v3 v3.0.1 github.com/robfig/cron/v3 v3.0.1


Loading…
Cancel
Save