修复bug

This commit is contained in:
2026-02-27 15:52:33 +08:00
parent b62aa19d18
commit bd13e95605

View File

@ -63,25 +63,6 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
private final CustomerDataProvider tranProvider; private final CustomerDataProvider tranProvider;
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean delete(List<Long> ids) {
List<LngCustomer> customerList = lngCustomerMapper.selectList(Wrappers.lambdaQuery(LngCustomer.class).in(LngCustomer::getId, ids));
for(LngCustomer customer: customerList) {
tranProvider.removeCacheData(customer.getCuCode());
}
List<String> cuCodeList = customerList.stream().map(LngCustomer::getCuCode).filter(Objects::nonNull).collect(Collectors.toList());
lngCustomerMapper.deleteBatchIds(ids);
if(CollectionUtil.isNotEmpty(cuCodeList)) {
lngCustomerAttrPowerMapper.delete(Wrappers.lambdaQuery(LngCustomerAttrPower.class).in(LngCustomerAttrPower::getCuCode, cuCodeList));
lngCustomerBankMapper.delete(Wrappers.lambdaQuery(LngCustomerBank.class).in(LngCustomerBank::getCuCode, cuCodeList));
lngCustomerDocMapper.delete(Wrappers.lambdaQuery(LngCustomerDoc.class).in(LngCustomerDoc::getCuCode, cuCodeList));
lngCustomerContactMapper.delete(Wrappers.lambdaQuery(LngCustomerContact.class).in(LngCustomerContact::getCuCode, cuCodeList));
}
return true;
}
@Override @Override
public LngCustomerVo getCustomerById(Long id) { public LngCustomerVo getCustomerById(Long id) {