|
@@ -235,33 +235,37 @@ public class DeletionServiceImpl implements DeletionService {
|
|
@Override
|
|
@Override
|
|
public void computeDeletionTypeNum(List<FundDeletionTypeDO> fundDeletionTypeList) {
|
|
public void computeDeletionTypeNum(List<FundDeletionTypeDO> fundDeletionTypeList) {
|
|
for (FundDeletionTypeDO fundDeletionType : fundDeletionTypeList) {
|
|
for (FundDeletionTypeDO fundDeletionType : fundDeletionTypeList) {
|
|
- String fundId = fundDeletionType.getFundId();
|
|
|
|
- Integer deletionType = fundDeletionType.getDeletionType();
|
|
|
|
- Integer channelId = fundDeletionType.getDeletionType();
|
|
|
|
- Integer deletionNum = deletionInfoMapper.countChannelFundDeletion(fundId, deletionType, channelId, 1);
|
|
|
|
- Integer processedNum = deletionInfoMapper.countChannelFundDeletion(fundId, deletionType, channelId, 0);
|
|
|
|
- if(deletionNum == 0 && processedNum == 0){
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- String lastDeletionDate = deletionInfoMapper.getLastDeletionDate(fundId, deletionType, channelId);
|
|
|
|
- DeletionTypeStatisticsDO deletionTypeStatisticsDO = new DeletionTypeStatisticsDO();
|
|
|
|
- deletionTypeStatisticsDO.setFundId(fundId);
|
|
|
|
- deletionTypeStatisticsDO.setIsvalid(1);
|
|
|
|
- deletionTypeStatisticsDO.setChannelId(channelId);
|
|
|
|
- deletionTypeStatisticsDO.setCreateTime(new Date());
|
|
|
|
- deletionTypeStatisticsDO.setCreatorId(999999);
|
|
|
|
- deletionTypeStatisticsDO.setUpdaterId(999999);
|
|
|
|
- deletionTypeStatisticsDO.setUpdateTime(new Date());
|
|
|
|
- deletionTypeStatisticsDO.setLastDeletionDate(lastDeletionDate);
|
|
|
|
- deletionTypeStatisticsDO.setDeletionType(Integer.valueOf(deletionType));
|
|
|
|
- deletionTypeStatisticsDO.setDeletionNum(deletionNum);
|
|
|
|
- deletionTypeStatisticsDO.setProcessedNum(processedNum);
|
|
|
|
- DeletionTypeStatisticsDO oldDeletionTypeStatisticsDO = deletionTypeStatisticsMapper.getDeletionTypeStatistics(fundId, deletionType,channelId);
|
|
|
|
- if (oldDeletionTypeStatisticsDO != null) {
|
|
|
|
- deletionTypeStatisticsDO.setId(oldDeletionTypeStatisticsDO.getId());
|
|
|
|
|
|
+ try{
|
|
|
|
+ String fundId = fundDeletionType.getFundId();
|
|
|
|
+ Integer deletionType = fundDeletionType.getDeletionType();
|
|
|
|
+ Integer channelId = fundDeletionType.getDeletionType();
|
|
|
|
+ Integer deletionNum = deletionInfoMapper.countChannelFundDeletion(fundId, deletionType, channelId, 1);
|
|
|
|
+ Integer processedNum = deletionInfoMapper.countChannelFundDeletion(fundId, deletionType, channelId, 0);
|
|
|
|
+ if(deletionNum == 0 && processedNum == 0){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ String lastDeletionDate = deletionInfoMapper.getLastDeletionDate(fundId, deletionType, channelId);
|
|
|
|
+ DeletionTypeStatisticsDO deletionTypeStatisticsDO = new DeletionTypeStatisticsDO();
|
|
|
|
+ deletionTypeStatisticsDO.setFundId(fundId);
|
|
|
|
+ deletionTypeStatisticsDO.setIsvalid(1);
|
|
|
|
+ deletionTypeStatisticsDO.setChannelId(channelId);
|
|
|
|
+ deletionTypeStatisticsDO.setCreateTime(new Date());
|
|
|
|
+ deletionTypeStatisticsDO.setCreatorId(999999);
|
|
|
|
+ deletionTypeStatisticsDO.setUpdaterId(999999);
|
|
deletionTypeStatisticsDO.setUpdateTime(new Date());
|
|
deletionTypeStatisticsDO.setUpdateTime(new Date());
|
|
|
|
+ deletionTypeStatisticsDO.setLastDeletionDate(lastDeletionDate);
|
|
|
|
+ deletionTypeStatisticsDO.setDeletionType(deletionType);
|
|
|
|
+ deletionTypeStatisticsDO.setDeletionNum(deletionNum);
|
|
|
|
+ deletionTypeStatisticsDO.setProcessedNum(processedNum);
|
|
|
|
+ DeletionTypeStatisticsDO oldDeletionTypeStatisticsDO = deletionTypeStatisticsMapper.getDeletionTypeStatistics(fundId, deletionType,channelId);
|
|
|
|
+ if (oldDeletionTypeStatisticsDO != null) {
|
|
|
|
+ deletionTypeStatisticsDO.setId(oldDeletionTypeStatisticsDO.getId());
|
|
|
|
+ deletionTypeStatisticsDO.setUpdateTime(new Date());
|
|
|
|
+ }
|
|
|
|
+ deletionTypeStatisticsMapper.insertOrUpdate(deletionTypeStatisticsDO);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ log.error(e.getMessage(),e);
|
|
}
|
|
}
|
|
- deletionTypeStatisticsMapper.insertOrUpdate(deletionTypeStatisticsDO);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|