diff --git a/hyp-admin/src/main/java/com/hyp/web/controller/reward/FileRelationController.java b/hyp-admin/src/main/java/com/hyp/web/controller/reward/FileRelationController.java index 5ce85dc..ae49951 100644 --- a/hyp-admin/src/main/java/com/hyp/web/controller/reward/FileRelationController.java +++ b/hyp-admin/src/main/java/com/hyp/web/controller/reward/FileRelationController.java @@ -64,6 +64,9 @@ public class FileRelationController extends BaseController { @RequestParam(required = false) String filename, @RequestParam String fileCode) { try { + if(file.isEmpty()){ + throw new ServiceException("上传文件不能为空"); + } // 上传文件路径 String filePath = HypConfig.getUploadPath(); // 上传并返回新文件名称