|
@@ -81,10 +81,11 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
Map<Long, List<CustomerFollowRecords>> longListMap = customerFollowRecordsService.mapKGroup(CustomerFollowRecords::getCustomerId,
|
|
Map<Long, List<CustomerFollowRecords>> longListMap = customerFollowRecordsService.mapKGroup(CustomerFollowRecords::getCustomerId,
|
|
q -> q.in(CustomerFollowRecords::getCustomerId, customerIds).orderByDesc(CustomerFollowRecords::getDate));
|
|
q -> q.in(CustomerFollowRecords::getCustomerId, customerIds).orderByDesc(CustomerFollowRecords::getDate));
|
|
for (CustomerVo record : records) {
|
|
for (CustomerVo record : records) {
|
|
- List<CustomerFollowRecords> customerFollowRecords = longListMap.get(record.getId());
|
|
|
|
- if (ObjectUtil.isNotEmpty(customerFollowRecords)) {
|
|
|
|
- record.setCustomerFollowRecordsList(customerFollowRecords.subList(0, 2));
|
|
|
|
- }
|
|
|
|
|
|
+// List<CustomerFollowRecords> customerFollowRecords = longListMap.get(record.getId());
|
|
|
|
+// if (ObjectUtil.isNotEmpty(customerFollowRecords)) {
|
|
|
|
+// record.setCustomerFollowRecordsList(customerFollowRecords.subList(0, 2));
|
|
|
|
+// }
|
|
|
|
+ record.setCustomerFollowRecordsList(longListMap.get(record.getId()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return page;
|
|
return page;
|
|
@@ -181,10 +182,11 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
Map<Long, List<CustomerFollowRecords>> longListMap = customerFollowRecordsService.mapKGroup(CustomerFollowRecords::getCustomerId,
|
|
Map<Long, List<CustomerFollowRecords>> longListMap = customerFollowRecordsService.mapKGroup(CustomerFollowRecords::getCustomerId,
|
|
q -> q.in(CustomerFollowRecords::getCustomerId, customerIds));
|
|
q -> q.in(CustomerFollowRecords::getCustomerId, customerIds));
|
|
for (CustomerVo record : records) {
|
|
for (CustomerVo record : records) {
|
|
- List<CustomerFollowRecords> customerFollowRecords = longListMap.get(record.getId());
|
|
|
|
- if (ObjectUtil.isNotEmpty(customerFollowRecords)) {
|
|
|
|
- record.setCustomerFollowRecordsList(customerFollowRecords.subList(0, 2));
|
|
|
|
- }
|
|
|
|
|
|
+// List<CustomerFollowRecords> customerFollowRecords = longListMap.get(record.getId());
|
|
|
|
+// if (ObjectUtil.isNotEmpty(customerFollowRecords)) {
|
|
|
|
+// record.setCustomerFollowRecordsList(customerFollowRecords.subList(0, 2));
|
|
|
|
+// }
|
|
|
|
+ record.setCustomerFollowRecordsList(longListMap.get(record.getId()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return page;
|
|
return page;
|