Browse Source

空指针

master
luogw 2 weeks ago
parent
commit
355f72f2cf
  1. 4
      src/main/java/com/project/information/domain/service/impl/GetStatisticsKnowledgePointDomainServiceImpl.java

4
src/main/java/com/project/information/domain/service/impl/GetStatisticsKnowledgePointDomainServiceImpl.java

@ -1,5 +1,6 @@
package com.project.information.domain.service.impl; package com.project.information.domain.service.impl;
import com.project.base.domain.exception.BusinessErrorException;
import com.project.base.domain.result.Result; import com.project.base.domain.result.Result;
import com.project.information.domain.dto.KnowledgePointStatisticsDTO; import com.project.information.domain.dto.KnowledgePointStatisticsDTO;
import com.project.information.domain.entity.InformationEntity; import com.project.information.domain.entity.InformationEntity;
@ -21,6 +22,9 @@ public class GetStatisticsKnowledgePointDomainServiceImpl implements GetStatisti
@Override @Override
public Result<KnowledgePointStatisticsDTO> getStatistics(Long subLineId) throws Exception { public Result<KnowledgePointStatisticsDTO> getStatistics(Long subLineId) throws Exception {
KnowledgePointStatisticsDTO dto = knowledgePointMapper.selectBySubLineId(subLineId); KnowledgePointStatisticsDTO dto = knowledgePointMapper.selectBySubLineId(subLineId);
if(dto==null){
throw new BusinessErrorException("子产品线不存在");
}
List<Long> relatedDocumentList = informationBaseService.lambdaQuery().select(InformationEntity::getId) List<Long> relatedDocumentList = informationBaseService.lambdaQuery().select(InformationEntity::getId)
.eq(InformationEntity::getSubLineId, subLineId).list() .eq(InformationEntity::getSubLineId, subLineId).list()
.stream().map(InformationEntity::getId).toList(); .stream().map(InformationEntity::getId).toList();

Loading…
Cancel
Save