From 4b09a3378324159bdde45b8754f47e7dc03a2b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 20 Jul 2023 11:32:23 +0800 Subject: [PATCH] 1 --- business/jxcallback/orderman/order.go | 6 +++--- business/jxstore/cms/sync.go | 6 ++++-- business/partner/purchase/tao_vegetable/store_sku2.go | 10 +++++++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 8299d38c9..e9c290fbb 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -476,7 +476,7 @@ func FinisOrderWaybillFee(db *dao.DaoDB, order *model.GoodsOrder, bill *model.Wa return nil } // 查询所有运单 - bills, err := dao.GetWaybills(db, order.VendorOrderID, nil) + bills, err := dao.GetWaybills(db, order.VendorOrderID, []int64{model.VendorIDDada, model.VendorIDFengNiao, model.VendorIDMTPS, model.VendorIDUUPT, model.VendorIDSFPS}) if err != nil { return err } @@ -531,8 +531,8 @@ func ResetCreateWaybillFee(db *dao.DaoDB, order *model.GoodsOrder, bill *model.W if err := countWaybillSettleInfo(db, order, bill, store); err != nil { return err } - // 所有运单停止调度之后才开始退还余额 - bills, err := dao.GetWaybills(db, order.VendorOrderID, nil) + // 所有运单停止调度之后才开始退还余额(三方运单) + bills, err := dao.GetWaybills(db, order.VendorOrderID, []int64{model.VendorIDDada, model.VendorIDFengNiao, model.VendorIDMTPS, model.VendorIDUUPT, model.VendorIDSFPS}) if err != nil { return err } diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 7dab53ad6..8418b7b34 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -502,8 +502,10 @@ func (v *VendorSync) SyncStoresSkus2(ctx *jxcontext.Context, parentTask tasksch. if setSyncStatus != 0 { dao.SetStoreSkuSyncStatus(db, storeMap.VendorID, []int{storeMap.StoreID}, skuIDs, setSyncStatus) } - globals.SugarLogger.Debugf("定时任务同步:user[%s],storeId[%d]", ctx.GetUserName(), storeMap.StoreID) - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘宝同步商品", utils.Format4Output(storeMap.StoreID, false)) + if storeMap.VendorID == model.VendorIDTaoVegetable { + globals.SugarLogger.Debugf("定时任务同步:user[%s],storeId[%d]", ctx.GetUserName(), storeMap.StoreID) + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘宝同步商品", utils.Format4Output(storeMap.StoreID, false)) + } if _, err = SyncStoreSkuNew(ctx, task, causeFlag, storeMap.VendorID, storeMap.StoreID, storeMap.VendorStoreID, storeMap.VendorOrgCode, nil, skuIDs, excludeSkuIDs, false, isContinueWhenError); err != nil { globals.SugarLogger.Debugf("SyncStoresSkus2 failed2 store:%d failed with error:%v", storeMap.StoreID, err) } diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index aa1544ee9..f1b43934b 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -248,6 +248,7 @@ func UpdateTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync SuggestedPrice: price, // 优先使用skuPrice 靠后SalePrice CategoryCode: utils.String2Pointer(utils.Int2Str(v.CategoryID)), MerchantCatCode: utils.String2Pointer(v.VendorCatID), // 优先使用 靠后 category_code + SubTitle: utils.String2Pointer("一小时速达"), } if v.MinOrderCount <= model.YES { updateSku.PurchaseQuantity = utils.Int64ToPointer(model.YES) // 起购单位 @@ -310,7 +311,7 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku SaleSpec: utils.String2Pointer(fmt.Sprintf("%d %s*1%s", storeSku.Weight, "g", storeSku.Unit)), StepQuantity: utils.Int64ToPointer(model.YES), // 每次购买至少增加一个购买单位 OnlineSaleFlag: utils.Int64ToPointer(tao_vegetable.CreateOnlineSaleFlag), // 门店控制是否可见 - SubTitle: utils.String2Pointer("同城包邮"), + SubTitle: utils.String2Pointer("一小时速达"), SubTitle1: utils.String2Pointer("一小时速达"), //DeliveryUnit: utils.String2Pointer(storeSku.Unit), DeliveryUnit: utils.String2Pointer("份"), @@ -551,6 +552,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr OuCode: utils.String2Pointer(vendorStoreID), SkuCode: utils.String2Pointer(utils.Int2Str(v.SkuID)), OnlineSaleFlag: utils.Int64ToPointer(onlineStatus), + SubTitle: utils.String2Pointer("一小时速达"), } updateSkuList = append(updateSkuList, updateSku) @@ -592,6 +594,7 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg CleanSkuMemberPrice: utils.Int64ToPointer(model.YES), SuggestedPrice: price, MemberPrice: price, + SubTitle: utils.String2Pointer("一小时速达"), } updateSkuList = append(updateSkuList, updateSku) @@ -898,8 +901,9 @@ func (p *PurchaseHandler) UpdateStoreSkusSpecTag(ctx *jxcontext.Context, vendorO api := getAPI(getStoreVendorOrgCode(storeID), storeID, vendorStoreID) for _, v := range storeSkuList { updateSku := domain585.AlibabaWdkSkuUpdateSkuDo{ - OuCode: utils.String2Pointer(vendorStoreID), - SkuCode: utils.String2Pointer(utils.Int2Str(v.SkuID)), + OuCode: utils.String2Pointer(vendorStoreID), + SkuCode: utils.String2Pointer(utils.Int2Str(v.SkuID)), + SubTitle: utils.String2Pointer("一小时速达"), } if v.IsSpecialty <= model.YES { updateSku.PurchaseQuantity = utils.Int64ToPointer(model.YES)