1
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
|
||||
"io"
|
||||
"math"
|
||||
"mime/multipart"
|
||||
@@ -6611,3 +6612,20 @@ func UpdateMtCatToJd(ctx *jxcontext.Context, mtCatID, jdCatID string) (err error
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func SyncTiktokMainIdToLocal(ctx *jxcontext.Context, param *tiktok_store.MainSku) error {
|
||||
codes, err := dao.GetVendorOrgCode(dao.GetDB(), model.VendorIDDD, "", "platform")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, code := range codes {
|
||||
result, err := tiktok_store.QueryAllMainSkuList(code.VendorOrgCode, param)
|
||||
globals.SugarLogger.Debugf("=====%s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
return OnCreateThing2Tiktok(ctx, dao.GetDB(), code.VendorOrgCode, result, model.ThingTypeSku, model.SyncFlagNewMask, false)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user