bug修改

This commit is contained in:
lg
2025-10-25 21:58:47 +08:00
parent 5d8af1cab8
commit 0287f1e4ce

View File

@ -309,6 +309,7 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
}
@Override
@Transactional(rollbackFor = Exception.class)
public R<String> delCorrespondent(Long[] dto) {
for (int i = dto.length - 1; i >= 0; i--) {
@ -571,8 +572,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
public void delCorrespondentVoid(Long dto){
// 删除中间表
XzdCustomerSupplierYyb xzdCustomerSupplierYyb = iXzdCustomerSupplierYybService.getBaseMapper().selectOne(new LambdaQueryWrapper<XzdCustomerSupplierYyb>().eq(XzdCustomerSupplierYyb::getCSId, dto));
if (xzdCustomerSupplierYyb == null) {
List<XzdCustomerSupplierYyb> xzdCustomerSupplierYyb = iXzdCustomerSupplierYybService.getBaseMapper().selectList(new LambdaQueryWrapper<XzdCustomerSupplierYyb>().eq(XzdCustomerSupplierYyb::getCSId, dto));
if (xzdCustomerSupplierYyb == null || xzdCustomerSupplierYyb.size() == 0) {
iXzdCustomerSupplierService.getBaseMapper().delete(new LambdaQueryWrapper<XzdCustomerSupplier>().eq(XzdCustomerSupplier::getCSId, dto));
}else {
throw new RuntimeException("该客户信息已被使用,无法删除");