修改用户查询自己门店信息
This commit is contained in:
@@ -1243,15 +1243,26 @@ func UpdateUserLastInfo(ctx *jxcontext.Context, storeID, brandID int) (err error
|
||||
}
|
||||
|
||||
func GetUserStoreAuth(ctx *jxcontext.Context, storeID int) (outStoreID int, err error) {
|
||||
//if permission.IsRoled(ctx) {
|
||||
storeMap, _ := permission.GetUserStoresResultMap(ctx.GetUserID())
|
||||
if storeMap[storeID] != 0 {
|
||||
return storeID, err
|
||||
} else {
|
||||
if permission.IsRoled(ctx) {
|
||||
configs, _ := dao.QueryConfigs(dao.GetDB(), "checkversion", model.ConfigTypeSys, "")
|
||||
storeMaps, _, err := GetMyStoreListNew(ctx, configs[0].Value)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
//}
|
||||
//return storeID, err
|
||||
for _, v := range storeMaps.([]map[string]interface{}) {
|
||||
if v["id"].(int) != storeID {
|
||||
continue
|
||||
}
|
||||
return storeID, nil
|
||||
}
|
||||
//storeMap, _ := permission.GetUserStoresResultMap(ctx.GetUserID())
|
||||
//if storeMap[storeID] != 0 {
|
||||
// return storeID, err
|
||||
//} else {
|
||||
// return 0, err
|
||||
//}
|
||||
}
|
||||
return storeID, err
|
||||
}
|
||||
|
||||
func SendQywxPeopleCount(ctx *jxcontext.Context) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user