1
This commit is contained in:
@@ -53,6 +53,9 @@ func GetOrderRiderInfoToPlatform(orderId string, wayBillStatus int) {
|
||||
//3.当同一个订单已经上传了一次配送信息,如再次同步会更新配送信息,以最新的一次为准。
|
||||
//4.如订单已完成、已取消等状态发货将失败。
|
||||
for _, v := range orders {
|
||||
if orderId == "" && v.VendorID == model.VendorIDDD { // 抖音门店订单除了三方配送回调时推送,不在主动推送配送消息
|
||||
continue
|
||||
}
|
||||
if orderId == "" { // 订单id为空是,是定时轮询操作,不做此状态
|
||||
waybillList, _ := dao.GetWaybills(dao.GetDB(), v.VendorOrderID)
|
||||
if len(waybillList) > 0 && waybillList[0].Status > model.WaybillStatusEndBegin {
|
||||
@@ -190,11 +193,7 @@ func UpdateOrder2Complete() {
|
||||
|
||||
// UpdateFakeWayBillToTiktok 轮询更新假订单到抖音
|
||||
func UpdateFakeWayBillToTiktok() {
|
||||
randPullTime, _ := rand.Int(rand.Reader, big.NewInt(640))
|
||||
randPull := randPullTime.Int64()
|
||||
if randPull <= 100 {
|
||||
return
|
||||
}
|
||||
|
||||
fakeWayBill, err := dao.GetWayBillFakeOrder()
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("Get Fake Order Err : %s", err.Error())
|
||||
@@ -206,6 +205,7 @@ func UpdateFakeWayBillToTiktok() {
|
||||
|
||||
for i := 0; i < len(fakeWayBill); i++ {
|
||||
// 判断当前订单是否可以推送,UpdatedAt > 当前时间 就跳过
|
||||
globals.SugarLogger.Debugf("updateTiem ==== %s,i=[%d],timeNow[%s]", fakeWayBill[i].ModelTimeInfo.UpdatedAt, i, time.Now())
|
||||
if fakeWayBill[i].ModelTimeInfo.UpdatedAt.After(time.Now()) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user