|
@@ -1,12 +1,12 @@
|
|
|
package com.diagbot.web;
|
|
|
|
|
|
|
|
|
-import com.diagbot.client.bean.SearchData;
|
|
|
+import com.diagbot.annotation.SysLogger;
|
|
|
import com.diagbot.dto.AIDTO;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.facade.AIFacade;
|
|
|
-import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.vo.AIVO;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -23,6 +23,7 @@ import javax.validation.Valid;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/ai")
|
|
|
+@Api(value = "AIAPI", tags = { "AIAPI" })
|
|
|
public class AIController {
|
|
|
|
|
|
@Autowired
|
|
@@ -36,12 +37,9 @@ public class AIController {
|
|
|
*/
|
|
|
@ApiOperation(value = "症状推理症状接口", notes = "症状推理症状接口")
|
|
|
@PostMapping("/pushSymptom")
|
|
|
+ @SysLogger("pushSymptom")
|
|
|
public RespDTO<AIDTO> pushSymptom(@RequestBody @Valid AIVO aivo) {
|
|
|
- SearchData searchData = new SearchData();
|
|
|
- BeanUtil.copyProperties(aivo, searchData);
|
|
|
- searchData.setSysCode("1");
|
|
|
- searchData.setFeatureType("1");
|
|
|
- return RespDTO.onSuc(aiFacade.push(searchData));
|
|
|
+ return RespDTO.onSuc(aiFacade.push(aivo, "1"));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -52,12 +50,9 @@ public class AIController {
|
|
|
*/
|
|
|
@ApiOperation(value = "症状推理疾病接口", notes = "症状推理疾病接口")
|
|
|
@PostMapping("/pushDis")
|
|
|
+ @SysLogger("pushDis")
|
|
|
public RespDTO<AIDTO> pushDis(@RequestBody @Valid AIVO aivo) {
|
|
|
- SearchData searchData = new SearchData();
|
|
|
- BeanUtil.copyProperties(aivo, searchData);
|
|
|
- searchData.setSysCode("1");
|
|
|
- searchData.setFeatureType("7");
|
|
|
- return RespDTO.onSuc(aiFacade.push(searchData));
|
|
|
+ return RespDTO.onSuc(aiFacade.push(aivo, "7"));
|
|
|
}
|
|
|
|
|
|
}
|