Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -269,6 +269,7 @@ func (c *Auth2Controller) DingDingOAuth2() {
|
||||
}
|
||||
ctx := auth2.NewContext(c.Ctx.ResponseWriter, c.Ctx.Request)
|
||||
authInfo, err := auth2.Login(ctx, dingding.AuthTypeQRCode, params.State, "", params.Code)
|
||||
globals.SugarLogger.Debug("DingDingOAuth2 输出authInfo", authInfo)
|
||||
if err == nil {
|
||||
callResult = &CallResult{
|
||||
Code: model.ErrCodeSuccess,
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
@@ -594,7 +595,9 @@ func (c *StoreController) SyncStoresCourierInfo() {
|
||||
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, params.BrandID)
|
||||
|
||||
//if params.Token == "tempToken" {
|
||||
// return locationList, "", nil
|
||||
//}
|
||||
if params.Token != "" {
|
||||
// 获取用户权限,如果是普通用户不展示b2b相关目录,如果是门店老板或者管理则展示全部
|
||||
userAuth, err := auth2.GetTokenInfo(params.Token)
|
||||
@@ -605,12 +608,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 {
|
||||
|
||||
Reference in New Issue
Block a user