aa
This commit is contained in:
@@ -4,7 +4,9 @@ import (
|
||||
"crypto/md5"
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/business/authz/autils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg"
|
||||
"git.rosy.net.cn/jx-callback/globals/api2"
|
||||
beego "github.com/astaxie/beego/server/web"
|
||||
"math"
|
||||
"strings"
|
||||
@@ -1916,8 +1918,14 @@ func SaveJdsOrders(ctx *jxcontext.Context, orderCreatedStart, orderCreatedEnd ti
|
||||
partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order))
|
||||
globals.SugarLogger.Debugf("SaveJdsOrders, order: [%v]", utils.Format4Output(order, false))
|
||||
noticeMsg := fmt.Sprintf("京东商城新订单,订单号:[%v] ,将要发到的门店id:[%v] , 门店名:[%v]", order.VendorOrderID, order.StoreID, order.StoreName)
|
||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "BF09DB25350611EB89AC525400E86DC0", "京东商城来新订单了!", noticeMsg)
|
||||
// ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "1439B3E07D3911EA881A525400E86DC0", "京东商城来新订单了!", noticeMsg)
|
||||
if order.OrderType == model.OrderTypeAddressErr {
|
||||
noticeMsg += " 此订单地址有问题,需要矫正坐标!"
|
||||
}
|
||||
var role = autils.NewRole("jdshop", 0)
|
||||
userIDList, _ := api2.RoleMan.GetRoleUserList(role)
|
||||
for _, v := range userIDList {
|
||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, v, "京东商城来新订单了!", noticeMsg)
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -1929,7 +1937,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
|
||||
continue
|
||||
}
|
||||
//有可能是库里已经有这个订单了
|
||||
orderE, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(jdsOrder.OrderID)+"000001", model.VendorIDJDShop)
|
||||
orderE, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(jdsOrder.OrderID)+"00000001", model.VendorIDJDShop)
|
||||
if orderE != nil {
|
||||
continue
|
||||
}
|
||||
@@ -1941,7 +1949,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
|
||||
}
|
||||
order := &model.GoodsOrder{
|
||||
VendorOrderID2: utils.Int64ToStr(jdsOrder.OrderID),
|
||||
VendorOrderID: utils.Int64ToStr(jdsOrder.OrderID) + "000001",
|
||||
VendorOrderID: utils.Int64ToStr(jdsOrder.OrderID) + "00000001",
|
||||
VendorID: model.VendorIDJDShop,
|
||||
BaseFreightMoney: jxutils.StandardPrice2Int(jdsOrder.Freight),
|
||||
VendorStatus: utils.Int2Str(jdsOrder.OrderStatus),
|
||||
|
||||
@@ -218,7 +218,7 @@ func Init() {
|
||||
ScheduleTimerFuncByInterval(func() {
|
||||
curDate := utils.Time2Date(time.Now())
|
||||
orderman.FixedOrderManager.AmendMissingOrders(jxcontext.AdminCtx, []int{model.VendorIDJD, model.VendorIDMTWM, model.VendorIDEBAI}, 0, curDate, curDate, true, true)
|
||||
|
||||
orderman.SaveJdsOrders(jxcontext.AdminCtx, curDate.Add(-10*time.Minute), curDate)
|
||||
}, 5*time.Second, 10*time.Minute)
|
||||
|
||||
ScheduleTimerFunc("auto enable remote store", func() {
|
||||
|
||||
Reference in New Issue
Block a user