From ce353609f8682efaa4a4e6f62957f01ef5ef005b Mon Sep 17 00:00:00 2001
From: yijiusmile <253281376@qq.com>
Date: 星期四, 01 四月 2021 22:32:37 +0800
Subject: [PATCH] 附件查询部门修改为部门全称

---
 febs-common/febs-common-core/src/main/java/cc/mrbird/febs/common/core/utils/MyUtil.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/febs-common/febs-common-core/src/main/java/cc/mrbird/febs/common/core/utils/MyUtil.java b/febs-common/febs-common-core/src/main/java/cc/mrbird/febs/common/core/utils/MyUtil.java
index 944c378..e90d58b 100644
--- a/febs-common/febs-common-core/src/main/java/cc/mrbird/febs/common/core/utils/MyUtil.java
+++ b/febs-common/febs-common-core/src/main/java/cc/mrbird/febs/common/core/utils/MyUtil.java
@@ -108,8 +108,8 @@
         if (file.getSize() <= 0) {
             throw new FebsException("上传的文件大小需要大于0kb");
         }
-        if (file.getSize() > 50 * 1024* 1024) {
-            throw new FebsException("上传的文件大于50M");
+        if (file.getSize() > 200 * 1024* 1024) {
+            throw new FebsException("上传的文件大于200M");
         }
         if (!FileUtil.exist(uploadPpath)) {
             FileUtil.mkdir(uploadPpath);
@@ -117,9 +117,9 @@
         //原本名字
         String fileName = file.getOriginalFilename();
         String suffix = "";
-        if (fileName.indexOf(".") > 0) {
+        if (fileName.lastIndexOf(".") > 0) {
             //后缀
-            suffix = fileName.substring(fileName.indexOf("."), fileName.length());
+            suffix = fileName.substring(fileName.lastIndexOf("."));
         }
         //生成新的名字
         String newName = nextIdStr + suffix;

--
Gitblit v1.8.0