|
|
|
@ -6,8 +6,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import com.project.base.domain.result.Result; |
|
|
|
import com.project.information.application.KnowledgePointApplicationService; |
|
|
|
import com.project.information.domain.dto.KnowledgePointStatisticsDTO; |
|
|
|
import com.project.information.domain.entity.InformationEntity; |
|
|
|
import com.project.information.domain.entity.KnowledgePointEntity; |
|
|
|
import com.project.information.domain.service.GetStatisticsKnowledgePointDomainService; |
|
|
|
import com.project.information.domain.service.InformationBaseService; |
|
|
|
import com.project.information.domain.service.KnowledgePointBaseService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.ObjectUtils; |
|
|
|
@ -35,6 +37,8 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private KnowledgePointBaseService knowledgePointBaseService; |
|
|
|
@Autowired |
|
|
|
private InformationBaseService informationBaseService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private GetStatisticsKnowledgePointDomainService getStatisticsKnowledgePointDomainService; |
|
|
|
@ -95,6 +99,12 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli |
|
|
|
List<KnowledgePointEntity> knowledgePointEntities = parseAnalysisResponse(response,id); |
|
|
|
if(!CollectionUtils.isEmpty(knowledgePointEntities)){ |
|
|
|
knowledgePointBaseService.saveBatch(knowledgePointEntities); |
|
|
|
//向资料中冗余pareName字段值
|
|
|
|
InformationEntity informationEntity = new InformationEntity(); |
|
|
|
informationEntity.setId(id); |
|
|
|
informationEntity.setParseName(knowledgePointEntities.get(0).getParseName()); |
|
|
|
informationBaseService.updateById(informationEntity); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -153,6 +163,7 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli |
|
|
|
|
|
|
|
KnowledgePointEntity entity = new KnowledgePointEntity(); |
|
|
|
entity.setContent((String) item.get("knowledge")); |
|
|
|
entity.setParseName((String) item.get("products")); |
|
|
|
entity.setKnowledgeType(hasYellow ? 0 : 1); |
|
|
|
entity.setExamFocusList(focusList); |
|
|
|
entity.setInformationId(id); |
|
|
|
|