ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -18,10 +18,12 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
 * 通用请求处理
 *
 *
 * @author ruoyi
 */
@RestController
@@ -34,7 +36,7 @@
    /**
     * 通用下载请求
     *
     *
     * @param fileName 文件名称
     * @param delete 是否删除
     */
@@ -52,10 +54,10 @@
            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
            FileUtils.setAttachmentResponseHeader(response, realFileName);
            FileUtils.writeBytes(filePath, response.getOutputStream());
         FileUtils.writeToStream(filePath, response.getOutputStream());
            if (delete)
            {
                FileUtils.deleteFile(filePath);
            FileUtils.del(filePath);
            }
        }
        catch (Exception e)
@@ -77,10 +79,10 @@
            // 上传并返回新文件名称
            String fileName = FileUploadUtils.upload(filePath, file);
            String url = serverConfig.getUrl() + fileName;
            AjaxResult ajax = AjaxResult.success();
         Map<String,Object> ajax = new HashMap<>();
            ajax.put("fileName", fileName);
            ajax.put("url", url);
            return ajax;
            return AjaxResult.success(ajax);
        }
        catch (Exception e)
        {
@@ -109,7 +111,7 @@
            String downloadName = StrUtil.subAfter(downloadPath, "/",true);
            response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
            FileUtils.setAttachmentResponseHeader(response, downloadName);
            FileUtils.writeBytes(downloadPath, response.getOutputStream());
            FileUtils.writeToStream(downloadPath, response.getOutputStream());
        }
        catch (Exception e)
        {