提交 09d6df40 作者: xiaowang

修复:bug

上级 2fad5f90
......@@ -11,6 +11,7 @@ import com.mmc.pms.model.category.vo.ModeInfoVO;
import com.mmc.pms.model.sale.dto.BrandInfoDTO;
import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.BrandManageService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -69,7 +70,9 @@ public class BrandManageServiceImpl implements BrandManageService {
brandInfo.stream().map(BrandInfoDO::buildBrandInfoDTO).collect(Collectors.toList());
brandInfoList = brandInfoList.stream().peek(d -> {
List<DeviceModeDO> deviceModeList = map.get(d.getId());
d.setModeInfoList(deviceModeList.stream().map(DeviceModeDO::buildModeInfoVO).collect(Collectors.toList()));
if (CollectionUtils.isNotEmpty(deviceModeList)) {
d.setModeInfoList(deviceModeList.stream().map(DeviceModeDO::buildModeInfoVO).collect(Collectors.toList()));
}
}).collect(Collectors.toList());
return PageResult.buildPage(pageNo, pageSize, count, brandInfoList);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论