|
|
|
@ -26,10 +26,26 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.logpm.basicdata.entity.*; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataBrandEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataClientEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataHistoricalContractEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataStorageServicesEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataStoreBrandEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataStoreBusinessEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataStoreContactEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
|
import com.logpm.basicdata.excel.BasicdataClientExcel; |
|
|
|
|
import com.logpm.basicdata.mapper.BasicdataClientMapper; |
|
|
|
|
import com.logpm.basicdata.service.*; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataBrandService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataClientService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataHistoricalContractService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataStorageServicesService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataStoreBrandService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataStoreBusinessService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataStoreContactService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataTripartiteMallService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataWarehouseService; |
|
|
|
|
import com.logpm.basicdata.vo.BasicdataClientVO; |
|
|
|
|
import com.logpm.basicdata.vo.ClientInfoVO; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
@ -49,7 +65,13 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
import java.security.NoSuchAlgorithmException; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashSet; |
|
|
|
|
import java.util.Iterator; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Optional; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
import static org.springblade.common.constant.DictBizConstant.OPEN_ORDER_PAY_WAY; |
|
|
|
@ -242,15 +264,22 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public Boolean ownDeleteLogic(List<Long> toLongList) { |
|
|
|
|
List<Long> clientIds = new ArrayList<>(); |
|
|
|
|
toLongList.forEach(i -> { |
|
|
|
|
List<BasicdataClientEntity> basicdataClientEntities = baseMapper.selectList(Wrappers.<BasicdataClientEntity>query().lambda() |
|
|
|
|
.eq(BasicdataClientEntity::getPid, i) |
|
|
|
|
); |
|
|
|
|
if (!basicdataClientEntities.isEmpty()) { |
|
|
|
|
baseMapper.deleteBatchIds(basicdataClientEntities); |
|
|
|
|
clientIds.addAll(basicdataClientEntities.stream().map(BasicdataClientEntity::getId).collect(Collectors.toList())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
clientIds.add(i); |
|
|
|
|
}); |
|
|
|
|
// 删除客户品牌关系
|
|
|
|
|
if(CollUtil.isNotEmpty(clientIds)){ |
|
|
|
|
basicdataStoreBrandService.remove(Wrappers.<BasicdataStoreBrandEntity>query().lambda() |
|
|
|
|
.in(BasicdataStoreBrandEntity::getClientId, clientIds)); |
|
|
|
|
} |
|
|
|
|
return this.deleteLogic(toLongList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|