|
|
|
|
@ -2,11 +2,13 @@ package com.xjrsoft.module.sales.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
|
|
import com.pictc.utils.StringUtils;
|
|
|
|
|
import com.xjrsoft.module.sales.entity.LngCustomerAttrPower;
|
|
|
|
|
import com.xjrsoft.module.sales.mapper.LngCustomerAttrPowerMapper;
|
|
|
|
|
import com.xjrsoft.module.sales.entity.LngCustomerBank;
|
|
|
|
|
import com.xjrsoft.module.sales.mapper.LngCustomerBankMapper;
|
|
|
|
|
import com.xjrsoft.module.sales.entity.LngCustomerDoc;
|
|
|
|
|
import com.xjrsoft.module.sales.entity.LngFileUpload;
|
|
|
|
|
import com.xjrsoft.module.sales.mapper.LngCustomerDocMapper;
|
|
|
|
|
import com.xjrsoft.module.sales.entity.LngCustomerContact;
|
|
|
|
|
import com.xjrsoft.module.sales.mapper.LngCustomerContactMapper;
|
|
|
|
|
@ -15,8 +17,10 @@ import com.xjrsoft.module.sales.dto.UpdateLngCustomerBankDto;
|
|
|
|
|
import com.xjrsoft.module.sales.dto.UpdateLngCustomerContactDto;
|
|
|
|
|
import com.xjrsoft.module.sales.dto.UpdateLngCustomerDocDto;
|
|
|
|
|
import com.xjrsoft.module.sales.dto.UpdateLngCustomerDto;
|
|
|
|
|
import com.xjrsoft.module.sales.dto.UpdateLngFileUploadDto;
|
|
|
|
|
import com.xjrsoft.module.sales.entity.LngCustomer;
|
|
|
|
|
import com.xjrsoft.module.sales.mapper.LngCustomerMapper;
|
|
|
|
|
import com.xjrsoft.module.sales.mapper.LngFileUploadMapper;
|
|
|
|
|
import com.xjrsoft.module.sales.service.ICustomerService;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
@ -37,12 +41,13 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
@Service
|
|
|
|
|
@AllArgsConstructor
|
|
|
|
|
public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, LngCustomer> implements ICustomerService {
|
|
|
|
|
private final LngCustomerMapper customerLngCustomerMapper;
|
|
|
|
|
private final LngCustomerMapper lngCustomerMapper;
|
|
|
|
|
|
|
|
|
|
private final LngCustomerAttrPowerMapper customerLngCustomerAttrPowerMapper;
|
|
|
|
|
private final LngCustomerBankMapper customerLngCustomerBankMapper;
|
|
|
|
|
private final LngCustomerDocMapper customerLngCustomerDocMapper;
|
|
|
|
|
private final LngCustomerContactMapper customerLngCustomerContactMapper;
|
|
|
|
|
private final LngCustomerAttrPowerMapper lngCustomerAttrPowerMapper;
|
|
|
|
|
private final LngCustomerBankMapper lngCustomerBankMapper;
|
|
|
|
|
private final LngCustomerDocMapper lngCustomerDocMapper;
|
|
|
|
|
private final LngCustomerContactMapper lngCustomerContactMapper;
|
|
|
|
|
private final LngFileUploadMapper lngFileUploadMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@ -51,32 +56,47 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
|
|
|
|
|
LngCustomer lngCustomer = new LngCustomer();
|
|
|
|
|
BeanUtil.copyProperties(updateLngCustomerDto, lngCustomer);
|
|
|
|
|
customerLngCustomerMapper.insert(lngCustomer);
|
|
|
|
|
lngCustomerMapper.insert(lngCustomer);
|
|
|
|
|
for (UpdateLngCustomerAttrPowerDto updateLngCustomerAttrPowerDto : updateLngCustomerDto.getLngCustomerAttrPowerList()) {
|
|
|
|
|
LngCustomerAttrPower lngCustomerAttrPower = new LngCustomerAttrPower();
|
|
|
|
|
BeanUtil.copyProperties(updateLngCustomerAttrPowerDto, lngCustomerAttrPower);
|
|
|
|
|
lngCustomerAttrPower.setCuCode(lngCustomer.getCuCode());
|
|
|
|
|
customerLngCustomerAttrPowerMapper.insert(lngCustomerAttrPower);
|
|
|
|
|
lngCustomerAttrPowerMapper.insert(lngCustomerAttrPower);
|
|
|
|
|
}
|
|
|
|
|
for (UpdateLngCustomerBankDto updateLngCustomerBankDto : updateLngCustomerDto.getLngCustomerBankList()) {
|
|
|
|
|
LngCustomerBank lngCustomerBank = new LngCustomerBank();
|
|
|
|
|
BeanUtil.copyProperties(updateLngCustomerBankDto, lngCustomerBank);
|
|
|
|
|
lngCustomerBank.setCuCode(lngCustomer.getCuCode());
|
|
|
|
|
customerLngCustomerBankMapper.insert(lngCustomerBank);
|
|
|
|
|
lngCustomerBankMapper.insert(lngCustomerBank);
|
|
|
|
|
}
|
|
|
|
|
for (UpdateLngCustomerDocDto updateLngCustomerDocDto : updateLngCustomerDto.getLngCustomerDocList()) {
|
|
|
|
|
LngCustomerDoc lngCustomerDoc = new LngCustomerDoc();
|
|
|
|
|
BeanUtil.copyProperties(updateLngCustomerDocDto, lngCustomerDoc);
|
|
|
|
|
lngCustomerDoc.setCuCode(lngCustomer.getCuCode());
|
|
|
|
|
customerLngCustomerDocMapper.insert(lngCustomerDoc);
|
|
|
|
|
lngCustomerDocMapper.insert(lngCustomerDoc);
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(updateLngCustomerDocDto.getFilePath())) {
|
|
|
|
|
LngFileUpload lngFileUpload = new LngFileUpload();
|
|
|
|
|
lngFileUpload.setFilePath(updateLngCustomerDocDto.getFilePath());
|
|
|
|
|
lngFileUpload.setTableName("lng_customer_doc");
|
|
|
|
|
lngFileUpload.setTableId(lngCustomer.getId());
|
|
|
|
|
lngFileUploadMapper.insert(lngFileUpload);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
for (UpdateLngCustomerContactDto updateLngCustomerContactDto : updateLngCustomerDto.getLngCustomerContactList()) {
|
|
|
|
|
LngCustomerContact lngCustomerContact = new LngCustomerContact();
|
|
|
|
|
BeanUtil.copyProperties(updateLngCustomerContactDto, lngCustomerContact);
|
|
|
|
|
lngCustomerContact.setCuCode(lngCustomer.getCuCode());
|
|
|
|
|
customerLngCustomerContactMapper.insert(lngCustomerContact);
|
|
|
|
|
lngCustomerContactMapper.insert(lngCustomerContact);
|
|
|
|
|
}
|
|
|
|
|
for (UpdateLngFileUploadDto lngFileUploadDto : updateLngCustomerDto.getLngFileUploadList()) {
|
|
|
|
|
LngFileUpload lngFileUpload = new LngFileUpload();
|
|
|
|
|
BeanUtil.copyProperties(lngFileUploadDto, lngFileUpload);
|
|
|
|
|
lngFileUpload.setTableName("lng_customer");
|
|
|
|
|
lngFileUpload.setTableId(lngCustomer.getId());
|
|
|
|
|
lngFileUploadMapper.insert(lngFileUpload);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -85,11 +105,11 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
public Boolean update(UpdateLngCustomerDto updateLngCustomerDto) {
|
|
|
|
|
LngCustomer lngCustomer = new LngCustomer();
|
|
|
|
|
BeanUtil.copyProperties(updateLngCustomerDto, lngCustomer);
|
|
|
|
|
customerLngCustomerMapper.updateById(lngCustomer);
|
|
|
|
|
lngCustomerMapper.updateById(lngCustomer);
|
|
|
|
|
//********************************* LngCustomerAttrPower 增删改 开始 *******************************************/
|
|
|
|
|
{
|
|
|
|
|
// 查出所有子级的id
|
|
|
|
|
List<LngCustomerAttrPower> lngCustomerAttrPowerList = customerLngCustomerAttrPowerMapper.selectList(Wrappers.lambdaQuery(LngCustomerAttrPower.class).eq(LngCustomerAttrPower::getCuCode, lngCustomer.getCuCode()).select(LngCustomerAttrPower::getId));
|
|
|
|
|
List<LngCustomerAttrPower> lngCustomerAttrPowerList = lngCustomerAttrPowerMapper.selectList(Wrappers.lambdaQuery(LngCustomerAttrPower.class).eq(LngCustomerAttrPower::getCuCode, lngCustomer.getCuCode()).select(LngCustomerAttrPower::getId));
|
|
|
|
|
List<Long> lngCustomerAttrPowerIds = lngCustomerAttrPowerList.stream().map(LngCustomerAttrPower::getId).collect(Collectors.toList());
|
|
|
|
|
//原有子表单 没有被删除的主键
|
|
|
|
|
List<Long> lngCustomerAttrPowerOldIds = updateLngCustomerDto.getLngCustomerAttrPowerList().stream().map(UpdateLngCustomerAttrPowerDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
|
|
@ -102,18 +122,18 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
//如果不等于空则修改
|
|
|
|
|
if (lngCustomerAttrPower.getId() != null) {
|
|
|
|
|
|
|
|
|
|
customerLngCustomerAttrPowerMapper.updateById(lngCustomerAttrPower);
|
|
|
|
|
lngCustomerAttrPowerMapper.updateById(lngCustomerAttrPower);
|
|
|
|
|
}
|
|
|
|
|
//如果等于空 则新增
|
|
|
|
|
else {
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
lngCustomerAttrPower.setCuCode(lngCustomer.getCuCode());
|
|
|
|
|
customerLngCustomerAttrPowerMapper.insert(lngCustomerAttrPower);
|
|
|
|
|
lngCustomerAttrPowerMapper.insert(lngCustomerAttrPower);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
if(lngCustomerAttrPowerRemoveIds.size() > 0){
|
|
|
|
|
customerLngCustomerAttrPowerMapper.deleteBatchIds(lngCustomerAttrPowerRemoveIds);
|
|
|
|
|
lngCustomerAttrPowerMapper.deleteBatchIds(lngCustomerAttrPowerRemoveIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//********************************* LngCustomerAttrPower 增删改 结束 *******************************************/
|
|
|
|
|
@ -121,7 +141,7 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
//********************************* LngCustomerBank 增删改 开始 *******************************************/
|
|
|
|
|
{
|
|
|
|
|
// 查出所有子级的id
|
|
|
|
|
List<LngCustomerBank> lngCustomerBankList = customerLngCustomerBankMapper.selectList(Wrappers.lambdaQuery(LngCustomerBank.class).eq(LngCustomerBank::getCuCode, lngCustomer.getCuCode()).select(LngCustomerBank::getId));
|
|
|
|
|
List<LngCustomerBank> lngCustomerBankList = lngCustomerBankMapper.selectList(Wrappers.lambdaQuery(LngCustomerBank.class).eq(LngCustomerBank::getCuCode, lngCustomer.getCuCode()).select(LngCustomerBank::getId));
|
|
|
|
|
List<Long> lngCustomerBankIds = lngCustomerBankList.stream().map(LngCustomerBank::getId).collect(Collectors.toList());
|
|
|
|
|
//原有子表单 没有被删除的主键
|
|
|
|
|
List<Long> lngCustomerBankOldIds = updateLngCustomerDto.getLngCustomerBankList().stream().map(UpdateLngCustomerBankDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
|
|
@ -133,18 +153,18 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
BeanUtil.copyProperties(lngCustomerBankDto, lngCustomerBank);
|
|
|
|
|
//如果不等于空则修改
|
|
|
|
|
if (lngCustomerBank.getId() != null) {
|
|
|
|
|
customerLngCustomerBankMapper.updateById(lngCustomerBank);
|
|
|
|
|
lngCustomerBankMapper.updateById(lngCustomerBank);
|
|
|
|
|
}
|
|
|
|
|
//如果等于空 则新增
|
|
|
|
|
else {
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
lngCustomerBank.setCuCode(lngCustomer.getCuCode());
|
|
|
|
|
customerLngCustomerBankMapper.insert(lngCustomerBank);
|
|
|
|
|
lngCustomerBankMapper.insert(lngCustomerBank);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
if(lngCustomerBankRemoveIds.size() > 0){
|
|
|
|
|
customerLngCustomerBankMapper.deleteBatchIds(lngCustomerBankRemoveIds);
|
|
|
|
|
lngCustomerBankMapper.deleteBatchIds(lngCustomerBankRemoveIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//********************************* LngCustomerBank 增删改 结束 *******************************************/
|
|
|
|
|
@ -152,7 +172,7 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
//********************************* LngCustomerDoc 增删改 开始 *******************************************/
|
|
|
|
|
{
|
|
|
|
|
// 查出所有子级的id
|
|
|
|
|
List<LngCustomerDoc> lngCustomerDocList = customerLngCustomerDocMapper.selectList(Wrappers.lambdaQuery(LngCustomerDoc.class).eq(LngCustomerDoc::getCuCode, lngCustomer.getCuCode()).select(LngCustomerDoc::getId));
|
|
|
|
|
List<LngCustomerDoc> lngCustomerDocList = lngCustomerDocMapper.selectList(Wrappers.lambdaQuery(LngCustomerDoc.class).eq(LngCustomerDoc::getCuCode, lngCustomer.getCuCode()).select(LngCustomerDoc::getId));
|
|
|
|
|
List<Long> lngCustomerDocIds = lngCustomerDocList.stream().map(LngCustomerDoc::getId).collect(Collectors.toList());
|
|
|
|
|
//原有子表单 没有被删除的主键
|
|
|
|
|
List<Long> lngCustomerDocOldIds = updateLngCustomerDto.getLngCustomerDocList().stream().map(UpdateLngCustomerDocDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
|
|
@ -162,20 +182,31 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
for (UpdateLngCustomerDocDto lngCustomerDocDto : updateLngCustomerDto.getLngCustomerDocList()) {
|
|
|
|
|
LngCustomerDoc lngCustomerDoc = new LngCustomerDoc();
|
|
|
|
|
BeanUtil.copyProperties(lngCustomerDocDto, lngCustomerDoc);
|
|
|
|
|
//如果不等于空则修改
|
|
|
|
|
//如果不等于空则修改
|
|
|
|
|
if (lngCustomerDoc.getId() != null) {
|
|
|
|
|
customerLngCustomerDocMapper.updateById(lngCustomerDoc);
|
|
|
|
|
|
|
|
|
|
lngCustomerDocMapper.updateById(lngCustomerDoc);
|
|
|
|
|
lngFileUploadMapper.delete(Wrappers.lambdaQuery(LngFileUpload.class).eq(LngFileUpload::getTableName, "lng_customer_doc").eq(LngFileUpload::getTableId, lngCustomerDoc.getId()));
|
|
|
|
|
}
|
|
|
|
|
//如果等于空 则新增
|
|
|
|
|
else {
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
lngCustomerDoc.setCuCode(lngCustomer.getCuCode());
|
|
|
|
|
customerLngCustomerDocMapper.insert(lngCustomerDoc);
|
|
|
|
|
lngCustomerDocMapper.insert(lngCustomerDoc);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(lngCustomerDocDto.getFilePath())) {
|
|
|
|
|
LngFileUpload lngFileUpload = new LngFileUpload();
|
|
|
|
|
lngFileUpload.setFilePath(lngCustomerDocDto.getFilePath());
|
|
|
|
|
lngFileUpload.setTableName("lng_customer_doc");
|
|
|
|
|
lngFileUpload.setTableId(lngCustomerDoc.getId());
|
|
|
|
|
lngFileUploadMapper.insert(lngFileUpload);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
if(lngCustomerDocRemoveIds.size() > 0){
|
|
|
|
|
customerLngCustomerDocMapper.deleteBatchIds(lngCustomerDocRemoveIds);
|
|
|
|
|
lngCustomerDocMapper.deleteBatchIds(lngCustomerDocRemoveIds);
|
|
|
|
|
lngFileUploadMapper.delete(Wrappers.lambdaQuery(LngFileUpload.class).eq(LngFileUpload::getTableName, "lng_customer_doc").in(LngFileUpload::getTableId, lngCustomerDocRemoveIds));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//********************************* LngCustomerDoc 增删改 结束 *******************************************/
|
|
|
|
|
@ -183,7 +214,7 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
//********************************* LngCustomerContact 增删改 开始 *******************************************/
|
|
|
|
|
{
|
|
|
|
|
// 查出所有子级的id
|
|
|
|
|
List<LngCustomerContact> lngCustomerContactList = customerLngCustomerContactMapper.selectList(Wrappers.lambdaQuery(LngCustomerContact.class).eq(LngCustomerContact::getCuCode, lngCustomer.getCuCode()).select(LngCustomerContact::getId));
|
|
|
|
|
List<LngCustomerContact> lngCustomerContactList = lngCustomerContactMapper.selectList(Wrappers.lambdaQuery(LngCustomerContact.class).eq(LngCustomerContact::getCuCode, lngCustomer.getCuCode()).select(LngCustomerContact::getId));
|
|
|
|
|
List<Long> lngCustomerContactIds = lngCustomerContactList.stream().map(LngCustomerContact::getId).collect(Collectors.toList());
|
|
|
|
|
//原有子表单 没有被删除的主键
|
|
|
|
|
List<Long> lngCustomerContactOldIds = updateLngCustomerDto.getLngCustomerContactList().stream().map(UpdateLngCustomerContactDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
|
|
@ -195,34 +226,64 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|
|
|
|
BeanUtil.copyProperties(lngCustomerContactDto, lngCustomerContact);
|
|
|
|
|
//如果不等于空则修改
|
|
|
|
|
if (lngCustomerContact.getId() != null) {
|
|
|
|
|
customerLngCustomerContactMapper.updateById(lngCustomerContact);
|
|
|
|
|
lngCustomerContactMapper.updateById(lngCustomerContact);
|
|
|
|
|
}
|
|
|
|
|
//如果等于空 则新增
|
|
|
|
|
else {
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
lngCustomerContact.setCuCode(lngCustomer.getCuCode());
|
|
|
|
|
customerLngCustomerContactMapper.insert(lngCustomerContact);
|
|
|
|
|
lngCustomerContactMapper.insert(lngCustomerContact);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
if(lngCustomerContactRemoveIds.size() > 0){
|
|
|
|
|
customerLngCustomerContactMapper.deleteBatchIds(lngCustomerContactRemoveIds);
|
|
|
|
|
lngCustomerContactMapper.deleteBatchIds(lngCustomerContactRemoveIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//********************************* LngCustomerContact 增删改 结束 *******************************************/
|
|
|
|
|
|
|
|
|
|
//********************************* LngFileUpload 增删改 开始 *******************************************/
|
|
|
|
|
{
|
|
|
|
|
// 查出所有子级的id
|
|
|
|
|
List<LngFileUpload> lngFileUploadList = lngFileUploadMapper.selectList(Wrappers.lambdaQuery(LngFileUpload.class).eq(LngFileUpload::getTableName, "lng_customer").eq(LngFileUpload::getTableId, lngCustomer.getId()).select(LngFileUpload::getId));
|
|
|
|
|
List<Long> lngFileUploadIds = lngFileUploadList.stream().map(LngFileUpload::getId).collect(Collectors.toList());
|
|
|
|
|
//原有子表单 没有被删除的主键
|
|
|
|
|
List<Long> lngFileUploadOldIds = updateLngCustomerDto.getLngFileUploadList().stream().map(UpdateLngFileUploadDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
|
|
//找到需要删除的id
|
|
|
|
|
List<Long> lngFileUploadRemoveIds = lngFileUploadIds.stream().filter(item -> !lngFileUploadOldIds.contains(item)).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
for (UpdateLngFileUploadDto lngFileUploadDto : updateLngCustomerDto.getLngFileUploadList()) {
|
|
|
|
|
LngFileUpload lngFileUpload = new LngFileUpload();
|
|
|
|
|
BeanUtil.copyProperties(lngFileUploadDto, lngFileUpload);
|
|
|
|
|
lngFileUpload.setTableName("lng_customer");
|
|
|
|
|
//如果不等于空则修改
|
|
|
|
|
if (lngFileUpload.getId() != null) {
|
|
|
|
|
lngFileUploadMapper.updateById(lngFileUpload);
|
|
|
|
|
}
|
|
|
|
|
//如果等于空 则新增
|
|
|
|
|
else {
|
|
|
|
|
lngFileUpload.setTableId(lngCustomer.getId());
|
|
|
|
|
lngFileUploadMapper.insert(lngFileUpload);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//已经不存在的id 删除
|
|
|
|
|
if(lngFileUploadRemoveIds.size() > 0){
|
|
|
|
|
lngFileUploadMapper.deleteBatchIds(lngFileUploadRemoveIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//********************************* LngFileUpload 增删改 结束 *******************************************/
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public Boolean delete(List<Long> ids) {
|
|
|
|
|
customerLngCustomerMapper.deleteBatchIds(ids);
|
|
|
|
|
customerLngCustomerAttrPowerMapper.delete(Wrappers.lambdaQuery(LngCustomerAttrPower.class).in(LngCustomerAttrPower::getCuCode, ids));
|
|
|
|
|
customerLngCustomerBankMapper.delete(Wrappers.lambdaQuery(LngCustomerBank.class).in(LngCustomerBank::getCuCode, ids));
|
|
|
|
|
customerLngCustomerDocMapper.delete(Wrappers.lambdaQuery(LngCustomerDoc.class).in(LngCustomerDoc::getCuCode, ids));
|
|
|
|
|
customerLngCustomerContactMapper.delete(Wrappers.lambdaQuery(LngCustomerContact.class).in(LngCustomerContact::getCuCode, ids));
|
|
|
|
|
|
|
|
|
|
lngCustomerMapper.deleteBatchIds(ids);
|
|
|
|
|
lngCustomerAttrPowerMapper.delete(Wrappers.lambdaQuery(LngCustomerAttrPower.class).in(LngCustomerAttrPower::getCuCode, ids));
|
|
|
|
|
lngCustomerBankMapper.delete(Wrappers.lambdaQuery(LngCustomerBank.class).in(LngCustomerBank::getCuCode, ids));
|
|
|
|
|
lngCustomerDocMapper.delete(Wrappers.lambdaQuery(LngCustomerDoc.class).in(LngCustomerDoc::getCuCode, ids));
|
|
|
|
|
lngCustomerContactMapper.delete(Wrappers.lambdaQuery(LngCustomerContact.class).in(LngCustomerContact::getCuCode, ids));
|
|
|
|
|
lngFileUploadMapper.delete(Wrappers.lambdaQuery(LngFileUpload.class).in(LngFileUpload::getTableId, ids));
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|