1
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user