소스 검색

修改docker文件上传路径

lamphua 3 달 전
부모
커밋
293e56fc17

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesAchievementController.java 파일 보기

@@ -215,10 +215,10 @@ public class FilesAchievementController extends BaseController
215 215
     private boolean uploadKmlFile(FilesAchievement filesAchievement, MultipartFile uploadKmlFile) throws IOException {
216 216
         if (uploadKmlFile != null) {
217 217
             if (!uploadKmlFile.isEmpty()) {
218
-                File profilePath = new File(profile);
218
+                File profilePath = new File(profile + "/upload/uploadKmlFiles/");
219 219
                 if (!profilePath.exists())//若此目录不存在,则创建之
220 220
                     profilePath.mkdirs();
221
-                File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadKmlFile.getOriginalFilename());
221
+                File transferFile = new File( profilePath + "/" + uploadKmlFile.getOriginalFilename());
222 222
                 if (!transferFile.exists())
223 223
                     uploadKmlFile.transferTo(transferFile);
224 224
                 filesAchievement.setKmlUrl("/uploadKmlFiles/" + transferFile.getName());

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java 파일 보기

@@ -152,10 +152,10 @@ public class FilesProjectController extends BaseController {
152 152
     private boolean uploadProjectKmlFile(CmcProject cmcProject, MultipartFile uploadProjectKmlFile) throws IOException {
153 153
         if (uploadProjectKmlFile != null) {
154 154
             if (!uploadProjectKmlFile.isEmpty()) {
155
-                File profilePath = new File(profile);
155
+                File profilePath = new File(profile + "/upload/uploadKmlFiles");
156 156
                 if (!profilePath.exists())//若此目录不存在,则创建之
157 157
                     profilePath.mkdirs();
158
-                File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadProjectKmlFile.getOriginalFilename());
158
+                File transferFile = new File( profilePath + "/" + uploadProjectKmlFile.getOriginalFilename());
159 159
                 if (!transferFile.exists())
160 160
                     uploadProjectKmlFile.transferTo(transferFile);
161 161
                 cmcProject.setProjectKml("/uploadKmlFiles/" + transferFile.getName());

+ 1
- 0
oa-back/ruoyi-system/src/main/resources/mapper/file/FilesAchievementMapper.xml 파일 보기

@@ -117,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
117 117
             <if test="dataYear != null">#{dataYear},</if>
118 118
             <if test="scaleGrade != null">#{scaleGrade},</if>
119 119
             <if test="resultType != null">#{resultType},</if>
120
+            <if test="fileType != null">#{fileType},</if>
120 121
             #{kmlUrl},
121 122
             <if test="kmlLng != null">#{kmlLng},</if>
122 123
             <if test="kmlLat != null">#{kmlLat},</if>

Loading…
취소
저장