Browse Source

文件附件更新路径注释掉,这个在本地操作

hejq 8 years ago
parent
commit
399f945070
1 changed files with 10 additions and 16 deletions
  1. 10 16
      src/main/java/com/uas/platform/b2b/controller/FileController.java

+ 10 - 16
src/main/java/com/uas/platform/b2b/controller/FileController.java

@@ -92,16 +92,16 @@ public class FileController {
      *
      * @return
      */
-	@RequestMapping(value = "/refreshPath", method = RequestMethod.GET)
-    public ModelMap refreshpath() throws IOException {
-	    ModelMap map = new ModelMap();
-	    List<Long> successIds = new ArrayList<Long>();
-        List<Long> failedIds = new ArrayList<Long>();
-        convertPath(successIds, failedIds);
-        map.put("successIds", successIds);
-        map.put("failedIds", failedIds);
-        return map;
-    }
+//	@RequestMapping(value = "/refreshPath", method = RequestMethod.GET)
+//    public ModelMap refreshpath() throws IOException {
+//	    ModelMap map = new ModelMap();
+//	    List<Long> successIds = new ArrayList<Long>();
+//        List<Long> failedIds = new ArrayList<Long>();
+//        convertPath(successIds, failedIds);
+//        map.put("successIds", successIds);
+//        map.put("failedIds", failedIds);
+//        return map;
+//    }
 
     /**
      * 递归更新所有附件信息
@@ -130,11 +130,6 @@ public class FileController {
                         }
                         in.close();
                         path = fileClient.upload(outStream.toByteArray(), attach.getSize(), name, null);
-//                        FileUploadHttp.Response response = FileUploadHttp.upload(null, filePath, null);
-//                        if (response.getStatusCode() == 200) {
-//                            JSONObject obj = JSONObject.parseObject(response.getResponseText());
-//                            if(obj.get("path").toString() != null) path = obj.get("path").toString();
-//                        }
                     } catch (IOException e) {
                         failedIds.add(attach.getId());
                     } catch (Exception e) {
@@ -178,7 +173,6 @@ public class FileController {
         in.close();
         byte[] imgByte = output.toByteArray();
         path = fileClient.upload(imgByte, 373760, "jpg", null);
-//      return URLDecoder.decode(Base64.toBase64String(imgByte), "UTF-8");
         return path;
     }