Pārlūkot izejas kodu

小程序抄送记录,我的已办已读状态添加limit 1,取消文章审批上传时文件名字的UUID,使用原名

xianwait 2 gadi atpakaļ
vecāks
revīzija
36916f67fb

+ 2 - 2
willalp-admin/src/main/resources/application-dev.yml

@@ -9,8 +9,8 @@ willalp:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/willalp/uploadPath,Linux配置 /home/willalp/uploadPath)
-  profile: /home/willalp/ml/uploadPath
-#  profile: D:/home/willalp/ml/uploadPath
+#  profile: /home/willalp/ml/uploadPath
+  profile: D:/home/willalp/ml/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证

+ 1 - 1
willalp-admin/src/main/resources/application.yml

@@ -21,7 +21,7 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-    active: dev
+    active: prod
   # 文件上传
   servlet:
     multipart:

+ 1 - 1
willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/HsFlowCcMapper.xml

@@ -68,7 +68,7 @@
         create_by,
         create_time,
         remark,
-        (SELECT msg_is_read FROM hs_app_user_msg where remark = hfc.task_id AND msg_is_read = '0') msg_is_read
+        (SELECT msg_is_read FROM hs_app_user_msg where remark = hfc.task_id AND msg_is_read = '0' limit 1) msg_is_read
         from hs_flow_cc hfc
         <where>
             is_delete = 0

+ 1 - 1
willalp-clocking-in/src/main/java/com/willalp/flow/mapper/xml/HsFlowTaskMapper.xml

@@ -91,7 +91,7 @@
         initiator,
         is_end,
         business_id,
-        (SELECT msg_is_read FROM hs_app_user_msg where remark = hft.id AND msg_is_read = '0') msg_is_read,
+        (SELECT msg_is_read FROM hs_app_user_msg where remark = hft.id AND msg_is_read = '0' limit 1) msg_is_read,
         hft.create_time
         FROM
         hs_flow_task hft

+ 3 - 4
willalp-common/src/main/java/com/willalp/common/utils/file/FileUploadUtils.java

@@ -7,7 +7,6 @@ import com.willalp.common.exception.file.FileSizeLimitExceededException;
 import com.willalp.common.exception.file.InvalidExtensionException;
 import com.willalp.common.utils.DateUtils;
 import com.willalp.common.utils.StringUtils;
-import com.willalp.common.utils.uuid.IdUtils;
 import org.apache.commons.io.FilenameUtils;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -116,8 +115,7 @@ public class FileUploadUtils {
 
         File desc = getAbsoluteFile(baseDir, fileName);
         file.transferTo(desc);
-        String pathFileName = getPathFileName(baseDir, fileName);
-        return pathFileName;
+        return getPathFileName(baseDir, fileName);
     }
 
     /**
@@ -126,7 +124,8 @@ public class FileUploadUtils {
     public static final String extractFilename(MultipartFile file) {
         String fileName = file.getOriginalFilename();
         String extension = getExtension(file);
-        fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
+//        fileName = DateUtils.datePath() + "/" + fileName + "." + extension;
+        fileName = DateUtils.datePath() + "/" + fileName;
         return fileName;
     }