param
This commit is contained in:
@@ -545,6 +545,7 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
|||||||
var storeIDs []int
|
var storeIDs []int
|
||||||
if err = utils.UnmarshalUseNumber([]byte(params["storeIDs"].(string)), &storeIDs); err == nil {
|
if err = utils.UnmarshalUseNumber([]byte(params["storeIDs"].(string)), &storeIDs); err == nil {
|
||||||
for _, v := range storeIDs {
|
for _, v := range storeIDs {
|
||||||
|
globals.SugarLogger.Debug("storeIDs===============", v)
|
||||||
if storeIDsMap[v] != 0 {
|
if storeIDsMap[v] != 0 {
|
||||||
storeIDs2 = append(storeIDs2, v)
|
storeIDs2 = append(storeIDs2, v)
|
||||||
}
|
}
|
||||||
@@ -5706,19 +5707,16 @@ func FilterByB2B(locationList []*common.Store4User, token string) (retVal []*com
|
|||||||
}
|
}
|
||||||
|
|
||||||
//首页信息展示
|
//首页信息展示
|
||||||
//func GetHomePageByLocation(ctx *jxcontext.Context,locationList []*common.Store4User, token string) (interface{}, string, error) {
|
//func GetHomePageByLocation(ctx *jxcontext.Context, params map[string]interface{}) (interface{}, string, error) {
|
||||||
// // 获取用户权限,如普通用户不展示b2b相关目录,门店老板或者管理则展示全部
|
|
||||||
// result, _, err := FilterByB2B(locationList, token)
|
|
||||||
// if err != nil {
|
|
||||||
// return nil, "根据用户权限过滤商店失败", err
|
|
||||||
// }
|
|
||||||
// for _, v := range result {
|
|
||||||
// //获取门店信息
|
// //获取门店信息
|
||||||
// store, err := GetStores(ctx, )
|
// timeList, err := jxutils.BatchStr2Time("1970-01-01 00:00:00 +0800 CST", "1970-01-01 00:00:00 +0800 CST")
|
||||||
|
// if err != nil {
|
||||||
|
// return nil, "", err
|
||||||
|
// }
|
||||||
|
// store, err := GetStores(ctx, "", params, 0, 0, timeList[0], timeList[1], 0, 0)
|
||||||
// //获取热销商品
|
// //获取热销商品
|
||||||
//
|
//
|
||||||
// //获取满减策略
|
// //获取满减策略
|
||||||
// }
|
|
||||||
//
|
//
|
||||||
// return nil, "", nil
|
// return nil, "", nil
|
||||||
//}
|
//}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
|
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego/server/web"
|
"github.com/astaxie/beego/server/web"
|
||||||
)
|
)
|
||||||
@@ -64,10 +63,6 @@ func (c *StoreController) GetStores() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debug("=================", params.Ctx)
|
|
||||||
globals.SugarLogger.Debug("=================", params.Keyword)
|
|
||||||
globals.SugarLogger.Debug("=================", params.MapData)
|
|
||||||
globals.SugarLogger.Debug("检测数据param", params.Offset, params.PageSize, timeList[0], timeList[1], params.OrderCountFrom, params.OrderCountTo)
|
|
||||||
retVal, err = cms.GetStores(params.Ctx, params.Keyword, params.MapData, params.Offset, params.PageSize, timeList[0], timeList[1], params.OrderCountFrom, params.OrderCountTo)
|
retVal, err = cms.GetStores(params.Ctx, params.Keyword, params.MapData, params.Offset, params.PageSize, timeList[0], timeList[1], params.OrderCountFrom, params.OrderCountTo)
|
||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
@@ -597,26 +592,28 @@ func (c *StoreController) GetStoreListByLocation() {
|
|||||||
// @Param token header string false "认证token"
|
// @Param token header string false "认证token"
|
||||||
// @Param lng query float64 true "经度"
|
// @Param lng query float64 true "经度"
|
||||||
// @Param lat query float64 true "纬度"
|
// @Param lat query float64 true "纬度"
|
||||||
|
//@Param storeID query string false "门店ID"
|
||||||
// @Param needWalkDistance query bool false "是否需要返回步行距离(且以步行距离排序)"
|
// @Param needWalkDistance query bool false "是否需要返回步行距离(且以步行距离排序)"
|
||||||
// @Param brandID query int false "品牌ID"
|
// @Param brandID query int false "品牌ID"
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
// @Failure 200 {object} controllers.CallResult
|
// @Failure 200 {object} controllers.CallResult
|
||||||
// @router /GetHomePageByLocation [get]
|
// @router /GetHomePageByLocation [get]
|
||||||
func (c *StoreController) GetHomePageByLocation() {
|
//func (c *StoreController) GetHomePageByLocation() {
|
||||||
c.callGetHomePageByLocation(func(params *tStoreGetHomePageByLocationParams) (interface{}, string, error) {
|
// c.callGetHomePageByLocation(func(params *tStoreGetHomePageByLocationParams) (interface{}, string, error) {
|
||||||
locationList, err := common.GetStoreListByLocation(params.Ctx, params.Lng, params.Lat, 20000, params.NeedWalkDistance, false, params.BrandID)
|
// details, _, err := cms.GetHomePageByLocation(params.Ctx, params.MapData)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return nil, "根据经纬度获取商店失败", err
|
// return nil, "根据经纬度获取门店详细信息失败", err
|
||||||
}
|
// }
|
||||||
if params.Token != "" {
|
// 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)
|
// //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)
|
// //retVal, err = cms.GetStoreVendorMaps(params.Ctx, nil, utils.Interface2String(), params.VendorID)
|
||||||
}
|
// }
|
||||||
return locationList, "", err
|
// //return locationList, "", err
|
||||||
})
|
// return nil, "", err
|
||||||
}
|
// })
|
||||||
|
//}
|
||||||
|
|
||||||
// @Title 老格恢复拓店进度
|
// @Title 老格恢复拓店进度
|
||||||
// @Description 老格恢复拓店进度
|
// @Description 老格恢复拓店进度
|
||||||
|
|||||||
Reference in New Issue
Block a user