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

View File

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