- GetAndStoreCitiesShops添加参数isShuffle

This commit is contained in:
gazebo
2019-09-11 16:49:56 +08:00
parent 37c9acc407
commit 3919aafe83
2 changed files with 11 additions and 5 deletions

View File

@@ -11,13 +11,14 @@ type NetSpiderController struct {
beego.Controller
}
// @Title 同步商家商品信息
// @Description 同步商家商品信息
// @Title 从网页拉取平台门店信息
// @Description 从网页拉取平台门店信息
// @Param token header string true "认证token"
// @Param vendorIDs formData string false "厂商ID列表"
// @Param cityCodes formData string false "城市列表,缺省为后台启用了的城市"
// @Param radius formData int false "区域半径市或街道的半径会自动增加或缩小单位为米缺省8000米"
// @Param gridWith formData int false "网格大小单位为米缺省为2000米"
// @Param isShuffle formData bool false "是否将城市列表随机打乱"
// @Param isAsync formData bool false "是否异步"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
@@ -27,7 +28,7 @@ func (c *NetSpiderController) GetAndStoreCitiesShops() {
var vendorIDs, cityCodes []int
err = jxutils.Strings2Objs(params.VendorIDs, &vendorIDs, params.CityCodes, &cityCodes)
if err == nil {
retVal, err = netspider.GetAndStoreCitiesShops(params.Ctx, vendorIDs, cityCodes, params.Radius, params.GridWith, params.IsAsync)
retVal, err = netspider.GetAndStoreCitiesShops(params.Ctx, vendorIDs, cityCodes, params.Radius, params.GridWith, params.IsShuffle, params.IsAsync)
}
return retVal, "", err
})