This commit is contained in:
苏尹岚
2021-01-22 10:23:19 +08:00
parent f9f636499d
commit 1dc91f6f9a

View File

@@ -323,14 +323,18 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
if _, ok := brandIDMap[v.BrandID]; !ok {
brandIDMap[v.BrandID] = 1
}
for _, cityCode := range jxutils.StrListToIntList(strings.Split(v.CityCodes, ",")) {
if _, ok := cityCodeMap[cityCode]; !ok {
cityCodeMap[cityCode] = 1
if v.CityCodes != "" {
for _, cityCode := range jxutils.StrListToIntList(strings.Split(v.CityCodes, ",")) {
if _, ok := cityCodeMap[cityCode]; !ok {
cityCodeMap[cityCode] = 1
}
}
}
for _, storeID := range jxutils.StrListToIntList(strings.Split(v.StoreIDs, ",")) {
if _, ok := storeIDMap[storeID]; !ok {
storeIDMap[storeID] = 1
if v.StoreIDs != "" {
for _, storeID := range jxutils.StrListToIntList(strings.Split(v.StoreIDs, ",")) {
if _, ok := storeIDMap[storeID]; !ok {
storeIDMap[storeID] = 1
}
}
}
}