Browse Source

Merge branch 'master' of http://git.yaozhitech.com/yinli/yangguang

yufeng 3 years ago
parent
commit
70aa5858c1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/main/java/com/ylcm/sys/controller/AdTheatreController.java

+ 5 - 0
src/main/java/com/ylcm/sys/controller/AdTheatreController.java

@@ -188,6 +188,11 @@ public class AdTheatreController extends BaseController{
188 188
 			BaseExcelListener<AdTheatreExcelDTO> listener = new BaseExcelListener<>();
189 189
 			EasyExcel.read(excelfile.getInputStream(), AdTheatreExcelDTO.class,listener).sheet(1).doRead();
190 190
 			List<AdTheatreExcelDTO> dtos = listener.getDataList();
191
+			if(CollectionUtils.isEmpty(dtos)) {
192
+				request.setAttribute("code", Constants.CODE_FAIL);
193
+				request.setAttribute("msg", "表格数据为空!");
194
+				return "common/import_callback";
195
+			}
191 196
 			// 表格实际从第二行开始导入
192 197
 			int index = 2;
193 198
 			// 待入库