YPZ преди 1 седмица
родител
ревизия
c50af76a97

+ 1 - 0
java/storlead-api/pom.xml

@@ -95,6 +95,7 @@
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <configuration>
                     <mainClass>com.storlead.StorleadTradeApplication</mainClass>
+                    <jvmArguments>--add-opens java.base/java.lang=ALL-UNNAMED</jvmArguments>
                 </configuration>
             </plugin>
         </plugins>

+ 10 - 2
java/storlead-sasa/storlead-sales/src/main/java/com/storlead/sales/service/impl/customer/CustomerServiceImpl.java

@@ -2660,8 +2660,16 @@ public class CustomerServiceImpl extends MyBaseServiceImpl<CustomerMapper, Custo
         }
 //        List<CustomerListVO> customerListVO = new ArrayList<>();
         //复制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());
         Map<Long, CustomerCompanyEntity> customerCompanyMap =  customerCompanyService.customerIdListToCompanyMap(customerIdList);