录音管理联调添加编辑,门店转换

This commit is contained in:
spllzh
2025-08-15 09:14:30 +08:00
parent 4e6af75be4
commit 7fe50bb811
2 changed files with 44 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ package com.rj.common;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.rj.entity.CustomerManagement;
import com.rj.entity.Dealership;
import com.rj.entity.ProjectManagement;
import com.rj.entity.SalesManagement;
@@ -302,12 +303,19 @@ public class DataEnrichmentUtil {
* 批量获取客户名称映射使用ServiceManager
*/
public Map<String, String> getCustomerNameMap(Collection<String> customerIds) {
return batchGetNameMap(
customerIds,
serviceManager.getCustomerManagementService(),
com.rj.entity.CustomerManagement::getId,
com.rj.entity.CustomerManagement::getCustomerName
);
// 批量获取 销售信息
Map<String, String> saleNameMap;
if (!customerIds.isEmpty()) {
LambdaQueryWrapper<CustomerManagement> customerQueryWrapper = new LambdaQueryWrapper<>();
customerQueryWrapper.in(CustomerManagement::getId, customerIds);
List<CustomerManagement> sales = serviceManager.getCustomerManagementService().list(customerQueryWrapper);
saleNameMap = sales.stream()
.collect(Collectors.toMap(CustomerManagement::getId, CustomerManagement::getCustomerName));
} else {
saleNameMap = new HashMap<>();
}
return saleNameMap;
}
/**