v1.0.30
CI / build-deploy (pull_request) Failing after 3s
CI / notify-on-failure (pull_request) Successful in 0s

This commit is contained in:
Timi
2026-09-02 01:37:47 +08:00
parent f6a2f5a6f5
commit eec665109e
2 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
<groupId>com.imyeyu.timiserverapi</groupId> <groupId>com.imyeyu.timiserverapi</groupId>
<artifactId>TimiServerAPI</artifactId> <artifactId>TimiServerAPI</artifactId>
<version>1.0.29</version> <version>1.0.30</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>TimiServerAPI</name> <name>TimiServerAPI</name>
<description>imyeyu.com API</description> <description>imyeyu.com API</description>
@@ -71,10 +71,19 @@ public class GaoCustomerPackageController {
if (result.getList().isEmpty()) { if (result.getList().isEmpty()) {
return result; return result;
} }
fillTransient(result.getList()); List<String> customerIdList = result.getList().stream()
Map<String, GaoCustomer> customerMap = customerService.mapByIdList(result.getList().stream().map(GaoCustomerPackage::getCustomerId).toList()); .map(GaoCustomerPackage::getCustomerId)
.filter(value -> value != null && !value.isBlank())
.distinct()
.toList();
Map<String, GaoCustomer> customerMap = customerService.mapByIdList(customerIdList);
Map<String, List<Attachment>> attachmentMap = attachmentService.mapByBizIdList(Attachment.BizType.GAO_CUSTOMER, customerIdList, GaoCustomer.AttachType.PHOTO.name());
for (GaoCustomerPackage packageEntity : result.getList()) { 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; return result;
} }