1
This commit is contained in:
@@ -246,8 +246,10 @@ func (a *API) RetailList(poiCode string, offset, limit int) (foodList []*AppFood
|
|||||||
|
|
||||||
func (a *API) RetailListAll(poiCode string, offset int) (foodList []*AppFood, err error) {
|
func (a *API) RetailListAll(poiCode string, offset int) (foodList []*AppFood, err error) {
|
||||||
data := make([]*AppFood, 0, 0)
|
data := make([]*AppFood, 0, 0)
|
||||||
offset = offset * 200
|
offset = offset * 100
|
||||||
batchList, err2 := a.RetailList(poiCode, offset, GeneralMaxLimit)
|
batchList, err2 := a.RetailList(poiCode, offset, 100) // GeneralMaxLimit
|
||||||
|
globals.SugarLogger.Debugf("==========batchList %d", len(batchList))
|
||||||
|
globals.SugarLogger.Debugf("==========batchList %s", utils.Format4Output(err2, false))
|
||||||
if err = err2; err == nil {
|
if err = err2; err == nil {
|
||||||
data = append(data, batchList...)
|
data = append(data, batchList...)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ func TestRetailCatDelete(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRetailList(t *testing.T) {
|
func TestRetailList(t *testing.T) {
|
||||||
result, err := api.RetailList("18900165"+
|
result, err := api.RetailList("18900165", 2100, 100)
|
||||||
"", 0, 20)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user