aa
This commit is contained in:
@@ -518,8 +518,10 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
||||
}
|
||||
//权限
|
||||
if ctx.GetUserName() != "jxadmin" {
|
||||
fmt.Println("111111111111111111111111111111111111111111")
|
||||
if user, err := dao.GetUserByID(db, "userID", ctx.GetUserID()); err == nil {
|
||||
if user.Type&model.UserTypeRole != 0 {
|
||||
fmt.Println("22222222222222222222222222222222222222222")
|
||||
if storeIDsMap, err := GetUserStoresResultMap(user.UserID); err == nil {
|
||||
var storeList2 []*StoreExt
|
||||
for _, v := range retVal.Stores {
|
||||
@@ -527,6 +529,7 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
||||
storeList2 = append(storeList2, v)
|
||||
}
|
||||
}
|
||||
fmt.Println("3333333333333333333333333333333333333333333", storeIDsMap)
|
||||
retVal.Stores = nil
|
||||
retVal.Stores = storeList2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user