diff --git a/pom.xml b/pom.xml
index bc7d597..85f6c92 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
com.imyeyu.timiserverapi
TimiServerAPI
- 1.0.29
+ 1.0.30
jar
TimiServerAPI
imyeyu.com API
diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerPackageController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerPackageController.java
index 4201756..455ae40 100644
--- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerPackageController.java
+++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerPackageController.java
@@ -71,10 +71,19 @@ public class GaoCustomerPackageController {
if (result.getList().isEmpty()) {
return result;
}
- fillTransient(result.getList());
- Map customerMap = customerService.mapByIdList(result.getList().stream().map(GaoCustomerPackage::getCustomerId).toList());
+ List customerIdList = result.getList().stream()
+ .map(GaoCustomerPackage::getCustomerId)
+ .filter(value -> value != null && !value.isBlank())
+ .distinct()
+ .toList();
+ Map customerMap = customerService.mapByIdList(customerIdList);
+ Map> attachmentMap = attachmentService.mapByBizIdList(Attachment.BizType.GAO_CUSTOMER, customerIdList, GaoCustomer.AttachType.PHOTO.name());
for (GaoCustomerPackage packageEntity : result.getList()) {
- packageEntity.setCustomer(customerMap.get(packageEntity.getCustomerId()));
+ GaoCustomer customer = customerMap.get(packageEntity.getCustomerId());
+ if (customer != null) {
+ customer.setAttachmentList(attachmentMap.get(customer.getId()));
+ }
+ packageEntity.setCustomer(customer);
}
return result;
}