|
@@ -282,6 +282,14 @@ public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements
|
|
|
for (Brand brand : brands) {
|
|
|
BrandVO brandVO = BeanUtil.copyProperties(brand, BrandVO.class);
|
|
|
|
|
|
+ //查询brand_client
|
|
|
+ List<Integer> clientIds = brandClientService.lambdaQuery()
|
|
|
+ .eq(BrandClient::getBrandId, brand.getId())
|
|
|
+ .list().stream().map(c -> c.getClientId()).collect(Collectors.toList());
|
|
|
+ if (clientIds.isEmpty()){
|
|
|
+ throw new BadReqException("该品牌下没有查询到客户端");
|
|
|
+ }
|
|
|
+ brandVO.setClientIds(clientIds);
|
|
|
brandVOS.add(brandVO);
|
|
|
}
|
|
|
|