Commit 204601f84eae87dddfc512b2bd51bb1fdf4548a1
1 parent
4885c305
点播导出表格添加异常捕获
Showing
1 changed file
with
6 additions
and
4 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| ... | ... | @@ -370,8 +370,12 @@ public class VideosController extends BaseController { |
| 370 | 370 | if (spid == 0) { |
| 371 | 371 | videosDTO.setSpid(null); |
| 372 | 372 | } |
| 373 | - if (videosDTO.getSp_Id() != null && videosDTO.getSp_Id() != "") { | |
| 374 | - videosDTO.setSpid(Integer.valueOf(videosDTO.getSp_Id())); | |
| 373 | + if (videosDTO.getSp_Id() != null && !"".equals(videosDTO.getSp_Id())) { | |
| 374 | + try { | |
| 375 | + videosDTO.setSpid(Integer.valueOf(videosDTO.getSp_Id())); | |
| 376 | + } catch (NumberFormatException e) { | |
| 377 | + e.printStackTrace(); | |
| 378 | + } | |
| 375 | 379 | } |
| 376 | 380 | List<ShyVideos> shyVideosList = videosService.findByCondition(videosDTO); |
| 377 | 381 | String fileName = "点播数据"; |
| ... | ... | @@ -559,6 +563,4 @@ public class VideosController extends BaseController { |
| 559 | 563 | } |
| 560 | 564 | return responseBean; |
| 561 | 565 | } |
| 562 | - | |
| 563 | - | |
| 564 | 566 | } | ... | ... |