aa
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -68,7 +68,7 @@ type User struct {
|
||||
ProfitSum int `json:"profitSum"`
|
||||
Arrears int `json:"arrears"`
|
||||
|
||||
BindStoreID int `orm:"column(bind_store_id)" json:"bindStoreID"` //门店老板账号用,表示绑的哪个门店,后权限用
|
||||
BindStoreID string `orm:"column(bind_store_id)" json:"bindStoreID"` //门店老板账号用,表示绑的哪个门店,后权限用
|
||||
BindStoreUser string `json:"bindStoreUser"` //表示绑的哪个账号,密码同这个账号
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user