1
This commit is contained in:
@@ -588,18 +588,20 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
||||
if storeIDsMap[int(utils.Interface2Int64WithDefault(params["storeID"], 0))] == 0 {
|
||||
params["storeID"] = nil
|
||||
}
|
||||
} else {
|
||||
if len(storeIDsMap) > 0 {
|
||||
for k, _ := range storeIDsMap {
|
||||
storeIDs2 = append(storeIDs2, k)
|
||||
}
|
||||
} else {
|
||||
//storeIDs2 = append(storeIDs2, -1)l
|
||||
// 商家小程序用户切换门店,如果角色storeIDsMap没有数据则查询传入数据
|
||||
storeIDs2 = append(storeIDs2, int(utils.Interface2Int64WithDefault(params["storeID"], 0)))
|
||||
} else if len(storeIDsMap) > 0 {
|
||||
for k, _ := range storeIDsMap {
|
||||
storeIDs2 = append(storeIDs2, k)
|
||||
}
|
||||
} else {
|
||||
//storeIDs2 = append(storeIDs2, -1)l
|
||||
// 商家小程序用户切换门店,如果角色storeIDsMap没有数据则查询传入数据
|
||||
storeIDs2 = append(storeIDs2, int(utils.Interface2Int64WithDefault(params["storeID"], 0)))
|
||||
}
|
||||
}
|
||||
roleInfo, _ := GetUserRoleList(ctx, ctx.GetUserID())
|
||||
for _, v := range roleInfo {
|
||||
storeIDs2 = append(storeIDs2, v.StoreID)
|
||||
}
|
||||
if data, err := json.Marshal(storeIDs2); err == nil {
|
||||
params["storeIDs"] = string(data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user