Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master_huangjunjie'

13660505945 1 mēnesi atpakaļ
vecāks
revīzija
fe17ec51b5

+ 4 - 2
src/main/java/com/jsh/erp/controller/SystemConfigController.java

@@ -230,6 +230,7 @@ public class SystemConfigController extends BaseController {
     public void view(HttpServletRequest request, HttpServletResponse response) {
     public void view(HttpServletRequest request, HttpServletResponse response) {
         // ISO-8859-1 ==> UTF-8 进行编码转换
         // ISO-8859-1 ==> UTF-8 进行编码转换
         String imgPath = extractPathFromPattern(request);
         String imgPath = extractPathFromPattern(request);
+        imgPath = imgPath.replace("https:/","https://");
         if(StringUtil.isEmpty(imgPath) || imgPath=="null"){
         if(StringUtil.isEmpty(imgPath) || imgPath=="null"){
             return;
             return;
         }
         }
@@ -246,7 +247,8 @@ public class SystemConfigController extends BaseController {
                 fileUrl = systemConfigService.getFileUrlLocal(imgPath);
                 fileUrl = systemConfigService.getFileUrlLocal(imgPath);
                 inputStream = new BufferedInputStream(new FileInputStream(fileUrl));
                 inputStream = new BufferedInputStream(new FileInputStream(fileUrl));
             } else if(fileUploadType == 2) {
             } else if(fileUploadType == 2) {
-                fileUrl = systemConfigService.getFileUrlAliOss(imgPath);
+                //fileUrl = systemConfigService.getFileUrlAliOss(imgPath);
+                fileUrl = imgPath;
                 URL url = new URL(fileUrl);
                 URL url = new URL(fileUrl);
                 HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                 HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                 conn.setRequestMethod("GET");
                 conn.setRequestMethod("GET");
@@ -365,6 +367,6 @@ public class SystemConfigController extends BaseController {
     private static String extractPathFromPattern(final HttpServletRequest request) {
     private static String extractPathFromPattern(final HttpServletRequest request) {
         String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
         String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
         String bestMatchPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
         String bestMatchPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
-        return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path);
+        return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path).substring(6);
     }
     }
 }
 }