This commit is contained in:
richboo111
2023-02-14 14:33:56 +08:00
parent 7d058c82f4
commit b4111c7270
2 changed files with 5 additions and 1 deletions

View File

@@ -1616,6 +1616,7 @@ func DeleteStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
if err = dao.GetEntity(db, storeMap, model.FieldStoreID, model.FieldVendorID, model.FieldDeletedAt); err == nil {
if handler := partner.GetPurchasePlatformFromVendorID(vendorID); handler != nil {
handler.UpdateStoreCustomID(ctx, storeMap.VendorOrgCode, storeMap.VendorStoreID, utils.Str2Int64WithDefault(storeMap.VendorStoreID, 0))
globals.SugarLogger.Debugf("DeleteStoreVendorMap storeMap.VendorStoreID ====%d", storeMap.VendorStoreID)
}
storeMap.FakeOpenStart = 0
storeMap.FakeOpenStop = 0

View File

@@ -2,6 +2,8 @@ package ebai
import (
"fmt"
"strings"
"git.rosy.net.cn/baseapi/platformapi/autonavi"
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
"git.rosy.net.cn/baseapi/utils"
@@ -15,7 +17,6 @@ import (
"git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"strings"
)
type tEbaiSupplierInfo struct {
@@ -342,6 +343,7 @@ func (p *PurchaseHandler) RefreshAllStoresID(ctx *jxcontext.Context, parentTask
}
if globals.EnableEbaiStoreWrite {
err = api.EbaiAPI.ShopIDBatchUpdate(baiduShopIDs, shopIDs)
globals.SugarLogger.Debugf("RefreshAllStoresID baiduShopIDs====%s,shopIDs====%s", baiduShopIDs, shopIDs)
}
return nil, err
}, stores)
@@ -644,6 +646,7 @@ func (c *PurchaseHandler) GetAllStoresVendorID(ctx *jxcontext.Context, vendorOrg
func (c *PurchaseHandler) UpdateStoreCustomID(ctx *jxcontext.Context, vendorOrgCode string, vendorStoreID string, storeID int64) (err error) {
if globals.EnableJdStoreWrite {
err = api.EbaiAPI.ShopIDBatchUpdate([]string{vendorStoreID}, []string{utils.Int64ToStr(storeID)})
globals.SugarLogger.Debugf("UpdateStoreCustomID vendorStoreID====%s storeID====%d", vendorStoreID, storeID)
}
return err
}