|
@@ -2660,8 +2660,16 @@ public class CustomerServiceImpl extends MyBaseServiceImpl<CustomerMapper, Custo
|
|
|
}
|
|
}
|
|
|
// List<CustomerListVO> customerListVO = new ArrayList<>();
|
|
// List<CustomerListVO> customerListVO = new ArrayList<>();
|
|
|
//复制list给VO类
|
|
//复制list给VO类
|
|
|
- DefaultMapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();
|
|
|
|
|
- List<CustomerListVO> customerListVO = mapperFactory.getMapperFacade().mapAsList(page.getRecords(),CustomerListVO.class);
|
|
|
|
|
|
|
+// DefaultMapperFactory mapperFactory = new DefaultMapperFactory.Builder()
|
|
|
|
|
+// .useBuiltinConverters(false) // 禁用内置转换器(包括 CloneableConverter)
|
|
|
|
|
+// .build();
|
|
|
|
|
+// List<CustomerListVO> customerListVO = mapperFactory.getMapperFacade().mapAsList(page.getRecords(),CustomerListVO.class);
|
|
|
|
|
+ List<CustomerListVO> customerListVO = new ArrayList<>();
|
|
|
|
|
+ for (CustomerEntity entity : page.getRecords()) {
|
|
|
|
|
+ CustomerListVO vo = new CustomerListVO();
|
|
|
|
|
+ BeanUtils.copyProperties(entity, vo);
|
|
|
|
|
+ customerListVO.add(vo);
|
|
|
|
|
+ }
|
|
|
//获取企业详细信息
|
|
//获取企业详细信息
|
|
|
List<Long> customerIdList = customerListVO.stream().map(CustomerListVO::getId).collect(Collectors.toList());
|
|
List<Long> customerIdList = customerListVO.stream().map(CustomerListVO::getId).collect(Collectors.toList());
|
|
|
Map<Long, CustomerCompanyEntity> customerCompanyMap = customerCompanyService.customerIdListToCompanyMap(customerIdList);
|
|
Map<Long, CustomerCompanyEntity> customerCompanyMap = customerCompanyService.customerIdListToCompanyMap(customerIdList);
|