You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.3 KiB
Java
37 lines
1.3 KiB
Java
1 month ago
|
package com.supervision.pdfqaserver.controller;
|
||
|
|
||
|
import com.supervision.pdfqaserver.dto.R;
|
||
|
import com.supervision.pdfqaserver.service.KnowledgeGraphService;
|
||
|
import com.supervision.pdfqaserver.vo.PdfToMdFinishReqVo;
|
||
|
import lombok.RequiredArgsConstructor;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
@Slf4j
|
||
|
@RestController
|
||
|
@RequestMapping("/chat")
|
||
|
@RequiredArgsConstructor
|
||
|
public class NotifyController {
|
||
|
|
||
|
private final KnowledgeGraphService knowledgeGraphService;
|
||
|
|
||
|
/**
|
||
|
* pdf 转化完成通知回调
|
||
|
* @param pdfToMdFinishReqVo pdfToMdFinishReqVo
|
||
|
* @return
|
||
|
*/
|
||
|
@PostMapping("/pdf-to-md/finish")
|
||
|
public R<String> pageList(@RequestBody PdfToMdFinishReqVo pdfToMdFinishReqVo) {
|
||
|
|
||
|
log.info("pdf转化完成通知回调, pdfId:{}, processStatus:{}", pdfToMdFinishReqVo.getPfdId(), pdfToMdFinishReqVo.getProcessStatus());
|
||
|
if ("2".equals(pdfToMdFinishReqVo.getProcessStatus())) {
|
||
|
knowledgeGraphService.submitGenerateTask(pdfToMdFinishReqVo.getPfdId());
|
||
|
}
|
||
|
return R.ok("success");
|
||
|
}
|
||
|
|
||
|
}
|