diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java index 4d12498a0..6786e76ff 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/oss/service/impl/OSSFileServiceImpl.java @@ -111,6 +111,16 @@ public class OSSFileServiceImpl extends ServiceImpl impl throw new JeroBootException("Only upload pdf,word,excel type of file Please select the file again!"); } } + } else if ("2".equals(state)) { + String fileTypeStrTwo = ".doc,.DOC,.docx,.DOCX,.xls, .XLS,.xlsx,.XLSX"; + //固定文件 + if (!fileTypeStrTwo.contains(fileType)) { + if (cut.equals(CutEnum.CN.getValue())) { + throw new JeroBootException("只能够上传word,excel类型的文件。请重新选择文件!"); + } else { + throw new JeroBootException("Only upload word,excel type of file Please select the file again!"); + } + } } else { if (CommonUtils.limitFileSuffix(orgName, fileSuffixLimits)) { if (cut.equals(CutEnum.CN.getValue())) {