|
|
|
@ -40,10 +40,14 @@ func QueryBrandList(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
brandIds := []uint{}
|
|
|
|
|
for _, item := range list {
|
|
|
|
|
brandIds = append(brandIds, item.InfoId)
|
|
|
|
|
if item.InfoId > 0 {
|
|
|
|
|
brandIds = append(brandIds, item.InfoId)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var ppimg []vend.GysEnterpriseImg
|
|
|
|
|
dbc.DB.Where("brand_id in (?) and type = 2", brandIds).Find(&ppimg)
|
|
|
|
|
if len(brandIds) > 0 {
|
|
|
|
|
dbc.DB.Where("brand_id in (?) and type = 2", brandIds).Find(&ppimg)
|
|
|
|
|
}
|
|
|
|
|
ppimgMap := map[uint][]string{}
|
|
|
|
|
for _, img := range ppimg {
|
|
|
|
|
ppimgMap[img.BrandID] = append(ppimgMap[img.BrandID], img.Url)
|
|
|
|
|