首页推荐商家

This commit is contained in:
richboo111
2022-08-24 17:25:02 +08:00
parent 0219a7b02f
commit dd37849bf3
4 changed files with 154 additions and 45 deletions

View File

@@ -592,28 +592,20 @@ func (c *StoreController) GetStoreListByLocation() {
// @Param token header string false "认证token"
// @Param lng query float64 true "经度"
// @Param lat query float64 true "纬度"
//@Param storeID query string false "门店ID"
// @Param needWalkDistance query bool false "是否需要返回步行距离(且以步行距离排序)"
// @Param brandID query int 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.MapData)
// if err != nil {
// return nil, "根据经纬度获取门店详细信息失败", err
// }
// if params.Token != "" {
// utils.Str2Int()
// //获取店铺基本信息
// //storeDetail := cms.GetStores(params.Ctx, params.Keyword, params.MapData, params.Offset, params.PageSize, timeList[0], timeList[1], params.OrderCountFrom, params.OrderCountTo)
// //retVal, err = cms.GetStoreVendorMaps(params.Ctx, nil, utils.Interface2String(), params.VendorID)
// }
// //return locationList, "", err
// return nil, "", err
// })
//}
func (c *StoreController) GetHomePageByLocation() {
c.callGetHomePageByLocation(func(params *tStoreGetHomePageByLocationParams) (interface{}, string, error) {
details, _, err := cms.GetHomePageByLocation(params.Ctx, params.Lng, params.Lat, params.NeedWalkDistance, params.Token)
if err != nil {
return nil, "根据经纬度获取门店详细信息失败", err
}
return details, "", err
})
}
// @Title 老格恢复拓店进度
// @Description 老格恢复拓店进度