修改用户查询自己门店信息

This commit is contained in:
邹宗楠
2022-04-12 14:07:12 +08:00
parent 8fce1da313
commit 7e318ca948
2 changed files with 19 additions and 45 deletions

View File

@@ -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) {