Browse Source

fix empty list issue

albertshaw 7 years ago
parent
commit
a5c4b9a58e

+ 5 - 0
src/main/java/com/goafanti/report/service/SalesReportServiceImpl.java

@@ -89,6 +89,11 @@ public class SalesReportServiceImpl extends BaseMybatisDao<DailySalesReportMappe
 					SalesReportOrderField.AnnuallyOrderAmount.getCode(), depName, name, position);
 			break;
 		}
+
+		if (list.isEmpty()) {
+			return list;
+		}
+
 		Map<String, PersonalSalesReportBO> map = new HashMap<>();
 		List<String> ids = list.stream().map(item -> {
 			map.put(item.getId(), item);