This commit is contained in:
邹宗楠
2023-07-20 11:32:23 +08:00
parent b54ce24365
commit 4b09a33783
3 changed files with 14 additions and 8 deletions

View File

@@ -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
}

View File

@@ -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)
}

View File

@@ -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)