|
|
@@ -334,7 +334,7 @@ public class ShopAppCorpsDescServiceImpl extends ServiceImpl<ShopAppCorpsDescMap
|
|
|
List<ShopAppPjCorpsAttn> shopAppCorpsAttnList = corpsAttnService.list(new LambdaQueryWrapper<ShopAppPjCorpsAttn>()
|
|
|
.in(ShopAppPjCorpsAttn::getUserId, storeUserIds));
|
|
|
if (org.springframework.util.CollectionUtils.isEmpty(carOwnerList)) {
|
|
|
- return R.data(carOwnerList);
|
|
|
+ return R.data(Collections.emptyList());
|
|
|
}
|
|
|
List<Long> storeIds = shopAppCorpsAttnList.stream().map(ShopAppPjCorpsAttn::getPid).collect(Collectors.toList());
|
|
|
List<ShopAppPjCorpsDesc> shopAppPjCorpsDescList = baseMapper.selectList(new LambdaQueryWrapper<ShopAppPjCorpsDesc>()
|
|
|
@@ -342,15 +342,12 @@ public class ShopAppCorpsDescServiceImpl extends ServiceImpl<ShopAppCorpsDescMap
|
|
|
.eq(ShopAppPjCorpsDesc::getEnableOrNot, NumberEnum.ONE.number)
|
|
|
.in(ShopAppPjCorpsDesc::getId, storeIds));
|
|
|
if (org.springframework.util.CollectionUtils.isEmpty(shopAppPjCorpsDescList)) {
|
|
|
- return R.data(carOwnerList);
|
|
|
+ return R.data(Collections.emptyList());
|
|
|
}
|
|
|
List<ShopAppPjCorpsAddr> shopAppPjCorpsAddrList = corpsAddrService.list(new LambdaQueryWrapper<ShopAppPjCorpsAddr>()
|
|
|
.eq(ShopAppPjCorpsAddr::getIsDeleted, 0).in(ShopAppPjCorpsAddr::getPid, storeIds).eq(ShopAppPjCorpsAddr::getDefaultAddres, CommonEnum.ONE.info));
|
|
|
List<CarOwnerDTO> carOwnerDTOList = new ArrayList<>();
|
|
|
for (CarOwner carOwner : carOwnerList) {
|
|
|
- CarOwnerDTO carOwnerDTO = new CarOwnerDTO();
|
|
|
- BeanUtil.copyProperties(carOwner, carOwnerDTO);
|
|
|
- carOwnerDTOList.add(carOwnerDTO);
|
|
|
ShopAppPjCorpsAttn storeUser = shopAppCorpsAttnList.stream().filter(e -> carOwner.getStoreId().equals(e.getUserId())).findFirst().orElse(null);
|
|
|
if (storeUser == null) {
|
|
|
continue;
|
|
|
@@ -359,6 +356,9 @@ public class ShopAppCorpsDescServiceImpl extends ServiceImpl<ShopAppCorpsDescMap
|
|
|
if (store == null) {
|
|
|
continue;
|
|
|
}
|
|
|
+ CarOwnerDTO carOwnerDTO = new CarOwnerDTO();
|
|
|
+ BeanUtil.copyProperties(carOwner, carOwnerDTO);
|
|
|
+ carOwnerDTOList.add(carOwnerDTO);
|
|
|
ShopAppPjCorpsAddr storeAddr = shopAppPjCorpsAddrList.stream().filter(e -> store.getId().equals(e.getPid())).findFirst().orElse(null);
|
|
|
carOwnerDTO.setStoreAddress(storeAddr == null ? carOwnerDTO.getStoreAddress() : storeAddr.getBelongtoarea());
|
|
|
carOwnerDTO.setStoreAddressItem(storeAddr == null ? null : storeAddr.getDetailedAddress());
|