This commit is contained in:
邹宗楠
2024-01-29 22:55:26 +08:00
parent 646669a26f
commit e55c348505
2 changed files with 2 additions and 17 deletions

View File

@@ -125,6 +125,7 @@ type AppFood struct {
SecondaryCategoryCode string `json:"secondary_category_code"` SecondaryCategoryCode string `json:"secondary_category_code"`
SecondaryCategoryName string `json:"secondary_category_name"` SecondaryCategoryName string `json:"secondary_category_name"`
Sequence int `json:"sequence"` Sequence int `json:"sequence"`
UpcCode string `json:"upc_code"`
Skus string `json:"skus"` Skus string `json:"skus"`
SkuList []*SkuInfo `json:"skuList"` SkuList []*SkuInfo `json:"skuList"`
TagID int `json:"tag_id"` TagID int `json:"tag_id"`

View File

@@ -8,7 +8,6 @@ import (
"math" "math"
"strings" "strings"
"testing" "testing"
"time"
) )
// 测试添加分类 // 测试添加分类
@@ -167,29 +166,14 @@ func TestBatchSetPrice(t *testing.T) {
fmt.Println(err) fmt.Println(err)
} }
func TestRetailDelete(t *testing.T) { func TestRetailDelete(t *testing.T) {
poiCode := "19907139" poiCode := "19696163"
for { for {
cat, _ := api.RetailCatList(poiCode)
for _, v := range cat {
api.RetailCatDelete(poiCode, "", v.Name, 1)
}
foodList, err1 := api.RetailListAll(poiCode, 0) foodList, err1 := api.RetailListAll(poiCode, 0)
if err1 != nil { if err1 != nil {
globals.SugarLogger.Debugf("====err1 := %v", err1) globals.SugarLogger.Debugf("====err1 := %v", err1)
return return
} }
i := 0
for _, v := range foodList {
err2 := api.RetailDelete("test_LiuLei", poiCode, v.AppFoodCode)
if err2 != nil {
globals.SugarLogger.Debugf("====err2 := %v", err1)
}
if i%40 == 0 {
time.Sleep(200 * time.Millisecond)
}
i++
}
return return
} }