feat (farm): 租户导入/出

-
This commit is contained in:
达富斌
2025-10-23 19:28:05 +08:00
parent 23333fb21b
commit f0a3c07dd0

View File

@@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.farm.controller.admin.managementcenter.baseinfo; package cn.iocoder.yudao.module.farm.controller.admin.managementcenter.baseinfo;
import cn.iocoder.yudao.module.farm.controller.admin.managementcenter.baseinfo.vo.*; import cn.iocoder.yudao.module.farm.controller.admin.managementcenter.baseinfo.vo.*;
import io.swagger.v3.oas.annotations.Parameters;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
@@ -116,7 +117,9 @@ public class PlotInfoController {
@PostMapping("/plot-lessee/import-excel") @PostMapping("/plot-lessee/import-excel")
@Operation(summary = "导入户主 Excel") @Operation(summary = "导入户主 Excel")
@ApiAccessLog(operateType = IMPORT) @Parameters({
@Parameter(name = "file", description = "Excel 文件", required = true),
})
public CommonResult<Boolean> importPlotLesseeInfoExcel(@RequestParam("file") MultipartFile file) throws IOException { public CommonResult<Boolean> importPlotLesseeInfoExcel(@RequestParam("file") MultipartFile file) throws IOException {
List<PlotLesseeForImportExcelRespVO> list = ExcelUtils.read(file, PlotLesseeForImportExcelRespVO.class); List<PlotLesseeForImportExcelRespVO> list = ExcelUtils.read(file, PlotLesseeForImportExcelRespVO.class);
plotInfoService.setPlotLesseeInfo(list); plotInfoService.setPlotLesseeInfo(list);