This commit is contained in:
suyl
2021-07-27 11:11:42 +08:00
parent 4b7ff1aed3
commit a913ce904f
2 changed files with 5 additions and 3 deletions

View File

@@ -340,8 +340,10 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
)
resultMap = make(map[int]int)
user, _ := dao.GetUserByID(db, "user_id", userID)
if user.BindStoreID != 0 {
resultMap[user.BindStoreID] = user.BindStoreID
if user.BindStoreID != "" {
for _, v := range strings.Split(user.BindStoreID, ",") {
resultMap[utils.Str2Int(v)] = utils.Str2Int(v)
}
} else {
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
err = err2