|
@@ -48,10 +48,12 @@ public class TestController {
|
|
|
public ResultData getProductById(@RequestParam(required = false) String productId){
|
|
|
return ResultData.ok(cdfClient.getProductById(productId));
|
|
|
}
|
|
|
+
|
|
|
@RequestMapping("/test/getProductList")
|
|
|
public ResultData getProductList(@RequestBody CdfProductListRequest param){
|
|
|
return ResultData.ok(cdfClient.getProductList(param));
|
|
|
}
|
|
|
+
|
|
|
@RequestMapping("/test/getCatNum")
|
|
|
public ResultData getCatNum(@RequestParam(required = false) String accessToken){
|
|
|
return ResultData.ok(cdfClient.getCatNum(accessToken));
|
|
@@ -82,6 +84,7 @@ public class TestController {
|
|
|
this.commonExport(request,response,"店铺列表",list,ShopVo.class);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
@PostMapping("uploadExcel")
|
|
|
public ResultData uploadExcel(@RequestParam(required = false) MultipartFile file) throws IOException {
|
|
|
List<HashMap<Integer, String>> excelRowList = ExcelUtil.getExcelRowList(file);
|
|
@@ -96,7 +99,6 @@ public class TestController {
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public void commonExport(HttpServletRequest request, HttpServletResponse response, String name, List<?> result, Class<?> clazz) throws Exception {
|
|
|
response.setContentType("application/vnd.ms-excel");
|
|
|
response.setCharacterEncoding("utf-8");
|