diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java index 814d3d944b..b0bc86f11b 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomerfile/CrmCustomerFileService.java @@ -50,6 +50,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.Collections; import java.util.Date; import java.util.List; @@ -203,6 +204,7 @@ public class CrmCustomerFileService extends MybatisBaseService dataVos = baseMapper.selectByCustomerSid(customerSid); + dataVos.removeAll(Collections.singleton(null)); if (dataVos.size() > 0) { for (AppCustomerArchivesDataVo appCustomerArchivesDataVo : dataVos) { String createTime = appCustomerArchivesDataVo.getCreateTime(); @@ -212,10 +214,15 @@ public class CrmCustomerFileService extends MybatisBaseService listVo = baseMapper.selArchivesFileImageBySid(sid); + listVo.removeAll(Collections.singleton(null)); List list = new ArrayList<>(); - for (CrmFile crmFile : listVo) { - String url = fileUploadComponent.getUrlPrefix() + crmFile.getFilePath(); - list.add(url); + if(!listVo.isEmpty()){ + for (CrmFile crmFile : listVo) { + if(StringUtils.isNotBlank(crmFile.getFilePath())){ + String url = fileUploadComponent.getUrlPrefix() + crmFile.getFilePath(); + list.add(url); + } + } } appCustomerArchivesDataVo.setFiles(list); }