CRM:修复 @RequestBody 和 Multipart 不能同时存在的异常和导入客户后序列化产生的异常

This commit is contained in:
YunaiV 2024-03-30 17:06:13 +08:00
parent 544d9030e6
commit a68abc43ae

View File

@ -289,7 +289,7 @@ public class CrmCustomerController {
@PostMapping("/import") @PostMapping("/import")
@Operation(summary = "导入客户") @Operation(summary = "导入客户")
@PreAuthorize("@ss.hasPermission('system:customer:import')") @PreAuthorize("@ss.hasPermission('system:customer:import')")
public CommonResult<CrmCustomerImportRespVO> importExcel(@Valid @RequestBody CrmCustomerImportReqVO importReqVO) public CommonResult<CrmCustomerImportRespVO> importExcel(@Valid CrmCustomerImportReqVO importReqVO)
throws Exception { throws Exception {
List<CrmCustomerImportExcelVO> list = ExcelUtils.read(importReqVO.getFile(), CrmCustomerImportExcelVO.class); List<CrmCustomerImportExcelVO> list = ExcelUtils.read(importReqVO.getFile(), CrmCustomerImportExcelVO.class);
return success(customerService.importCustomerList(list, importReqVO)); return success(customerService.importCustomerList(list, importReqVO));