feat(修改-bug): 修改一些bug

Signed-off-by: bunny <1319900154@qq.com>
This commit is contained in:
bunny 2024-03-27 10:23:17 +08:00
parent ce9ccd4fd9
commit 793030157f
2 changed files with 2 additions and 3 deletions

View File

@ -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 = "导入功能")

View File

@ -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();