合同,员工,客诉,咨询,资产档案新增批量删除功能

new
parent 35a67cb27e
commit 40c6c6f272

@ -56,7 +56,7 @@ public class ElectronicAssetsController {
@Operation(summary = "删除资产档案") @Operation(summary = "删除资产档案")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('ea:electronic:delete')") @PreAuthorize("@ss.hasPermission('ea:electronic:delete')")
public CommonResult<Boolean> deleteElectronicAssets(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteElectronicAssets(@RequestParam("id") Long[] id) {
electronicAssetsService.deleteElectronicAssets(id); electronicAssetsService.deleteElectronicAssets(id);
return success(true); return success(true);
} }

@ -56,7 +56,7 @@ public class ElectronicConsultationController {
@Operation(summary = "删除咨询档案") @Operation(summary = "删除咨询档案")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('ea:electronic-consultation:delete')") @PreAuthorize("@ss.hasPermission('ea:electronic-consultation:delete')")
public CommonResult<Boolean> deleteElectronicConsultation(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteElectronicConsultation(@RequestParam("id") Long[] id) {
electronicConsultationService.deleteElectronicConsultation(id); electronicConsultationService.deleteElectronicConsultation(id);
return success(true); return success(true);
} }

@ -56,7 +56,7 @@ public class ElectronicContractsController {
@Operation(summary = "删除合同档案") @Operation(summary = "删除合同档案")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('ea:electronic-contracts:delete')") @PreAuthorize("@ss.hasPermission('ea:electronic-contracts:delete')")
public CommonResult<Boolean> deleteElectronicContracts(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteElectronicContracts(@RequestParam("id") Long[] id) {
electronicContractsService.deleteElectronicContracts(id); electronicContractsService.deleteElectronicContracts(id);
return success(true); return success(true);
} }

@ -56,7 +56,7 @@ public class ElectronicCustomerComplaintController {
@Operation(summary = "删除客诉档案") @Operation(summary = "删除客诉档案")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:delete')") @PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:delete')")
public CommonResult<Boolean> deleteElectronicCustomerComplaint(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteElectronicCustomerComplaint(@RequestParam("id") Long[] id) {
electronicCustomerComplaintService.deleteElectronicCustomerComplaint(id); electronicCustomerComplaintService.deleteElectronicCustomerComplaint(id);
return success(true); return success(true);
} }

@ -53,7 +53,7 @@ public class ElectronicEmployeeController {
@Operation(summary = "删除员工档案") @Operation(summary = "删除员工档案")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('ea:electronic-employee:delete')") @PreAuthorize("@ss.hasPermission('ea:electronic-employee:delete')")
public CommonResult<Boolean> deleteElectronicEmployee(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteElectronicEmployee(@RequestParam("id") Long[] id) {
electronicEmployeeService.deleteElectronicEmployee(id); electronicEmployeeService.deleteElectronicEmployee(id);
return success(true); return success(true);
} }

@ -56,7 +56,7 @@ public class ElectronicOtherController {
@Operation(summary = "删除其他档案") @Operation(summary = "删除其他档案")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('ea:electronic-other:delete')") @PreAuthorize("@ss.hasPermission('ea:electronic-other:delete')")
public CommonResult<Boolean> deleteElectronicOther(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteElectronicOther(@RequestParam("id") Long[] id) {
electronicOtherService.deleteElectronicOther(id); electronicOtherService.deleteElectronicOther(id);
return success(true); return success(true);
} }

@ -33,7 +33,7 @@ public interface ElectronicAssetsService {
* *
* @param id * @param id
*/ */
void deleteElectronicAssets(Long id); void deleteElectronicAssets(Long[] id);
/** /**
* *

@ -98,11 +98,10 @@ public class ElectronicAssetsServiceImpl implements ElectronicAssetsService {
} }
@Override @Override
public void deleteElectronicAssets(Long id) { public void deleteElectronicAssets(Long[] id) {
// 校验存在
validateElectronicAssetsExists(id);
// 删除 // 删除
electronicAssetsMapper.deleteById(id); ArrayList<Long> listId = new ArrayList(Arrays.asList(id)) ;
electronicAssetsMapper.deleteBatchIds(listId);
} }
private void validateElectronicAssetsExists(Long id) { private void validateElectronicAssetsExists(Long id) {

@ -33,7 +33,7 @@ public interface ElectronicConsultationService {
* *
* @param id * @param id
*/ */
void deleteElectronicConsultation(Long id); void deleteElectronicConsultation(Long[] id);
/** /**
* *

@ -97,11 +97,10 @@ public class ElectronicConsultationServiceImpl implements ElectronicConsultation
} }
@Override @Override
public void deleteElectronicConsultation(Long id) { public void deleteElectronicConsultation(Long[] id) {
// 校验存在
validateElectronicConsultationExists(id);
// 删除 // 删除
electronicConsultationMapper.deleteById(id); ArrayList<Long> listId = new ArrayList(Arrays.asList(id)) ;
electronicConsultationMapper.deleteBatchIds(listId);
} }
private void validateElectronicConsultationExists(Long id) { private void validateElectronicConsultationExists(Long id) {

@ -33,7 +33,7 @@ public interface ElectronicContractsService {
* *
* @param id * @param id
*/ */
void deleteElectronicContracts(Long id); void deleteElectronicContracts(Long[] id);
/** /**
* *

@ -97,11 +97,10 @@ public class ElectronicContractsServiceImpl implements ElectronicContractsServic
} }
@Override @Override
public void deleteElectronicContracts(Long id) { public void deleteElectronicContracts(Long[] id) {
// 校验存在
validateElectronicContractsExists(id);
// 删除 // 删除
electronicContractsMapper.deleteById(id); ArrayList<Long> listId = new ArrayList(Arrays.asList(id)) ;
electronicContractsMapper.deleteBatchIds(listId);
} }
private void validateElectronicContractsExists(Long id) { private void validateElectronicContractsExists(Long id) {

@ -33,7 +33,7 @@ public interface ElectronicCustomerComplaintService {
* *
* @param id * @param id
*/ */
void deleteElectronicCustomerComplaint(Long id); void deleteElectronicCustomerComplaint(Long[] id);
/** /**
* *

@ -97,11 +97,9 @@ public class ElectronicCustomerComplaintServiceImpl implements ElectronicCustome
} }
@Override @Override
public void deleteElectronicCustomerComplaint(Long id) { public void deleteElectronicCustomerComplaint(Long[] id) {
// 校验存在 ArrayList<Long> listId = new ArrayList(Arrays.asList(id)) ;
validateElectronicCustomerComplaintExists(id); electronicCustomerComplaintMapper.deleteBatchIds(listId);
// 删除
electronicCustomerComplaintMapper.deleteById(id);
} }
private void validateElectronicCustomerComplaintExists(Long id) { private void validateElectronicCustomerComplaintExists(Long id) {

@ -33,7 +33,7 @@ public interface ElectronicEmployeeService {
* *
* @param id * @param id
*/ */
void deleteElectronicEmployee(Long id); void deleteElectronicEmployee(Long[] id);
/** /**
* *

@ -96,11 +96,9 @@ public class ElectronicEmployeeServiceImpl implements ElectronicEmployeeService
} }
@Override @Override
public void deleteElectronicEmployee(Long id) { public void deleteElectronicEmployee(Long[] id) {
// 校验存在 ArrayList<Long> listId = new ArrayList(Arrays.asList(id)) ;
validateElectronicEmployeeExists(id); electronicEmployeeMapper.deleteBatchIds(listId);
// 删除
electronicEmployeeMapper.deleteById(id);
} }
private void validateElectronicEmployeeExists(Long id) { private void validateElectronicEmployeeExists(Long id) {

@ -33,7 +33,7 @@ public interface ElectronicOtherService {
* *
* @param id * @param id
*/ */
void deleteElectronicOther(Long id); void deleteElectronicOther(Long[] id);
/** /**
* *

@ -97,11 +97,9 @@ public class ElectronicOtherServiceImpl implements ElectronicOtherService {
} }
@Override @Override
public void deleteElectronicOther(Long id) { public void deleteElectronicOther(Long[] id) {
// 校验存在 ArrayList<Long> listId = new ArrayList(Arrays.asList(id)) ;
validateElectronicOtherExists(id); electronicOtherMapper.deleteBatchIds(listId);
// 删除
electronicOtherMapper.deleteById(id);
} }
private void validateElectronicOtherExists(Long id) { private void validateElectronicOtherExists(Long id) {

Loading…
Cancel
Save