Bläddra i källkod

Merge branch 'liweifan-220629' into saas

liweifan 3 år sedan
förälder
incheckning
4fca9b1bbe

+ 3 - 3
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -2830,8 +2830,8 @@ public class ExportController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('export/exportBuyFreeLiveTheoryCourseList')")
     public void exportBuyFreeLiveTheoryCourseList(TempBuyFreeLiveTheoryCourse tempBuyFreeLiveTheoryCourse, HttpServletResponse response) throws IOException {
         List<TempBuyFreeLiveTheoryCourse> list = tempBuyFreeLiveTheoryCourseDao.list(tempBuyFreeLiveTheoryCourse);
-        if (list.size() <= 0) {
-            return;
+        if (CollectionUtils.isEmpty(list)) {
+            throw new BizException("没有可导出的记录");
         }
 
         list.stream().forEach(o -> {
@@ -2879,7 +2879,7 @@ public class ExportController extends BaseController {
     public void exportMusicScoreList(SysExamSongQueryInfo queryInfo, HttpServletResponse response) throws IOException {
         List<SysMusicScore> list = sysMusicScoreService.queryMusicScoreAll(queryInfo);
         if (CollectionUtils.isEmpty(list)) {
-            return;
+            throw new BizException("没有可导出的记录");
         }
 
         list.stream().forEach(o -> {