Pārlūkot izejas kodu

症状特征词提取

zhaops 5 gadi atpakaļ
vecāks
revīzija
e5516e00fb

+ 15 - 0
triage-service/src/main/java/com/diagbot/vo/NLPVO.java

@@ -0,0 +1,15 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/22 16:05
+ */
+@Getter
+@Setter
+public class NLPVO {
+    private String text;
+}

+ 4 - 2
triage-service/src/main/java/com/diagbot/web/FeatureController.java

@@ -4,10 +4,12 @@ import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.FeatureConceptDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.FeatureFacade;
+import com.diagbot.vo.NLPVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 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.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
@@ -30,7 +32,7 @@ public class FeatureController {
             notes = "text: 症状文本描述(必填)<br>")
     @PostMapping("/getSymptomFeature")
     @SysLogger("getSymptomFeature")
-    public RespDTO<List<FeatureConceptDTO>> getSymptomFeature(@RequestParam("text") String text) {
-        return RespDTO.onSuc(featureFacade.getSymptomFeature(text));
+    public RespDTO<List<FeatureConceptDTO>> getSymptomFeature(@RequestBody NLPVO nlpvo) {
+        return RespDTO.onSuc(featureFacade.getSymptomFeature(nlpvo.getText()));
     }
 }