This commit is contained in:
邹宗楠
2022-10-27 14:13:26 +08:00
parent b07f9963cb
commit 82d3eb2289
16 changed files with 507 additions and 372 deletions

View File

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