Explorar el Código

供应商客户搜索无结果显示异常的处理

hejq hace 7 años
padre
commit
bd0927a0df

+ 6 - 2
src/main/java/com/uas/platform/b2b/service/impl/VendorsServiceImpl.java

@@ -420,7 +420,9 @@ public class VendorsServiceImpl implements VendorService {
         pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
         SPage<Long> idSPage = searchService.searchCustomerIdList(keyword, pageParams);
         List<Vendor> vendors = vendorDao.findAll(idSPage.getContent());
-        setPurchaseContacts(vendors, idSPage.getContent());
+        if (!CollectionUtil.isEmpty(idSPage.getContent())) {
+            setPurchaseContacts(vendors, idSPage.getContent());
+        }
         return searchService.toSPage(idSPage, vendors);
     }
 
@@ -469,7 +471,9 @@ public class VendorsServiceImpl implements VendorService {
         pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
         SPage<Long> idSPage = searchService.searchVendorIdList(keyword, pageParams);
         List<Vendor> vendors = vendorDao.findAll(idSPage.getContent());
-        setSaleContacts(vendors, idSPage.getContent());
+        if (!CollectionUtil.isEmpty(idSPage.getContent())) {
+            setSaleContacts(vendors, idSPage.getContent());
+        }
         return searchService.toSPage(idSPage, vendors);
     }