From 14a1d7b4f7da211a333f997d8ec5a31bfeb82f2c Mon Sep 17 00:00:00 2001
From: yz_08 <yz_0812@outlook.com>
Date: 星期二, 30 三月 2021 12:18:14 +0800
Subject: [PATCH] fix(hr微服务): 修改bug

---
 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