This commit is contained in:
邹宗楠
2023-09-22 17:53:34 +08:00
parent 8bb0c546c3
commit 27924729e4

View File

@@ -1,12 +1,10 @@
package mtwmapi
import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"regexp"
"strings"
"time"
"git.rosy.net.cn/baseapi/utils"
)
const (
@@ -188,8 +186,7 @@ func (a *API) RetailCatUpdate(poiCode, catName string, updateParams *Param4Updat
params := utils.Struct2MapByJson(updateParams)
params[KeyAppPoiCode] = poiCode
params["category_name"] = catName
time.Sleep(200 * time.Millisecond)
globals.SugarLogger.Debugf("RetailCatUpdate updateParams %s", utils.Format4Output(updateParams, false))
_, err = a.AccessAPI("retailCat/update", false, params)
return err
@@ -246,8 +243,8 @@ func (a *API) RetailList(poiCode string, offset, limit int) (foodList []*AppFood
func (a *API) RetailListAll(poiCode string, offset int) (foodList []*AppFood, err error) {
data := make([]*AppFood, 0, 0)
offset = offset * 100
batchList, err2 := a.RetailList(poiCode, offset, 100) // GeneralMaxLimit
offset = offset * GeneralMaxLimit
batchList, err2 := a.RetailList(poiCode, offset, GeneralMaxLimit) // GeneralMaxLimit
globals.SugarLogger.Debugf("==========batchList %d", len(batchList))
globals.SugarLogger.Debugf("==========batchList %s", utils.Format4Output(err2, false))
if err = err2; err == nil {