aa
This commit is contained in:
@@ -339,7 +339,12 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
|
||||
// storeIDMap = make(map[int]int)
|
||||
)
|
||||
resultMap = make(map[int]int)
|
||||
userRoles, err := dao.GetUserRole2(db, []string{userID}, nil)
|
||||
user, _ := dao.GetUserByID(db, "user_id", userID)
|
||||
if user.BindStoreID != 0 {
|
||||
resultMap[user.BindStoreID] = user.BindStoreID
|
||||
} else {
|
||||
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
|
||||
err = err2
|
||||
for _, v := range userRoles {
|
||||
var (
|
||||
brandIDs, cityCodes, storeIDs []int
|
||||
@@ -397,7 +402,7 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
|
||||
// if stores3, err := dao.GetStoreList(db, storeIDs, nil, nil, nil, nil, ""); len(stores3) > 0 && err == nil {
|
||||
// stores = append(stores, stores3...)
|
||||
// }
|
||||
|
||||
}
|
||||
return resultMap, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user