1
This commit is contained in:
@@ -626,7 +626,7 @@ func (c *StoreController) SyncStoresCourierInfo() {
|
||||
// @router /GetStoreListByLocation [get]
|
||||
func (c *StoreController) GetStoreListByLocation() {
|
||||
c.callGetStoreListByLocation(func(params *tStoreGetStoreListByLocationParams) (retVal interface{}, errCode string, err error) {
|
||||
locationList, err := common.GetStoreListByLocation(params.Ctx, params.Lng, params.Lat, 20000, params.NeedWalkDistance, false, []int{params.BrandID})
|
||||
locationList, err := common.GetStoreListByLocation(params.Ctx, params.Lng, params.Lat, 50000, params.NeedWalkDistance, false, []int{params.BrandID})
|
||||
//if params.Token != "" {
|
||||
result, _, err := cms.FilterByB2B(locationList)
|
||||
if err != nil {
|
||||
@@ -644,13 +644,18 @@ func (c *StoreController) GetStoreListByLocation() {
|
||||
// @Param lng query float64 true "经度"
|
||||
// @Param lat query float64 true "纬度"
|
||||
// @Param needWalkDistance query bool false "是否需要返回步行距离(且以步行距离排序)"
|
||||
// @Param brandID query int false "品牌ID"
|
||||
// @Param brandID query string false "品牌ID"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetHomePageByLocation [get]
|
||||
func (c *StoreController) GetHomePageByLocation() {
|
||||
c.callGetHomePageByLocation(func(params *tStoreGetHomePageByLocationParams) (interface{}, string, error) {
|
||||
details, _, err := cms.GetHomePageByLocation(params.Ctx, params.Lng, params.Lat, params.NeedWalkDistance, []int{params.BrandID})
|
||||
c.callGetHomePageByLocation(func(params *tStoreGetHomePageByLocationParams) (retVal interface{}, code string, err error) {
|
||||
var brandIDs []int
|
||||
if err = jxutils.Strings2Objs(params.BrandID, &brandIDs); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
|
||||
details, _, err := cms.GetHomePageByLocation(params.Ctx, params.Lng, params.Lat, params.NeedWalkDistance, brandIDs)
|
||||
if err != nil {
|
||||
return nil, "根据经纬度获取门店详细信息失败", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user