Browse Source

常用标签相关

wangyu 6 years ago
parent
commit
f867e9c068

+ 170 - 0
icss-service/src/main/java/com/diagbot/entity/QuestionUsual.java

@@ -0,0 +1,170 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 常用标签表
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+@TableName("icss_question_usual")
+public class QuestionUsual implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 标签id
+     */
+    private Long questionId;
+
+    /**
+     * 科室id
+     */
+    private Long deptId;
+
+    /**
+     * 1:常见,0:不常见
+     */
+    private String usual;
+
+    private String type;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+    public String getUsual() {
+        return usual;
+    }
+
+    public void setUsual(String usual) {
+        this.usual = usual;
+    }
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionUsual{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", questionId=" + questionId +
+        ", deptId=" + deptId +
+        ", usual=" + usual +
+        ", type=" + type +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/mapper/QuestionUsualMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QuestionUsual;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 常用标签表 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+public interface QuestionUsualMapper extends BaseMapper<QuestionUsual> {
+
+}

+ 16 - 0
icss-service/src/main/java/com/diagbot/service/QuestionUsualService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QuestionUsual;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 常用标签表 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+public interface QuestionUsualService extends IService<QuestionUsual> {
+
+}

+ 20 - 0
icss-service/src/main/java/com/diagbot/service/impl/QuestionUsualServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.QuestionUsual;
+import com.diagbot.mapper.QuestionUsualMapper;
+import com.diagbot.service.QuestionUsualService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 常用标签表 服务实现类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+@Service
+public class QuestionUsualServiceImpl extends ServiceImpl<QuestionUsualMapper, QuestionUsual> implements QuestionUsualService {
+
+}

+ 21 - 0
icss-service/src/main/java/com/diagbot/web/QuestionUsualController.java

@@ -0,0 +1,21 @@
+package com.diagbot.web;
+
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 常用标签表 前端控制器
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-11-16
+ */
+@RestController
+@RequestMapping("/questionUsual")
+@Api(value = "常用标签检索API", tags = { "常用标签API" })
+public class QuestionUsualController {
+
+}

+ 5 - 4
icss-service/src/main/java/com/diagbot/web/RetrievalController.java

@@ -1,20 +1,21 @@
 package com.diagbot.web;
 
 
+import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
- * 检索表 前端控制器
+ * 同义词检索检索表 前端控制器
  * </p>
  *
  * @author wangyu
  * @since 2018-11-16
  */
-@Controller
+@RestController
 @RequestMapping("/retrieval")
+@Api(value = "同义词检索API", tags = { "同义词检索API" })
 public class RetrievalController {
 
 }

+ 2 - 3
icss-service/src/main/java/com/diagbot/web/RetrievalMappingController.java

@@ -2,8 +2,7 @@ package com.diagbot.web;
 
 
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,7 +12,7 @@ import org.springframework.stereotype.Controller;
  * @author wangyu
  * @since 2018-11-16
  */
-@Controller
+@RestController
 @RequestMapping("/retrievalMapping")
 public class RetrievalMappingController {
 

+ 20 - 0
icss-service/src/main/resources/mapper/QuestionUsualMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.QuestionUsualMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QuestionUsual">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="question_id" property="questionId" />
+        <result column="dept_id" property="deptId" />
+        <result column="usual" property="usual" />
+        <result column="type" property="type" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 2 - 2
icss-service/src/test/java/com/diagbot/CodeGeneration.java

@@ -33,7 +33,7 @@ public class CodeGeneration {
         gc.setEnableCache(false);// XML 二级缓存
         gc.setBaseResultMap(true);// XML ResultMap
         gc.setBaseColumnList(false);// XML columList
-        gc.setAuthor("zhoutg");// 作者
+        gc.setAuthor("wangyu");// 作者
 
         // 自定义文件命名,注意 %s 会自动填充表实体属性!
         gc.setControllerName("%sController");
@@ -56,7 +56,7 @@ public class CodeGeneration {
         StrategyConfig strategy = new StrategyConfig();
         strategy.setTablePrefix(new String[] { "icss_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "icss_module_question" }); // 需要生成的表
+        strategy.setInclude(new String[] { "icss_question_usual" }); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);