liurunyu
2024-08-05 31cde7475c41aa9dbcc6d282ca3d92a07bd37bef
优化代码
2个文件已修改
21 ■■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/global/WebFileCtrl.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-file/src/main/java/com/dy/dyFile/download/DownloadFileCtrl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/global/WebFileCtrl.java
@@ -25,7 +25,6 @@
@Slf4j
@RestController
@RequestMapping(path="webFile")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked"
public class WebFileCtrl {
    @Autowired
@@ -42,8 +41,8 @@
    /**
     * 上传照片图片文件 (当前只对png jpg格式图片支持缩略图)
     * @param file
     * @return
     * @param file web端上传文件的post对象
     * @return 返回结果
     */
    @PostMapping("/upPhoto")
    @SsoPowerAop(power = "-1") //登录与权限同时验证
@@ -88,8 +87,8 @@
    /**
     * 上传录音音频文件
     * @param file
     * @return
     * @param file web端上传文件的post对象
     * @return 返回结果
     */
    @PostMapping("/upPhone")
    @SsoPowerAop(power = "-1")
@@ -134,8 +133,8 @@
    /**
     * 上传录像视频文件
     * @param file
     * @return
     * @param file web端上传文件的post对象
     * @return 返回结果
     */
    @PostMapping("/upVideo")
    @SsoPowerAop(power = "-1")
@@ -180,8 +179,8 @@
    /**
     * 上传文档文件
     * @param file
     * @return
     * @param file web端上传文件的post对象
     * @return 返回结果
     */
    @PostMapping("/upDocument")
    @SsoPowerAop(power = "-1")
@@ -234,7 +233,7 @@
     * @param newName 文件新名称
     * @param hash  文件新名称的哈希值
     * @param filePath 文件服务端存储相对路径
     * @return
     * @return 数据记录主键
     */
    private Long saveFileInfo(String orgName, String extName, String newName, Integer hash, String filePath){
        OthFile po = new OthFile() ;
pms-parent/pms-web-file/src/main/java/com/dy/dyFile/download/DownloadFileCtrl.java
@@ -1,6 +1,5 @@
package com.dy.dyFile.download;
import cn.hutool.http.server.HttpServerResponse;
import com.dy.pmsGlobal.dyFile.FileOperate;
import com.dy.pmsGlobal.dyFile.FileRestVo;
import com.dy.pmsGlobal.pojoOth.OthFile;
@@ -11,7 +10,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;