|
@@ -1,12 +1,12 @@
|
|
|
-package com.ruoyi.web.controller.dragForm;
|
|
|
+package com.zkqy.web.controller.dragForm;
|
|
|
|
|
|
-import com.ruoyi.common.config.RuoYiConfig;
|
|
|
-import com.ruoyi.common.constant.Constants;
|
|
|
-import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
-import com.ruoyi.common.utils.StringUtils;
|
|
|
-import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
|
-import com.ruoyi.common.utils.file.FileUtils;
|
|
|
-import com.ruoyi.framework.config.ServerConfig;
|
|
|
+import com.zkqy.common.config.ZkqyConfig;
|
|
|
+import com.zkqy.common.constant.Constants;
|
|
|
+import com.zkqy.common.core.domain.AjaxResult;
|
|
|
+import com.zkqy.common.utils.StringUtils;
|
|
|
+import com.zkqy.common.utils.file.FileUploadUtils;
|
|
|
+import com.zkqy.common.utils.file.FileUtils;
|
|
|
+import com.zkqy.framework.config.ServerConfig;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -19,7 +19,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
-import static com.ruoyi.common.core.domain.AjaxResult.success;
|
|
|
+import static com.zkqy.common.core.domain.AjaxResult.success;
|
|
|
|
|
|
/**
|
|
|
* 通用请求处理
|
|
@@ -51,7 +51,7 @@ public class CommonFileController {
|
|
|
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
|
|
|
}
|
|
|
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
|
|
|
- String filePath = RuoYiConfig.getDownloadPath() + fileName;
|
|
|
+ String filePath = ZkqyConfig.getDownloadPath() + fileName;
|
|
|
|
|
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
|
|
FileUtils.setAttachmentResponseHeader(response, realFileName);
|
|
@@ -71,7 +71,7 @@ public class CommonFileController {
|
|
|
public AjaxResult uploadFile(MultipartFile file) throws Exception {
|
|
|
try {
|
|
|
// 上传文件路径
|
|
|
- String filePath = RuoYiConfig.getUploadPath();
|
|
|
+ String filePath = ZkqyConfig.getUploadPath();
|
|
|
// 上传并返回新文件名称
|
|
|
String fileName = FileUploadUtils.upload(filePath, file);
|
|
|
String url = serverConfig.getUrl() + fileName;
|
|
@@ -93,7 +93,7 @@ public class CommonFileController {
|
|
|
public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception {
|
|
|
try {
|
|
|
// 上传文件路径
|
|
|
- String filePath = RuoYiConfig.getUploadPath();
|
|
|
+ String filePath = ZkqyConfig.getUploadPath();
|
|
|
List<String> urls = new ArrayList<String>();
|
|
|
List<String> fileNames = new ArrayList<String>();
|
|
|
List<String> newFileNames = new ArrayList<String>();
|
|
@@ -129,7 +129,7 @@ public class CommonFileController {
|
|
|
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
|
|
|
}
|
|
|
// 本地资源路径
|
|
|
- String localPath = RuoYiConfig.getProfile();
|
|
|
+ String localPath = ZkqyConfig.getProfile();
|
|
|
// 数据库资源地址
|
|
|
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
|
|
|
// 下载名称
|