|
@@ -601,9 +601,11 @@ public class WorkFullManageController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 下载附件
|
|
|
+ * @param file
|
|
|
+ * @param response
|
|
|
+ * @param bucketName
|
|
|
*/
|
|
|
- @RequestMapping("/downLoadAttach")
|
|
|
- public String downLoadAttach(String file,HttpServletResponse response) throws IOException {
|
|
|
+ public void downLoadFile(String file,HttpServletResponse response,String bucketName) {
|
|
|
file = file.replace("amp;","");
|
|
|
String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
|
|
|
String aliyunUrl = Global.getAliyunUrl();
|
|
@@ -621,7 +623,33 @@ public class WorkFullManageController extends BaseController {
|
|
|
logger.info("fileName="+fileName);
|
|
|
logger.info("key="+key);
|
|
|
logger.info("-----------------------------------------");
|
|
|
- new OSSClientUtil().downByStream(key,fileName,response,request.getHeader("USER-AGENT"));
|
|
|
+ new OSSClientUtil().downByStream(key,fileName,response,request.getHeader("USER-AGENT"),bucketName);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 下载附件
|
|
|
+ * @param file
|
|
|
+ * @param response
|
|
|
+ * @param belongProject 所属系统
|
|
|
+ * @return
|
|
|
+ * @throws IOException
|
|
|
+ */
|
|
|
+ @RequestMapping("/downLoadAttachOtherService")
|
|
|
+ public void downLoadAttach(String file,HttpServletResponse response,String belongProject) throws IOException {
|
|
|
+ String bucketName = "";
|
|
|
+ if ("cpa".equals(belongProject)) {
|
|
|
+ bucketName = "xgxm-test";
|
|
|
+ }
|
|
|
+ file = "http://oss.gangwaninfo.com" + file;
|
|
|
+ downLoadFile(file,response,bucketName);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 下载附件
|
|
|
+ */
|
|
|
+ @RequestMapping("/downLoadAttach")
|
|
|
+ public String downLoadAttach(String file,HttpServletResponse response) throws IOException {
|
|
|
+ downLoadFile(file,response,null);
|
|
|
return null;
|
|
|
/*OutputStream out = null;
|
|
|
InputStream in = null;
|