feat(修改-bug): 修改一些bug
Signed-off-by: bunny <1319900154@qq.com>
This commit is contained in:
parent
ce9ccd4fd9
commit
793030157f
|
@ -30,9 +30,8 @@ public class CategoryController {
|
||||||
|
|
||||||
@Operation(summary = "导出数据", description = "导出数据")
|
@Operation(summary = "导出数据", description = "导出数据")
|
||||||
@GetMapping(value = "/exportData")
|
@GetMapping(value = "/exportData")
|
||||||
public Result<String> exportData(HttpServletResponse response) {
|
public void exportData(HttpServletResponse response) {
|
||||||
categoryService.exportData(response);
|
categoryService.exportData(response);
|
||||||
return Result.success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "导入功能", description = "导入功能")
|
@Operation(summary = "导入功能", description = "导入功能")
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class CategoryServiceImpl implements CategoryService {
|
||||||
response.setCharacterEncoding("utf-8");
|
response.setCharacterEncoding("utf-8");
|
||||||
|
|
||||||
String filename = URLEncoder.encode("分类数据", StandardCharsets.UTF_8);
|
String filename = URLEncoder.encode("分类数据", StandardCharsets.UTF_8);
|
||||||
response.setHeader("Content-dispostion", "attachment;filename=" + filename + ".xlsx");
|
response.setHeader("Content-disposition", "attachment;filename=" + filename + ".xlsx");
|
||||||
|
|
||||||
// 查询数据库中的数据
|
// 查询数据库中的数据
|
||||||
List<Category> categoryList = categoryMapper.selectAll();
|
List<Category> categoryList = categoryMapper.selectAll();
|
||||||
|
|
Loading…
Reference in New Issue