This commit is contained in:
suyl
2021-05-14 13:55:33 +08:00
parent b00a60966b
commit 4741634fdf
2 changed files with 21 additions and 28 deletions

View File

@@ -2,7 +2,6 @@ package misc
import (
"fmt"
"strings"
"sync"
"time"
@@ -166,9 +165,6 @@ func Init() {
ScheduleTimerFunc("doDailyWork", doDailyWork, dailyWorkTimeList)
ScheduleTimerFunc("doDailyWork2", doDailyWork2, dailyWorkTimeList2)
// ScheduleTimerFuncByInterval(func() {
// orderman.SaveJdsOrders(jxcontext.AdminCtx, time.Now().Add(-20*time.Minute), time.Now())
// }, 10*time.Second, 10*time.Minute)
//京东的订单信息解密密钥获取
ScheduleTimerFuncByInterval(func() {
@@ -532,11 +528,11 @@ func RefreshRealMobile(ctx *jxcontext.Context, vendorID int, fromTime, toTime ti
order := batchItemList[0].(*model.GoodsOrder)
mobile, err2 := handler.GetOrderRealMobile(ctx, order)
if err = err2; err == nil {
mobile = jxutils.FormalizeMobile(mobile)
if jxutils.IsStringLikeMobile(mobile) && strings.Index(order.ConsigneeMobile, mobile) == -1 {
order.ConsigneeMobile2 = mobile
_, err = dao.UpdateEntity(db, order, "ConsigneeMobile2")
}
//mobile = jxutils.FormalizeMobile(mobile)
//if jxutils.IsStringLikeMobile(mobile) && strings.Index(order.ConsigneeMobile, mobile) == -1 {
order.ConsigneeMobile2 = mobile
_, err = dao.UpdateEntity(db, order, "ConsigneeMobile2")
//}
} else {
globals.SugarLogger.Infof("RefreshRealMobile orderID:%s failed with error:%v", order.VendorOrderID, err)
}