This commit is contained in:
邹宗楠
2024-03-27 13:55:11 +08:00
parent 191acdd13e
commit ef3d065f75
11 changed files with 58 additions and 31 deletions

View File

@@ -231,19 +231,39 @@ func TestBatchSetPrice(t *testing.T) {
fmt.Println(err)
}
func TestRetailDelete(t *testing.T) {
poiCode := "19696163"
foodList, err1 := api.RetailListAll(poiCode, 0)
if err1 != nil {
globals.SugarLogger.Debugf("====err1 := %v", err1)
return
}
globals.SugarLogger.Debugf("foods :%s", utils.Format4Output(foodList, false))
return
poiCode := "20802261"
//err := api.RetailDelete(utils.GetUUID(), testPoiCode, "32427")
//if err != nil {
// t.Fatal(err)
//}
i := 0
for {
// 同步商品
fromFoodList, err1 := api.RetailListAll(poiCode, i)
if len(fromFoodList) == 0 || fromFoodList == nil {
fmt.Println(fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i))
return
}
stockList := make([]*BareStoreFoodInfo, 0, 100)
for _, fl := range fromFoodList {
stockList = append(stockList, &BareStoreFoodInfo{
AppFoodCode: fl.AppFoodCode,
Skus: []*BareStoreSkuInfo{
&BareStoreSkuInfo{
SkuID: fl.AppFoodCode,
Stock: "999999",
},
},
})
}
i++
result, err := api.RetailSkuStock(utils.GetUUID(), testPoiCode, stockList)
globals.SugarLogger.Debugf("===result :-%s", utils.Format4Output(result, false))
globals.SugarLogger.Debugf("===result :-%v", err)
}
}
func TestMap(t *testing.T) {
fmt.Println(16&4 != 0)
}
func TestRetailDat(t *testing.T) {