|
@@ -133,13 +133,13 @@ func GetProductPageByProductType(productIds []int, info page.PageInfo) (dtoList
|
|
|
}
|
|
|
|
|
|
func GetProductByProductType() (productIdMap map[string][]int, err error) {
|
|
|
- productMap, err := merchantDao.GetProductByProductType()
|
|
|
+ productIdStrMap, err := merchantDao.GetProductByProductType()
|
|
|
if err != nil {
|
|
|
logger.Error("根据类型分类获取商品ID失败,err:%v", err)
|
|
|
return
|
|
|
}
|
|
|
- productIdMap = make(map[string][]int, len(productMap))
|
|
|
- for productType, productIds := range productMap {
|
|
|
+ productIdMap = make(map[string][]int, len(productIdStrMap))
|
|
|
+ for productType, productIds := range productIdStrMap {
|
|
|
idStr := strings.Split(productIds, ",")
|
|
|
productIdMap[productType], _ = stringUtils.StringToIntSlice(idStr)
|
|
|
}
|