v1.0.30
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
+12
-3
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user