lyhzzz 1 년 전
부모
커밋
f3093662a7
2개의 변경된 파일12개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 6
      src/main/java/com/cdf/controller/api/BrandApiController.java
  2. 11 1
      src/main/java/com/cdf/controller/back/BrandController.java

+ 1 - 6
src/main/java/com/cdf/controller/api/BrandApiController.java

@@ -16,8 +16,6 @@ public class BrandApiController {
 
     @Autowired
     IBrandService brandService;
-    @Autowired
-    ExcelService excelService;
 
 
     @PostMapping("/list")
@@ -25,8 +23,5 @@ public class BrandApiController {
         return ResultData.ok(brandService.pageList(param));
     }
 
-    @GetMapping("/downBrandExcel")
-    public void downBrandExcel(HttpServletRequest request, HttpServletResponse response) throws Exception {
-        excelService.downBrandExcel(request,response);
-    }
+
 }

+ 11 - 1
src/main/java/com/cdf/controller/back/BrandController.java

@@ -7,9 +7,13 @@ import com.cdf.common.ResultData;
 import com.cdf.entity.Brand;
 import com.cdf.request.BaseRequest;
 import com.cdf.service.IBrandService;
+import com.cdf.service.impl.ExcelService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 /**
  * <p>
  *  前端控制器
@@ -24,7 +28,8 @@ public class BrandController {
 
     @Autowired
     IBrandService brandService;
-
+    @Autowired
+    ExcelService excelService;
 
     @PostMapping("/list")
     public ResultData list(@RequestBody BaseRequest param){
@@ -46,5 +51,10 @@ public class BrandController {
         }.run();
         return ResultData.ok();
     }
+
+    @GetMapping("/downBrandExcel")
+    public void downBrandExcel(HttpServletRequest request, HttpServletResponse response) throws Exception {
+        excelService.downBrandExcel(request,response);
+    }
 }