aa
This commit is contained in:
@@ -518,10 +518,8 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
||||
}
|
||||
//权限
|
||||
if ctx.GetUserName() != "jxadmin" {
|
||||
fmt.Println("111111111111111111111111111111111111111111")
|
||||
if user, err := dao.GetUserByID(db, "user_id", 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 {
|
||||
@@ -529,7 +527,6 @@ 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
|
||||
}
|
||||
|
||||
@@ -230,8 +230,8 @@ type Role struct {
|
||||
|
||||
Name string `json:"name"` //角色名
|
||||
BrandID int `orm:"column(brand_id)" json:"brandID"`
|
||||
CityCodes string `json:"cityCodes"`
|
||||
StoreIDs string `orm:"column(store_ids)" json:"storeIDs"`
|
||||
CityCodes string `orm:"type(text)" json:"cityCodes"`
|
||||
StoreIDs string `orm:"column(store_ids);type(text)" json:"storeIDs"`
|
||||
}
|
||||
|
||||
func (*Role) TableUnique() [][]string {
|
||||
|
||||
Reference in New Issue
Block a user