Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

zhoutg 4 anni fa
parent
commit
fc50335386

+ 23 - 0
src/main/java/com/diagbot/facade/StaticKnowledgeFacade.java

@@ -0,0 +1,23 @@
+package com.diagbot.facade;
+
+import com.diagbot.vo.HasStaticKnowledgeVO;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/25 14:13
+ */
+@Component
+public class StaticKnowledgeFacade {
+
+    /**
+     * 更新是否包含静态知识状态
+     *
+     * @param hasStaticKnowledgeVO
+     * @return
+     */
+    public Boolean updateHasInfoStatus(HasStaticKnowledgeVO hasStaticKnowledgeVO) {
+        return true;
+    }
+}

+ 32 - 0
src/main/java/com/diagbot/vo/HasStaticKnowledgeVO.java

@@ -0,0 +1,32 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/25 14:02
+ */
+@Getter
+@Setter
+public class HasStaticKnowledgeVO {
+    /**
+     * 标准术语名称
+     */
+    @NotBlank(message = "请输入标准术语名称")
+    private String name;
+    /**
+     * 术语类型
+     */
+    @NotBlank(message = "请输入术语类型")
+    private String type;
+    /**
+     * 是否有静态知识:0-无,1-有
+     */
+    @NotNull(message = "请输入是否有静态信息(0-无,1-有)")
+    private Integer hasInfo;
+}

+ 39 - 0
src/main/java/com/diagbot/web/StaticKnowledgeController.java

@@ -0,0 +1,39 @@
+package com.diagbot.web;
+
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.StaticKnowledgeFacade;
+import com.diagbot.vo.HasStaticKnowledgeVO;
+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.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/8/25 14:16
+ */
+@RestController
+@RequestMapping("/staticKnowledge")
+@Api(value = "静态信息相关API", tags = { "静态信息相关API" })
+@SuppressWarnings("unchecked")
+public class StaticKnowledgeController {
+
+    @Autowired
+    private StaticKnowledgeFacade staticKnowledgeFacade;
+
+    @ApiOperation(value = "更新是否有静态信息状态[zhaops]",
+            notes = "type: 术语类型<br>" +
+                    "name: 标准术语名称<br>" +
+                    "是否有静态知识:0-无,1-有<br>")
+    @PostMapping("/updateHasInfoStatus")
+    public RespDTO<Boolean> updateHasInfoStatus(@Valid @RequestBody HasStaticKnowledgeVO hasStaticKnowledgeVO) {
+        Boolean data = staticKnowledgeFacade.updateHasInfoStatus(hasStaticKnowledgeVO);
+        return RespDTO.onSuc(data);
+    }
+}