From c14492af9efe929e40eb9d32d6648eddca32b703 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期三, 30 十月 2019 21:46:08 +0800
Subject: [PATCH] 缴费清单开发完成

---
 WebService/src/main/java/com/java110/web/smo/file/impl/GetFileSMOImpl.java |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/WebService/src/main/java/com/java110/web/smo/file/impl/GetFileSMOImpl.java b/WebService/src/main/java/com/java110/web/smo/file/impl/GetFileSMOImpl.java
index c54ea58..d0a0b70 100644
--- a/WebService/src/main/java/com/java110/web/smo/file/impl/GetFileSMOImpl.java
+++ b/WebService/src/main/java/com/java110/web/smo/file/impl/GetFileSMOImpl.java
@@ -9,8 +9,7 @@
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.Base64Convert;
 import com.java110.utils.util.BeanConvertUtil;
-import com.java110.web.core.AbstractComponentSMO;
-import com.java110.web.core.BaseComponentSMO;
+import com.java110.core.component.BaseComponentSMO;
 import com.java110.web.smo.file.IGetFileSMO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpHeaders;
@@ -37,8 +36,6 @@
     public ResponseEntity<Object> getFile(IPageData pd) throws SMOException,IOException {
         JSONObject paramIn = JSONObject.parseObject(pd.getReqData());
 
-        super.validatePageInfo(pd);
-
         Assert.hasKeyAndValue(paramIn, "communityId", "璇锋眰鎶ユ枃涓湭鍖呭惈灏忓尯ID");
         Assert.hasKeyAndValue(paramIn, "fileId", "璇锋眰鎶ユ枃涓湭鍖呭惈鏂囦欢ID");
 
@@ -49,7 +46,7 @@
         Map paramMap = BeanConvertUtil.beanCovertMap(result);
         paramIn.putAll(paramMap);
 
-        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/file.getFile";
+        String apiUrl = ServiceConstant.SERVICE_API_URL + "/api/file.getFile"+mapToUrlParam(paramIn);
 
 
         ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
@@ -68,7 +65,8 @@
         } else {
             headers.add("content-type", "application/octet-stream");
         }
-        headers.add("Content-Disposition", "attachment; filename=" + outParam.getString("fileName"));
+        //headers.add("Content-Disposition", "attachment; filename=" + outParam.getString("fileName"));
+        headers.add("Accept-Ranges", "bytes");
 
         byte[] context = Base64Convert.base64ToByte(outParam.getString("context"));
 

--
Gitblit v1.8.0