فهرست منبع

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

hejq 7 سال پیش
والد
کامیت
bd0927a0df
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      src/main/java/com/uas/platform/b2b/service/impl/VendorsServiceImpl.java

+ 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);
     }