|
@@ -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);
|
|
|
+ }
|
|
|
}
|
|
|
|