dy 获取位置店铺

This commit is contained in:
richboo111
2022-08-16 13:57:11 +08:00
parent c32bccd741
commit 64fc4bfe1d

View File

@@ -12,6 +12,7 @@ import (
"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/dao"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego/server/web"
)
@@ -589,12 +590,13 @@ func (c *StoreController) GetStoreListByLocation() {
if err != nil {
return nil, "", err
}
globals.SugarLogger.Debug("检测数据userAuth,user,total==============", userAuth, user, total)
// 获取位置附近门店列表
storeIDs := make([]int, 0, len(locationList))
for _, v := range locationList {
storeIDs = append(storeIDs, v.ID)
}
globals.SugarLogger.Debug("检测数据locationList,storeIDs==============", locationList, storeIDs)
// 判断门店是不是b2b门店如果是用户必须为系统管理员门店老板和运营人员
store, err := dao.GetStoreList(dao.GetDB(), storeIDs, nil, nil, nil, nil, "")
if err != nil {
@@ -630,6 +632,7 @@ func (c *StoreController) GetStoreListByLocation() {
return result, "", err
}
}
globals.SugarLogger.Debug("检测最后的数据locationList==============", locationList)
return locationList, "", err
})
}