+ sync2.go
This commit is contained in:
30
business/jxstore/cms/sync2.go
Normal file
30
business/jxstore/cms/sync2.go
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
package cms
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SyncCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs []int, appOrgCodes []string, catIDs []int, isAsync bool) (hint string, err error) {
|
||||||
|
// if len(vendorIDs) == 0 {
|
||||||
|
// vendorIDs = partner.GetMultiStoreVendorIDs()
|
||||||
|
// }
|
||||||
|
// vendorOrgCodeList := apimanager.CurAPIManager.GetVendorOrgCodeList(vendorIDs, appOrgCodes)
|
||||||
|
// task := tasksch.NewParallelTask("同步商家分类", nil, ctx,
|
||||||
|
// func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
|
// vendorOrgCodePair := batchItemList[0].(*apimanager.VendorOrgCodePair)
|
||||||
|
// if handler := partner.GetPurchasePlatformFromVendorID(vendorOrgCodePair.VendorID); handler != nil {
|
||||||
|
// }
|
||||||
|
// return retVal, err
|
||||||
|
// }, vendorOrgCodeList)
|
||||||
|
// tasksch.HandleTask(task, parentTask, len(catIDs) > 0).Run()
|
||||||
|
// if isAsync {
|
||||||
|
// hint = task.GetID()
|
||||||
|
// } else {
|
||||||
|
// resultList, err2 := task.GetResult(0)
|
||||||
|
// if err = err2; err == nil {
|
||||||
|
// hint = utils.Int2Str(len(resultList))
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
return hint, err
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user