FengChaoYu hai 1 mes
pai
achega
f1bedc690e

+ 1 - 1
src/main/java/com/gree/mall/manager/controller/member/MemberController.java

@@ -126,7 +126,7 @@ public class MemberController {
     @ApiOperation(value = "内部人员批量设置模板")
     public ResponseHelper downLoadUserInnerTimplate(HttpServletResponse response)
             throws RemoteServiceException, IOException {
-        CommonUtils.downloadFile("/static/用户批量设置内部人员模板.xlsx",response);
+        CommonUtils.downloadFile("用户批量设置内部人员模板.xlsx",response);
         return ResponseHelper.success();
     }
 

+ 1 - 11
src/main/java/com/gree/mall/manager/controller/order/OrderController.java

@@ -7,13 +7,11 @@ import com.github.binarywang.wxpay.exception.WxPayException;
 import com.gree.mall.manager.bean.order.BatchRemarkBean;
 import com.gree.mall.manager.bean.order.OrderDetailBean;
 import com.gree.mall.manager.bean.order.WorkerOrderInfo;
-import com.gree.mall.manager.commonmapper.CustomWebsitMapper;
 import com.gree.mall.manager.constant.Constant;
 import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.helper.ResponseHelper;
 import com.gree.mall.manager.logic.common.GongdanLogic;
 import com.gree.mall.manager.logic.order.OrderLogic;
-import com.gree.mall.manager.plus.entity.CarouselMap;
 import com.gree.mall.manager.plus.entity.OrderInfo;
 import com.gree.mall.manager.plus.entity.OrderRefundCliaims;
 import com.gree.mall.manager.utils.CommonUtils;
@@ -22,21 +20,13 @@ import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.ByteArrayResource;
-import org.springframework.core.io.InputStreamResource;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
 import org.springframework.integration.redis.util.RedisLockRegistry;
 import org.springframework.web.bind.annotation.*;
-
-import org.springframework.core.io.Resource;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
-import java.io.OutputStream;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
@@ -249,7 +239,7 @@ public class OrderController {
     public void excelDownload(
             HttpServletResponse response
     ) throws RemoteServiceException, IOException {
-        CommonUtils.downloadFile("/static/批量发货模板.xlsx", response);
+        CommonUtils.downloadFile("批量发货模板.xlsx", response);
     }
 
 

+ 1 - 1
src/main/java/com/gree/mall/manager/utils/CommonUtils.java

@@ -179,7 +179,7 @@ public class CommonUtils {
 
 
     public static void downloadFile(String fileName, HttpServletResponse response) throws IOException {
-        InputStream inputStream = CommonUtils.class.getResourceAsStream(fileName);
+        InputStream inputStream = CommonUtils.class.getResourceAsStream("/template/" + fileName);
         response.setContentType("Content-Type:application/octet-stream");
         response.setHeader("Content-disposition", "attachment; filename=" + URLEncoder.encode(fileName, "UTF-8"));
         OutputStream outputStream = response.getOutputStream();