Browse Source

重构knowledge service

MarkHuang 6 years atrás
parent
commit
4ac441f24b
31 changed files with 959 additions and 4 deletions
  1. 88 0
      knowledge-service/src/main/java/com/diagbot/entity/Bodypart.java
  2. 91 0
      knowledge-service/src/main/java/com/diagbot/entity/Information.java
  3. 56 0
      knowledge-service/src/main/java/com/diagbot/entity/Lexicon.java
  4. 78 0
      knowledge-service/src/main/java/com/diagbot/entity/Library.java
  5. 205 0
      knowledge-service/src/main/java/com/diagbot/entity/Symptom.java
  6. 16 0
      knowledge-service/src/main/java/com/diagbot/mapper/BodypartMapper.java
  7. 16 0
      knowledge-service/src/main/java/com/diagbot/mapper/InformationMapper.java
  8. 16 0
      knowledge-service/src/main/java/com/diagbot/mapper/LexiconMapper.java
  9. 16 0
      knowledge-service/src/main/java/com/diagbot/mapper/LibraryMapper.java
  10. 16 0
      knowledge-service/src/main/java/com/diagbot/mapper/SymptomMapper.java
  11. 16 0
      knowledge-service/src/main/java/com/diagbot/service/BodypartService.java
  12. 16 0
      knowledge-service/src/main/java/com/diagbot/service/InformationService.java
  13. 16 0
      knowledge-service/src/main/java/com/diagbot/service/LexiconService.java
  14. 16 0
      knowledge-service/src/main/java/com/diagbot/service/LibraryService.java
  15. 16 0
      knowledge-service/src/main/java/com/diagbot/service/SymptomService.java
  16. 20 0
      knowledge-service/src/main/java/com/diagbot/service/impl/BodypartServiceImpl.java
  17. 20 0
      knowledge-service/src/main/java/com/diagbot/service/impl/InformationServiceImpl.java
  18. 20 0
      knowledge-service/src/main/java/com/diagbot/service/impl/LexiconServiceImpl.java
  19. 20 0
      knowledge-service/src/main/java/com/diagbot/service/impl/LibraryServiceImpl.java
  20. 20 0
      knowledge-service/src/main/java/com/diagbot/service/impl/SymptomServiceImpl.java
  21. 20 0
      knowledge-service/src/main/java/com/diagbot/web/BodypartController.java
  22. 20 0
      knowledge-service/src/main/java/com/diagbot/web/InformationController.java
  23. 20 0
      knowledge-service/src/main/java/com/diagbot/web/LexiconController.java
  24. 20 0
      knowledge-service/src/main/java/com/diagbot/web/LibraryController.java
  25. 20 0
      knowledge-service/src/main/java/com/diagbot/web/SymptomController.java
  26. 14 0
      knowledge-service/src/main/resources/mapper/BodypartMapper.xml
  27. 14 0
      knowledge-service/src/main/resources/mapper/InformationMapper.xml
  28. 13 0
      knowledge-service/src/main/resources/mapper/LexiconMapper.xml
  29. 13 0
      knowledge-service/src/main/resources/mapper/LibraryMapper.xml
  30. 23 0
      knowledge-service/src/main/resources/mapper/SymptomMapper.xml
  31. 4 4
      knowledge-service/src/test/java/com/diagbot/CodeGeneration.java

+ 88 - 0
knowledge-service/src/main/java/com/diagbot/entity/Bodypart.java

@@ -0,0 +1,88 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public class Bodypart implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 二级部位
+     */
+    private String subBodypart;
+
+    /**
+     * 二级部位排序号
+     */
+    private Integer subOrder;
+
+    /**
+     * 一级部位
+     */
+    private String bodypart;
+
+    /**
+     * 一级部位排序号
+     */
+    private Integer order;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getSubBodypart() {
+        return subBodypart;
+    }
+
+    public void setSubBodypart(String subBodypart) {
+        this.subBodypart = subBodypart;
+    }
+    public Integer getSubOrder() {
+        return subOrder;
+    }
+
+    public void setSubOrder(Integer subOrder) {
+        this.subOrder = subOrder;
+    }
+    public String getBodypart() {
+        return bodypart;
+    }
+
+    public void setBodypart(String bodypart) {
+        this.bodypart = bodypart;
+    }
+    public Integer getOrder() {
+        return order;
+    }
+
+    public void setOrder(Integer order) {
+        this.order = order;
+    }
+
+    @Override
+    public String toString() {
+        return "Bodypart{" +
+        "id=" + id +
+        ", subBodypart=" + subBodypart +
+        ", subOrder=" + subOrder +
+        ", bodypart=" + bodypart +
+        ", order=" + order +
+        "}";
+    }
+}

+ 91 - 0
knowledge-service/src/main/java/com/diagbot/entity/Information.java

@@ -0,0 +1,91 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public class Information implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 内容id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 术语名称
+     */
+    private String name;
+
+    /**
+     * 对应术语id
+     */
+    private Integer libId;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public Integer getLibId() {
+        return libId;
+    }
+
+    public void setLibId(Integer libId) {
+        this.libId = libId;
+    }
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public String toString() {
+        return "Information{" +
+        "id=" + id +
+        ", name=" + name +
+        ", libId=" + libId +
+        ", title=" + title +
+        ", content=" + content +
+        "}";
+    }
+}

+ 56 - 0
knowledge-service/src/main/java/com/diagbot/entity/Lexicon.java

@@ -0,0 +1,56 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public class Lexicon implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    private String name;
+
+    private String remark;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "Lexicon{" +
+        "id=" + id +
+        ", name=" + name +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 78 - 0
knowledge-service/src/main/java/com/diagbot/entity/Library.java

@@ -0,0 +1,78 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public class Library implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 术语id
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 术语名称
+     */
+    private String name;
+
+    /**
+     * 类型id
+     */
+    private Integer type;
+
+    /**
+     * 同义词id
+     */
+    private Integer synony;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+    public Integer getSynony() {
+        return synony;
+    }
+
+    public void setSynony(Integer synony) {
+        this.synony = synony;
+    }
+
+    @Override
+    public String toString() {
+        return "Library{" +
+        "id=" + id +
+        ", name=" + name +
+        ", type=" + type +
+        ", synony=" + synony +
+        "}";
+    }
+}

+ 205 - 0
knowledge-service/src/main/java/com/diagbot/entity/Symptom.java

@@ -0,0 +1,205 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public class Symptom implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 症状名称
+     */
+    private String name;
+
+    /**
+     * 症状类型
+     */
+    private String type;
+
+    /**
+     * 症状标准名
+     */
+    private String stdName;
+
+    /**
+     * 大症状名称
+     */
+    private String cateName;
+
+    /**
+     * 症状类组
+     */
+    private String group;
+
+    /**
+     * 性别:1:男, 2:女, 3:通用
+     */
+    private String gender;
+
+    /**
+     * 症状发生的最小年龄
+     */
+    private Integer minAge;
+
+    /**
+     * 症状发生的最大年龄
+     */
+    private Integer maxAge;
+
+    /**
+     * 一级部位
+     */
+    private String bodypart;
+
+    /**
+     * 二级部位
+     */
+    private String subBodypart;
+
+    /**
+     * 显示顺序
+     */
+    private String displayOrder;
+
+    /**
+     * 术语身份编码
+     */
+    private String code;
+
+    /**
+     * 备注
+     */
+    private String note;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+    public String getStdName() {
+        return stdName;
+    }
+
+    public void setStdName(String stdName) {
+        this.stdName = stdName;
+    }
+    public String getCateName() {
+        return cateName;
+    }
+
+    public void setCateName(String cateName) {
+        this.cateName = cateName;
+    }
+    public String getGroup() {
+        return group;
+    }
+
+    public void setGroup(String group) {
+        this.group = group;
+    }
+    public String getGender() {
+        return gender;
+    }
+
+    public void setGender(String gender) {
+        this.gender = gender;
+    }
+    public Integer getMinAge() {
+        return minAge;
+    }
+
+    public void setMinAge(Integer minAge) {
+        this.minAge = minAge;
+    }
+    public Integer getMaxAge() {
+        return maxAge;
+    }
+
+    public void setMaxAge(Integer maxAge) {
+        this.maxAge = maxAge;
+    }
+    public String getBodypart() {
+        return bodypart;
+    }
+
+    public void setBodypart(String bodypart) {
+        this.bodypart = bodypart;
+    }
+    public String getSubBodypart() {
+        return subBodypart;
+    }
+
+    public void setSubBodypart(String subBodypart) {
+        this.subBodypart = subBodypart;
+    }
+    public String getDisplayOrder() {
+        return displayOrder;
+    }
+
+    public void setDisplayOrder(String displayOrder) {
+        this.displayOrder = displayOrder;
+    }
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+    public String getNote() {
+        return note;
+    }
+
+    public void setNote(String note) {
+        this.note = note;
+    }
+
+    @Override
+    public String toString() {
+        return "Symptom{" +
+        "id=" + id +
+        ", name=" + name +
+        ", type=" + type +
+        ", stdName=" + stdName +
+        ", cateName=" + cateName +
+        ", group=" + group +
+        ", gender=" + gender +
+        ", minAge=" + minAge +
+        ", maxAge=" + maxAge +
+        ", bodypart=" + bodypart +
+        ", subBodypart=" + subBodypart +
+        ", displayOrder=" + displayOrder +
+        ", code=" + code +
+        ", note=" + note +
+        "}";
+    }
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/mapper/BodypartMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.Bodypart;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface BodypartMapper extends BaseMapper<Bodypart> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/mapper/InformationMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.Information;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface InformationMapper extends BaseMapper<Information> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/mapper/LexiconMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.Lexicon;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface LexiconMapper extends BaseMapper<Lexicon> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/mapper/LibraryMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.Library;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface LibraryMapper extends BaseMapper<Library> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/mapper/SymptomMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.Symptom;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface SymptomMapper extends BaseMapper<Symptom> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/service/BodypartService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.Bodypart;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface BodypartService extends IService<Bodypart> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/service/InformationService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.Information;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface InformationService extends IService<Information> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/service/LexiconService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.Lexicon;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface LexiconService extends IService<Lexicon> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/service/LibraryService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.Library;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface LibraryService extends IService<Library> {
+
+}

+ 16 - 0
knowledge-service/src/main/java/com/diagbot/service/SymptomService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.Symptom;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+public interface SymptomService extends IService<Symptom> {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/service/impl/BodypartServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.Bodypart;
+import com.diagbot.mapper.BodypartMapper;
+import com.diagbot.service.BodypartService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Service
+public class BodypartServiceImpl extends ServiceImpl<BodypartMapper, Bodypart> implements BodypartService {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/service/impl/InformationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.Information;
+import com.diagbot.mapper.InformationMapper;
+import com.diagbot.service.InformationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Service
+public class InformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements InformationService {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/service/impl/LexiconServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.Lexicon;
+import com.diagbot.mapper.LexiconMapper;
+import com.diagbot.service.LexiconService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Service
+public class LexiconServiceImpl extends ServiceImpl<LexiconMapper, Lexicon> implements LexiconService {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/service/impl/LibraryServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.Library;
+import com.diagbot.mapper.LibraryMapper;
+import com.diagbot.service.LibraryService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Service
+public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> implements LibraryService {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/service/impl/SymptomServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.Symptom;
+import com.diagbot.mapper.SymptomMapper;
+import com.diagbot.service.SymptomService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Service
+public class SymptomServiceImpl extends ServiceImpl<SymptomMapper, Symptom> implements SymptomService {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/web/BodypartController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Controller
+@RequestMapping("/bodypart")
+public class BodypartController {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/web/InformationController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Controller
+@RequestMapping("/information")
+public class InformationController {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/web/LexiconController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Controller
+@RequestMapping("/lexicon")
+public class LexiconController {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/web/LibraryController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Controller
+@RequestMapping("/library")
+public class LibraryController {
+
+}

+ 20 - 0
knowledge-service/src/main/java/com/diagbot/web/SymptomController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Weixuan Huang
+ * @since 2019-01-14
+ */
+@Controller
+@RequestMapping("/symptom")
+public class SymptomController {
+
+}

+ 14 - 0
knowledge-service/src/main/resources/mapper/BodypartMapper.xml

@@ -0,0 +1,14 @@
+<?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.BodypartMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.Bodypart">
+        <id column="id" property="id" />
+        <result column="sub_bodypart" property="subBodypart" />
+        <result column="sub_order" property="subOrder" />
+        <result column="bodypart" property="bodypart" />
+        <result column="order" property="order" />
+    </resultMap>
+
+</mapper>

+ 14 - 0
knowledge-service/src/main/resources/mapper/InformationMapper.xml

@@ -0,0 +1,14 @@
+<?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.InformationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.Information">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <result column="lib_id" property="libId" />
+        <result column="title" property="title" />
+        <result column="content" property="content" />
+    </resultMap>
+
+</mapper>

+ 13 - 0
knowledge-service/src/main/resources/mapper/LexiconMapper.xml

@@ -0,0 +1,13 @@
+<?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.LexiconMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.Lexicon">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <result column="remark" property="remark" />
+        <result column="class" property="class" />
+    </resultMap>
+
+</mapper>

+ 13 - 0
knowledge-service/src/main/resources/mapper/LibraryMapper.xml

@@ -0,0 +1,13 @@
+<?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.LibraryMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.Library">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <result column="type" property="type" />
+        <result column="synony" property="synony" />
+    </resultMap>
+
+</mapper>

+ 23 - 0
knowledge-service/src/main/resources/mapper/SymptomMapper.xml

@@ -0,0 +1,23 @@
+<?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.SymptomMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.Symptom">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <result column="type" property="type" />
+        <result column="std_name" property="stdName" />
+        <result column="cate_name" property="cateName" />
+        <result column="group" property="group" />
+        <result column="gender" property="gender" />
+        <result column="min_age" property="minAge" />
+        <result column="max_age" property="maxAge" />
+        <result column="bodypart" property="bodypart" />
+        <result column="sub_bodypart" property="subBodypart" />
+        <result column="display_order" property="displayOrder" />
+        <result column="code" property="code" />
+        <result column="note" property="note" />
+    </resultMap>
+
+</mapper>

+ 4 - 4
knowledge-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("gaodm");// 作者
+        gc.setAuthor("Weixuan Huang");// 作者
 
         // 自定义文件命名,注意 %s 会自动填充表实体属性!
         gc.setControllerName("%sController");
@@ -48,15 +48,15 @@ public class CodeGeneration {
         dsc.setDbType(DbType.MYSQL);
         dsc.setDriverName("com.mysql.jdbc.Driver");
         dsc.setUsername("root");
-        dsc.setPassword("root");
-        dsc.setUrl("jdbc:mysql://127.0.0.1:3306/sys-log?useUnicode=true&characterEncoding=utf-8");
+        dsc.setPassword("diagbot@20180822");
+        dsc.setUrl("jdbc:mysql://192.168.2.235:3306/diagbot-med?useUnicode=true&characterEncoding=utf-8");
         mpg.setDataSource(dsc);
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
 //        strategy.setTablePrefix(new String[] { "sys_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "sys_log" }); // 需要生成的表
+        strategy.setInclude(new String[] { "library","bodypart","information","lexicon","symptom" }); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);