- CopyStoreSkus
This commit is contained in:
@@ -180,8 +180,8 @@ func (p *PurchaseHandler) syncOneStoreSkus(db *dao.DaoDB, storeID int, skuIDs []
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) SyncStoreCategories(db *dao.DaoDB, storeIDs []int, userName string) (err error) {
|
||||
globals.SugarLogger.Debugf("SyncStoreCategories storeIDs:%d, userName:%s", storeIDs, userName)
|
||||
func (p *PurchaseHandler) SyncStoresCategories(db *dao.DaoDB, storeIDs []int, userName string) (err error) {
|
||||
globals.SugarLogger.Debugf("SyncStoresCategories storeIDs:%d, userName:%s", storeIDs, userName)
|
||||
|
||||
for _, storeID := range storeIDs {
|
||||
if err = p.SyncOneStoreCategories(db, storeID, userName); err != nil {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
)
|
||||
|
||||
func TestSyncStoreSkus(t *testing.T) {
|
||||
func TestSyncStoresSkus(t *testing.T) {
|
||||
db := dao.GetDB()
|
||||
err := new(PurchaseHandler).SyncStoresSkus(db, []int{100077}, []int{7}, false, "autotest")
|
||||
if err != nil {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
)
|
||||
|
||||
func (p *PurchaseHandler) SyncStoreCategories(db *dao.DaoDB, storeIDs []int, userName string) (err error) {
|
||||
func (p *PurchaseHandler) SyncStoresCategories(db *dao.DaoDB, storeIDs []int, userName string) (err error) {
|
||||
return nil
|
||||
}
|
||||
func (p *PurchaseHandler) ReadStoreCategories(storeID int) (cats []*model.SkuCategory, err error) {
|
||||
|
||||
@@ -27,7 +27,7 @@ func (p *PurchaseHandler) SyncStoresSkus(db *dao.DaoDB, storeIDs []int, skuIDs [
|
||||
if len(skuIDs) < MaxSkuBatchSize {
|
||||
parallelCount = 10
|
||||
}
|
||||
task := tasksch.RunManagedTask("SyncStoreSkus", false, nil, parallelCount, 1, userName, func(batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
task := tasksch.RunManagedTask("SyncStoresSkus", false, nil, parallelCount, 1, userName, func(batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
storeID := batchItemList[0].(int)
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
|
||||
Reference in New Issue
Block a user