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)
|
resultMap = make(map[int]int)
|
||||||
user, _ := dao.GetUserByID(db, "user_id", userID)
|
user, _ := dao.GetUserByID(db, "user_id", userID)
|
||||||
if user.BindStoreID != 0 {
|
if user.BindStoreID != "" {
|
||||||
resultMap[user.BindStoreID] = user.BindStoreID
|
for _, v := range strings.Split(user.BindStoreID, ",") {
|
||||||
|
resultMap[utils.Str2Int(v)] = utils.Str2Int(v)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
|
userRoles, err2 := dao.GetUserRole2(db, []string{userID}, nil)
|
||||||
err = err2
|
err = err2
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ type User struct {
|
|||||||
ProfitSum int `json:"profitSum"`
|
ProfitSum int `json:"profitSum"`
|
||||||
Arrears int `json:"arrears"`
|
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"` //表示绑的哪个账号,密码同这个账号
|
BindStoreUser string `json:"bindStoreUser"` //表示绑的哪个账号,密码同这个账号
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user