diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 1e3ffddc3..854c3ecbd 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1484,7 +1484,7 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend userName := ctx.GetUserName() storeMap.StoreID = storeID storeMap.VendorID = vendorID - globals.SugarLogger.Debugf("vendorID1111111111111111===============", vendorID) + globals.SugarLogger.Debugf("vendorID1111111111111111===============%d", vendorID) storeMap.VendorOrgCode = vendorOrgCode storeMap.Status = model.StoreStatusOpened storeMap.DeliveryType = model.StoreDeliveryTypeByStore @@ -1520,6 +1520,13 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend if storeDetail != nil { return nil, fmt.Errorf("此平台门店ID已在京西有绑定,请先解除绑定,平台门店ID :[%v]", storeMap.VendorStoreID) } + if vendorID == model.VendorIDDD { //抖店绑定店铺时 检查并补充创建 + globals.SugarLogger.Debugf("vendorID ==============%d", vendorID) + err2 := tiktok_store.CreateOrUpdateAll(vendorOrgCode, int64(storeMap.StoreID), utils.Str2Int64(storeMap.VendorStoreID)) + if err2 != nil { + return nil, err2 + } + } } else if vendorID == model.VendorIDJX { ReCalculateJxPriceLight(db, ctx, storeID) } else if vendorID == model.VendorIDYB { @@ -1546,12 +1553,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend err = ErrCanNotFindVendor } } - } else if vendorID == model.VendorIDDD { //抖店绑定店铺时 检查并补充创建 - globals.SugarLogger.Debugf("vendorID ==============%d", vendorID) - err2 := tiktok_store.CreateOrUpdateAll(vendorOrgCode, int64(storeMap.StoreID), utils.Str2Int64(storeMap.VendorStoreID)) - if err2 != nil { - return nil, err2 - } } storeMapList, err := dao.GetStoresMapList2(db, []int{vendorID}, []int{storeID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "", true)