This commit is contained in:
邹宗楠
2022-11-04 09:10:21 +08:00
parent 43938b7a4e
commit 09ce608f62
4 changed files with 30 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"math"
"math/rand"
"time"
"git.rosy.net.cn/jx-callback/business/model/dao"
@@ -80,8 +81,12 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, ven
// 上面是真的转自送,支持美团,饿百,京东,如果时抖店,抖店暂时全部是自送的!但是有骑手信息时,就是一个白嫖单子!
if order.VendorID == model.VendorIDDD && courierName != "" && courierMobile != "" {
timeNow := time.Now()
var randData = []int64{1, 2, 3, 4, 5}
randTime := time.Duration(randData[0]) * time.Minute
rand.Seed(timeNow.Unix())
randNumber := rand.Int63n(481)
if randNumber < 60 {
randNumber += 60
}
randTime := time.Duration(randNumber) * time.Second
bill := &model.Waybill{
VendorWaybillID: order.VendorOrderID,
VendorWaybillID2: "",