Bladeren bron

更新

master
huangjiajun 7 maanden geleden
bovenliggende
commit
ffdee9a1e2
2 gewijzigde bestanden met toevoegingen van 5 en 18 verwijderingen
  1. +5
    -17
      app/task/svc/svc_cinema5bms_order.go
  2. +0
    -1
      go.mod

+ 5
- 17
app/task/svc/svc_cinema5bms_order.go Bestand weergeven

@@ -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")


+ 0
- 1
go.mod Bestand weergeven

@@ -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


Laden…
Annuleren
Opslaan