This commit is contained in:
苏尹岚
2020-12-01 17:22:03 +08:00
parent 43186f5b12
commit 303a638aca
14 changed files with 41 additions and 37 deletions

View File

@@ -1279,7 +1279,7 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o
}
order.StoreID = storeList[0].ID
order.StoreName = storeList[0].Name
storeMaps, _ := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDJDShop}, []int{order.StoreID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "")
storeMaps, _ := dao.GetStoresMapList(dao.GetDB(), []int{model.VendorIDJDShop}, []int{order.StoreID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "")
if len(storeMaps) > 0 {
order.VendorStoreID = storeMaps[0].VendorStoreID
}
@@ -1410,7 +1410,7 @@ func MergeJdsOrders(ctx *jxcontext.Context, vendorOrderIDs []string) (vendorOrde
}
}
//重新构建order的数据
storeMaps, err := dao.GetStoresMapList(db, []int{model.VendorIDJDShop}, []int{storeID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "")
storeMaps, err := dao.GetStoresMapList(db, []int{model.VendorIDJDShop}, []int{storeID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "")
if err != nil || len(storeMaps) == 0 {
return "", fmt.Errorf("该门店未绑定京狗平台,请先绑定后再转移!门店:[%v]", storeID)
}
@@ -1538,7 +1538,7 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
}
}
//重新构建order的数据
storeMaps, err := dao.GetStoresMapList(db, []int{order.VendorID}, []int{storeID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "")
storeMaps, err := dao.GetStoresMapList(db, []int{order.VendorID}, []int{storeID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", order.VendorOrgCode)
if err != nil || len(storeMaps) == 0 {
return "", fmt.Errorf("该门店未绑定平台,请先绑定后再转移!门店:[%v]", storeID)
}

View File

@@ -1505,7 +1505,7 @@ func setFakeActualPayPrice(order *model.GoodsOrder) (newOrder *model.GoodsOrder)
func (s *DefScheduler) notifyNewOrder(order *model.GoodsOrder) {
if order.Flag&model.OrderFlagMaskFake == 0 && order.VendorID != model.VendorIDEBAI {
utils.CallFuncAsync(func() {
order = setFakeActualPayPrice(order)
// order = setFakeActualPayPrice(order)
netprinter.PrintOrderByOrder(jxcontext.AdminCtx, order)
//目前暂且认为AdjustCount > 0 就是调整单
if order.AdjustCount > 0 {
@@ -1523,7 +1523,7 @@ func (s *DefScheduler) notifyNewOrder(order *model.GoodsOrder) {
func (s *DefScheduler) notifyUserApplyCancel(order *model.GoodsOrder, cancelReason string) {
utils.CallFuncAsync(func() {
order = setFakeActualPayPrice(order)
// order = setFakeActualPayPrice(order)
weixinmsg.NotifyUserApplyCancel(order, cancelReason)
})
}
@@ -1531,7 +1531,7 @@ func (s *DefScheduler) notifyUserApplyCancel(order *model.GoodsOrder, cancelReas
func (s *DefScheduler) notifyOrderCanceled(order *model.GoodsOrder) {
if order.Flag&model.OrderFlagMaskFake == 0 {
utils.CallFuncAsync(func() {
order = setFakeActualPayPrice(order)
// order = setFakeActualPayPrice(order)
weixinmsg.NotifyOrderCanceled(order)
smsmsg.NotifyOrderCanceled(order)
push.NotifyOrderCanceled(order)