1
This commit is contained in:
@@ -142,7 +142,11 @@ func (a *API) BatchGetChannelCategoryMapping(categoryIds []int64) (map[int64]int
|
||||
|
||||
mappingData := make(map[int64]int64, 0)
|
||||
for _, v := range result.Data.RespItems {
|
||||
mappingData[v.SourceCategoryId] = v.CategoryMappings[0].MappingCategoryId
|
||||
if len(v.CategoryMappings) == 0 {
|
||||
mappingData[v.SourceCategoryId] = 0
|
||||
} else {
|
||||
mappingData[v.SourceCategoryId] = v.CategoryMappings[0].MappingCategoryId
|
||||
}
|
||||
}
|
||||
|
||||
return mappingData, nil
|
||||
|
||||
Reference in New Issue
Block a user