Explorar o código

Merge remote-tracking branch 'origin/dev/icss' into dev/icss

zhoutg %!s(int64=6) %!d(string=hai) anos
pai
achega
57aa6a0e38
Modificáronse 48 ficheiros con 1498 adicións e 54 borrados
  1. 19 0
      icss-service/src/main/java/com/diagbot/dto/IntroduceDTO.java
  2. 7 7
      icss-service/src/main/java/com/diagbot/entity/DeptVital.java
  3. 7 7
      icss-service/src/main/java/com/diagbot/entity/IntroduceDetail.java
  4. 8 8
      icss-service/src/main/java/com/diagbot/entity/IntroduceInfo.java
  5. 9 8
      icss-service/src/main/java/com/diagbot/entity/IntroduceMap.java
  6. 170 0
      icss-service/src/main/java/com/diagbot/entity/QuestionUsual.java
  7. 7 7
      icss-service/src/main/java/com/diagbot/entity/VitalOrder.java
  8. 14 0
      icss-service/src/main/java/com/diagbot/facade/IntroduceDetailFacade.java
  9. 75 0
      icss-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java
  10. 13 0
      icss-service/src/main/java/com/diagbot/facade/IntroduceMapFacade.java
  11. 16 0
      icss-service/src/main/java/com/diagbot/mapper/QuestionUsualMapper.java
  12. 16 0
      icss-service/src/main/java/com/diagbot/service/QuestionUsualService.java
  13. 20 0
      icss-service/src/main/java/com/diagbot/service/impl/QuestionUsualServiceImpl.java
  14. 20 0
      icss-service/src/main/java/com/diagbot/vo/IntroduceByQuestionVO.java
  15. 2 1
      icss-service/src/main/java/com/diagbot/web/DeptVitalController.java
  16. 2 1
      icss-service/src/main/java/com/diagbot/web/IntroduceDetailController.java
  17. 33 2
      icss-service/src/main/java/com/diagbot/web/IntroduceInfoController.java
  18. 2 3
      icss-service/src/main/java/com/diagbot/web/IntroduceMapController.java
  19. 21 0
      icss-service/src/main/java/com/diagbot/web/QuestionUsualController.java
  20. 5 4
      icss-service/src/main/java/com/diagbot/web/RetrievalController.java
  21. 2 3
      icss-service/src/main/java/com/diagbot/web/RetrievalMappingController.java
  22. 2 1
      icss-service/src/main/java/com/diagbot/web/VitalOrderController.java
  23. 20 0
      icss-service/src/main/resources/mapper/QuestionUsualMapper.xml
  24. 2 2
      icss-service/src/test/java/com/diagbot/CodeGeneration.java
  25. 9 0
      icssman-service/src/main/java/com/diagbot/dto/IntroduceDTO.java
  26. 172 0
      icssman-service/src/main/java/com/diagbot/entity/IntroduceDetail.java
  27. 133 0
      icssman-service/src/main/java/com/diagbot/entity/IntroduceInfo.java
  28. 156 0
      icssman-service/src/main/java/com/diagbot/entity/IntroduceMap.java
  29. 13 0
      icssman-service/src/main/java/com/diagbot/facade/IntroduceDetailFacade.java
  30. 135 0
      icssman-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java
  31. 13 0
      icssman-service/src/main/java/com/diagbot/facade/IntroduceMapFacade.java
  32. 16 0
      icssman-service/src/main/java/com/diagbot/mapper/IntroduceDetailMapper.java
  33. 16 0
      icssman-service/src/main/java/com/diagbot/mapper/IntroduceInfoMapper.java
  34. 16 0
      icssman-service/src/main/java/com/diagbot/mapper/IntroduceMapMapper.java
  35. 16 0
      icssman-service/src/main/java/com/diagbot/service/IntroduceDetailService.java
  36. 16 0
      icssman-service/src/main/java/com/diagbot/service/IntroduceInfoService.java
  37. 16 0
      icssman-service/src/main/java/com/diagbot/service/IntroduceMapService.java
  38. 20 0
      icssman-service/src/main/java/com/diagbot/service/impl/IntroduceDetailServiceImpl.java
  39. 20 0
      icssman-service/src/main/java/com/diagbot/service/impl/IntroduceInfoServiceImpl.java
  40. 20 0
      icssman-service/src/main/java/com/diagbot/service/impl/IntroduceMapServiceImpl.java
  41. 18 0
      icssman-service/src/main/java/com/diagbot/vo/IntroducePageVO.java
  42. 23 0
      icssman-service/src/main/java/com/diagbot/vo/IntroduceVO.java
  43. 19 0
      icssman-service/src/main/java/com/diagbot/web/IntroduceDetailController.java
  44. 84 0
      icssman-service/src/main/java/com/diagbot/web/IntroduceInfoController.java
  45. 19 0
      icssman-service/src/main/java/com/diagbot/web/IntroduceMapController.java
  46. 20 0
      icssman-service/src/main/resources/mapper/IntroduceDetailMapper.xml
  47. 17 0
      icssman-service/src/main/resources/mapper/IntroduceInfoMapper.xml
  48. 19 0
      icssman-service/src/main/resources/mapper/IntroduceMapMapper.xml

+ 19 - 0
icss-service/src/main/java/com/diagbot/dto/IntroduceDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.IntroduceDetail;
+import com.diagbot.entity.IntroduceInfo;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 10:32
+ */
+@Getter
+@Setter
+public class IntroduceDTO extends IntroduceInfo {
+    private List<IntroduceDetail> introduceDetailList;
+}

+ 7 - 7
icss-service/src/main/java/com/diagbot/entity/DeptVital.java

@@ -3,7 +3,7 @@ package com.diagbot.entity;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
+import java.util.Date;
 import java.io.Serializable;
 
 /**
@@ -33,12 +33,12 @@ public class DeptVital implements Serializable {
     /**
      * 记录创建时间
      */
-    private LocalDateTime gmtCreate;
+    private Date gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private LocalDateTime gmtModified;
+    private Date gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -79,18 +79,18 @@ public class DeptVital implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-    public LocalDateTime getGmtCreate() {
+    public Date getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(LocalDateTime gmtCreate) {
+    public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-    public LocalDateTime getGmtModified() {
+    public Date getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(LocalDateTime gmtModified) {
+    public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
     public String getCreator() {

+ 7 - 7
icss-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -3,7 +3,7 @@ package com.diagbot.entity;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
+import java.util.Date;
 import java.io.Serializable;
 
 /**
@@ -33,12 +33,12 @@ public class IntroduceDetail implements Serializable {
     /**
      * 记录创建时间
      */
-    private LocalDateTime gmtCreate;
+    private Date gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private LocalDateTime gmtModified;
+    private Date gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -89,18 +89,18 @@ public class IntroduceDetail implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-    public LocalDateTime getGmtCreate() {
+    public Date getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(LocalDateTime gmtCreate) {
+    public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-    public LocalDateTime getGmtModified() {
+    public Date getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(LocalDateTime gmtModified) {
+    public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
     public String getCreator() {

+ 8 - 8
icss-service/src/main/java/com/diagbot/entity/IntroduceInfo.java

@@ -1,10 +1,10 @@
 package com.diagbot.entity;
 
-import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * <p>
@@ -33,12 +33,12 @@ public class IntroduceInfo implements Serializable {
     /**
      * 记录创建时间
      */
-    private LocalDateTime gmtCreate;
+    private Date gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private LocalDateTime gmtModified;
+    private Date gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -74,18 +74,18 @@ public class IntroduceInfo implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-    public LocalDateTime getGmtCreate() {
+    public Date getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(LocalDateTime gmtCreate) {
+    public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-    public LocalDateTime getGmtModified() {
+    public Date getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(LocalDateTime gmtModified) {
+    public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
     public String getCreator() {

+ 9 - 8
icss-service/src/main/java/com/diagbot/entity/IntroduceMap.java

@@ -1,10 +1,11 @@
 package com.diagbot.entity;
 
-import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableName;
+
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * <p>
@@ -33,12 +34,12 @@ public class IntroduceMap implements Serializable {
     /**
      * 记录创建时间
      */
-    private LocalDateTime gmtCreate;
+    private Date gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private LocalDateTime gmtModified;
+    private Date gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -81,18 +82,18 @@ public class IntroduceMap implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-    public LocalDateTime getGmtCreate() {
+    public Date getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(LocalDateTime gmtCreate) {
+    public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-    public LocalDateTime getGmtModified() {
+    public Date getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(LocalDateTime gmtModified) {
+    public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
     public String getCreator() {

+ 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 +
+        "}";
+    }
+}

+ 7 - 7
icss-service/src/main/java/com/diagbot/entity/VitalOrder.java

@@ -3,7 +3,7 @@ package com.diagbot.entity;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
+import java.util.Date;
 import java.io.Serializable;
 
 /**
@@ -33,12 +33,12 @@ public class VitalOrder implements Serializable {
     /**
      * 记录创建时间
      */
-    private LocalDateTime gmtCreate;
+    private Date gmtCreate;
 
     /**
      * 记录修改时间,如果时间是1970年则表示纪录未修改
      */
-    private LocalDateTime gmtModified;
+    private Date gmtModified;
 
     /**
      * 创建人,0表示无创建人值
@@ -74,18 +74,18 @@ public class VitalOrder implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-    public LocalDateTime getGmtCreate() {
+    public Date getGmtCreate() {
         return gmtCreate;
     }
 
-    public void setGmtCreate(LocalDateTime gmtCreate) {
+    public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-    public LocalDateTime getGmtModified() {
+    public Date getGmtModified() {
         return gmtModified;
     }
 
-    public void setGmtModified(LocalDateTime gmtModified) {
+    public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
     public String getCreator() {

+ 14 - 0
icss-service/src/main/java/com/diagbot/facade/IntroduceDetailFacade.java

@@ -0,0 +1,14 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.IntroduceDetailServiceImpl;
+import com.diagbot.web.IntroduceDetailController;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 9:28
+ */
+@Component
+public class IntroduceDetailFacade extends IntroduceDetailServiceImpl {
+}

+ 75 - 0
icss-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java

@@ -0,0 +1,75 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.IntroduceDTO;
+import com.diagbot.entity.IntroduceDetail;
+import com.diagbot.entity.IntroduceInfo;
+import com.diagbot.entity.IntroduceMap;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.IntroduceInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.vo.IntroduceByQuestionVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 9:27
+ */
+@Component
+public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
+    @Autowired
+    IntroduceMapFacade introduceMapFacade;
+    @Autowired
+    IntroduceDetailFacade introduceDetailFacade;
+
+    /**
+     * 根据标签获取提示信息
+     *
+     * @param introduceByQuestionVO
+     * @return
+     */
+    public IntroduceDTO getByQuestion(IntroduceByQuestionVO introduceByQuestionVO) {
+
+        QueryWrapper<IntroduceMap> introduceMapQueryWrapper = new QueryWrapper<>();
+        introduceMapQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("question_id", introduceByQuestionVO.getQuestionId()).
+                eq("type", introduceByQuestionVO.getType());
+        IntroduceMap introduceMap = introduceMapFacade.getOne(introduceMapQueryWrapper);
+        if (introduceMap == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息未维护");
+        }
+
+        IntroduceDTO introduceDTO = this.getRecordById(introduceMap.getIntroduceId());
+        return introduceDTO;
+    }
+
+    /**
+     * 根据id获取提示信息
+     *
+     * @param id
+     * @return
+     */
+    public IntroduceDTO getRecordById(Long id) {
+        IntroduceDTO introduceDTO = new IntroduceDTO();
+        IntroduceInfo introduceInfo = this.getById(id);
+        if (introduceInfo == null) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息未维护");
+        } else if (introduceInfo.getIsDeleted().equals(IsDeleteEnum.Y.getKey())) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "提示信息已删除");
+        }
+        BeanUtil.copyProperties(introduceInfo, introduceDTO);
+
+        QueryWrapper<IntroduceDetail> introduceDetailQueryWrapper = new QueryWrapper<>();
+        introduceDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("introduce_id", introduceInfo.getId());
+        List<IntroduceDetail> introduceDetailList = introduceDetailFacade.list(introduceDetailQueryWrapper);
+        introduceDTO.setIntroduceDetailList(introduceDetailList);
+        return introduceDTO;
+    }
+}

+ 13 - 0
icss-service/src/main/java/com/diagbot/facade/IntroduceMapFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.IntroduceMapServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 9:28
+ */
+@Component
+public class IntroduceMapFacade extends IntroduceMapServiceImpl {
+}

+ 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 {
+
+}

+ 20 - 0
icss-service/src/main/java/com/diagbot/vo/IntroduceByQuestionVO.java

@@ -0,0 +1,20 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:通过标签获取提示信息入参
+ * @Author:zhaops
+ * @time: 2018/11/16 10:29
+ */
+@Getter
+@Setter
+public class IntroduceByQuestionVO {
+    @NotNull(message = "请输入标签id")
+    private Long questionId;
+    @NotNull(message = "请输入标签类型")
+    private Integer type;
+}

+ 2 - 1
icss-service/src/main/java/com/diagbot/web/DeptVitalController.java

@@ -4,6 +4,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 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author zhaops
  * @since 2018-11-15
  */
-@Controller
+@RestController
 @RequestMapping("/deptVital")
 public class DeptVitalController {
 

+ 2 - 1
icss-service/src/main/java/com/diagbot/web/IntroduceDetailController.java

@@ -4,6 +4,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 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author zhaops
  * @since 2018-11-15
  */
-@Controller
+@RestController
 @RequestMapping("/introduceDetail")
 public class IntroduceDetailController {
 

+ 33 - 2
icss-service/src/main/java/com/diagbot/web/IntroduceInfoController.java

@@ -1,9 +1,20 @@
 package com.diagbot.web;
 
 
+import com.diagbot.dto.IntroduceDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.IntroduceInfoFacade;
+import com.diagbot.vo.IntroduceByQuestionVO;
+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;
 
-import org.springframework.stereotype.Controller;
+import javax.validation.Valid;
 
 /**
  * <p>
@@ -13,8 +24,28 @@ import org.springframework.stereotype.Controller;
  * @author zhaops
  * @since 2018-11-15
  */
-@Controller
+@RestController
 @RequestMapping("/introduceInfo")
+@Api(value = "提示信息相关API", tags = { "提示信息相关API" })
 public class IntroduceInfoController {
 
+    @Autowired
+    IntroduceInfoFacade introduceInfoFacade;
+
+    @ApiOperation(value = "根据标签获取提示信息[by:zhaops]",
+            notes = "questionId: 标签id,必填<br>" +
+                    "type:标签类型,必填")
+    @PostMapping("/getByQuestion")
+    public RespDTO<IntroduceDTO> getByQuestion(@RequestBody @Valid IntroduceByQuestionVO introduceByQuestionVO) {
+        IntroduceDTO introduceDTO = introduceInfoFacade.getByQuestion(introduceByQuestionVO);
+        return RespDTO.onSuc(introduceDTO);
+    }
+
+    @ApiOperation(value = "根据id获取提示信息[by:zhaops]",
+            notes = "id: 提示信息id,必填<br>")
+    @PostMapping("/getRecordById")
+    public RespDTO<IntroduceDTO> getRecordById(@RequestParam Long id) {
+        IntroduceDTO introduceDTO = introduceInfoFacade.getRecordById(id);
+        return RespDTO.onSuc(introduceDTO);
+    }
 }

+ 2 - 3
icss-service/src/main/java/com/diagbot/web/IntroduceMapController.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 zhaops
  * @since 2018-11-15
  */
-@Controller
+@RestController
 @RequestMapping("/introduceMap")
 public class IntroduceMapController {
 

+ 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 {
 

+ 2 - 1
icss-service/src/main/java/com/diagbot/web/VitalOrderController.java

@@ -4,6 +4,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 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author zhaops
  * @since 2018-11-15
  */
-@Controller
+@RestController
 @RequestMapping("/vitalOrder")
 public class VitalOrderController {
 

+ 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);

+ 9 - 0
icssman-service/src/main/java/com/diagbot/dto/IntroduceDTO.java

@@ -0,0 +1,9 @@
+package com.diagbot.dto;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 16:07
+ */
+public class IntroduceDTO {
+}

+ 172 - 0
icssman-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -0,0 +1,172 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 提示信息明细
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@TableName("icss_introduce_detail")
+public class IntroduceDetail 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 introduceId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 显示位置:1-右侧显示,0-都显示
+     */
+    private Integer position;
+
+    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 getIntroduceId() {
+        return introduceId;
+    }
+
+    public void setIntroduceId(Long introduceId) {
+        this.introduceId = introduceId;
+    }
+    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;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public Integer getPosition() {
+        return position;
+    }
+
+    public void setPosition(Integer position) {
+        this.position = position;
+    }
+
+    @Override
+    public String toString() {
+        return "IntroduceDetail{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", introduceId=" + introduceId +
+        ", title=" + title +
+        ", content=" + content +
+        ", orderNo=" + orderNo +
+        ", position=" + position +
+        "}";
+    }
+}

+ 133 - 0
icssman-service/src/main/java/com/diagbot/entity/IntroduceInfo.java

@@ -0,0 +1,133 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 提示信息
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@TableName("icss_introduce_info")
+public class IntroduceInfo 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;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    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 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 "IntroduceInfo{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", name=" + name +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 156 - 0
icssman-service/src/main/java/com/diagbot/entity/IntroduceMap.java

@@ -0,0 +1,156 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 标签与提示信息映射表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@TableName("icss_introduce_map")
+public class IntroduceMap 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 introduceId;
+
+    /**
+     * 类型(参照icss_question_info)
+     */
+    private Integer 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 getIntroduceId() {
+        return introduceId;
+    }
+
+    public void setIntroduceId(Long introduceId) {
+        this.introduceId = introduceId;
+    }
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "IntroduceMap{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", questionId=" + questionId +
+        ", introduceId=" + introduceId +
+        ", type=" + type +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 13 - 0
icssman-service/src/main/java/com/diagbot/facade/IntroduceDetailFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.IntroduceDetailServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 14:31
+ */
+@Component
+public class IntroduceDetailFacade extends IntroduceDetailServiceImpl {
+}

+ 135 - 0
icssman-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java

@@ -0,0 +1,135 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.entity.IntroduceDetail;
+import com.diagbot.entity.IntroduceInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.impl.IntroduceInfoServiceImpl;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.IntroducePageVO;
+import com.diagbot.vo.IntroduceVO;
+import io.swagger.models.auth.In;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 14:30
+ */
+@Component
+public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
+    @Autowired
+    IntroduceMapFacade introduceMapFacade;
+    @Autowired
+    IntroduceDetailFacade introduceDetailFacade;
+
+    /**
+     * 保存提示信息(新增or修改)
+     *
+     * @param introduceVO
+     * @return
+     */
+    public Boolean saveIntroduce(IntroduceVO introduceVO) {
+        IntroduceInfo introduceInfo = new IntroduceInfo();
+        if (!(introduceVO.getId() == null)) {
+            introduceInfo = this.getById(introduceVO.getId());
+            introduceInfo.setModifier(UserUtils.getCurrentPrincipleID());
+            introduceInfo.setGmtModified(new Date());
+        } else {
+            introduceInfo.setCreator(UserUtils.getCurrentPrincipleID());
+            introduceInfo.setGmtCreate(new Date());
+        }
+        introduceInfo.setName(introduceVO.getName());
+        introduceInfo.setRemark(introduceVO.getRemark());
+
+        //明细信息不更新,每次都删除重新插入
+        //删除已有明细
+        if (!(introduceInfo.getId() == null)) {
+            UpdateWrapper<IntroduceDetail> detailUpdateWrapper = new UpdateWrapper<>();
+            detailUpdateWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                    eq("introduce_id", introduceInfo.getId()).
+                    set("is_deleted", IsDeleteEnum.Y.getKey()).
+                    set("gmt_modified", new Date()).
+                    set("modifier", UserUtils.getCurrentPrincipleID());
+            introduceDetailFacade.update(new IntroduceDetail(), detailUpdateWrapper);
+        }
+        //插入新的明细记录
+        introduceDetailFacade.saveOrUpdateBatch(introduceVO.getDetailList());
+
+        //更新提示信息
+        this.saveOrUpdate(introduceInfo);
+        return true;
+    }
+
+    /**
+     * 单条删除提示信息
+     *
+     * @param id
+     * @return
+     */
+    public Boolean deleteRecord(Long id) {
+        //删除明细
+        UpdateWrapper<IntroduceDetail> introduceDetailUpdateWrapper = new UpdateWrapper<>();
+        introduceDetailUpdateWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("introduce_id", id).
+                set("is_deleted", IsDeleteEnum.Y.getKey()).
+                set("gmt_modified", new Date()).
+                set("modifier", UserUtils.getCurrentPrincipleID());
+        introduceDetailFacade.update(new IntroduceDetail(), introduceDetailUpdateWrapper);
+
+        UpdateWrapper<IntroduceInfo> introduceInfoUpdateWrapper = new UpdateWrapper<>();
+        introduceInfoUpdateWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                eq("id", id).
+                set("is_deleted", IsDeleteEnum.Y.getKey()).
+                set("gmt_modified", new Date()).
+                set("modifier", UserUtils.getCurrentPrincipleID());
+        this.update(new IntroduceInfo(), introduceInfoUpdateWrapper);
+        return true;
+    }
+
+    /**
+     * 批量删除提示信息
+     *
+     * @param ids
+     * @return
+     */
+    public Boolean deleteRecords(Long[] ids) {
+        //删除明细
+        UpdateWrapper<IntroduceDetail> introduceDetailUpdateWrapper = new UpdateWrapper<>();
+        introduceDetailUpdateWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                in("introduce_id", ids).
+                set("is_deleted", IsDeleteEnum.Y.getKey()).
+                set("gmt_modified", new Date()).
+                set("modifier", UserUtils.getCurrentPrincipleID());
+        introduceDetailFacade.update(new IntroduceDetail(), introduceDetailUpdateWrapper);
+        UpdateWrapper<IntroduceInfo> introduceInfoUpdateWrapper = new UpdateWrapper<>();
+        introduceInfoUpdateWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                in("id", ids).
+                set("is_deleted", IsDeleteEnum.Y.getKey()).
+                set("gmt_modified", new Date()).
+                set("modifier", UserUtils.getCurrentPrincipleID());
+        this.update(new IntroduceInfo(), introduceInfoUpdateWrapper);
+        return true;
+    }
+
+    /**
+     * 分页查询提示信息,可带等于条件
+     *
+     * @param introducePageVO
+     * @return
+     */
+    public IPage<IntroduceInfo> getPageByMap(IntroducePageVO introducePageVO) {
+        QueryWrapper<IntroduceInfo> introduceInfoQueryWrapper = new QueryWrapper<>();
+        for (Map.Entry<String, Object> entry : introducePageVO.getMap().entrySet()) {
+            introduceInfoQueryWrapper.eq(entry.getKey(), entry.getValue());
+        }
+        IPage<IntroduceInfo> introduceInfoIPage = this.page(introducePageVO, introduceInfoQueryWrapper);
+        return introduceInfoIPage;
+    }
+}

+ 13 - 0
icssman-service/src/main/java/com/diagbot/facade/IntroduceMapFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.IntroduceMapServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 14:31
+ */
+@Component
+public class IntroduceMapFacade extends IntroduceMapServiceImpl {
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/mapper/IntroduceDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.IntroduceDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 提示信息明细 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+public interface IntroduceDetailMapper extends BaseMapper<IntroduceDetail> {
+
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/mapper/IntroduceInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.IntroduceInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 提示信息 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+public interface IntroduceInfoMapper extends BaseMapper<IntroduceInfo> {
+
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/mapper/IntroduceMapMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.IntroduceMap;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 标签与提示信息映射表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+public interface IntroduceMapMapper extends BaseMapper<IntroduceMap> {
+
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/service/IntroduceDetailService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.IntroduceDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 提示信息明细 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+public interface IntroduceDetailService extends IService<IntroduceDetail> {
+
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/service/IntroduceInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.IntroduceInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 提示信息 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+public interface IntroduceInfoService extends IService<IntroduceInfo> {
+
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/service/IntroduceMapService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.IntroduceMap;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 标签与提示信息映射表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+public interface IntroduceMapService extends IService<IntroduceMap> {
+
+}

+ 20 - 0
icssman-service/src/main/java/com/diagbot/service/impl/IntroduceDetailServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.IntroduceDetail;
+import com.diagbot.mapper.IntroduceDetailMapper;
+import com.diagbot.service.IntroduceDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 提示信息明细 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@Service
+public class IntroduceDetailServiceImpl extends ServiceImpl<IntroduceDetailMapper, IntroduceDetail> implements IntroduceDetailService {
+
+}

+ 20 - 0
icssman-service/src/main/java/com/diagbot/service/impl/IntroduceInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.IntroduceInfo;
+import com.diagbot.mapper.IntroduceInfoMapper;
+import com.diagbot.service.IntroduceInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 提示信息 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@Service
+public class IntroduceInfoServiceImpl extends ServiceImpl<IntroduceInfoMapper, IntroduceInfo> implements IntroduceInfoService {
+
+}

+ 20 - 0
icssman-service/src/main/java/com/diagbot/service/impl/IntroduceMapServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.IntroduceMap;
+import com.diagbot.mapper.IntroduceMapMapper;
+import com.diagbot.service.IntroduceMapService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 标签与提示信息映射表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@Service
+public class IntroduceMapServiceImpl extends ServiceImpl<IntroduceMapMapper, IntroduceMap> implements IntroduceMapService {
+
+}

+ 18 - 0
icssman-service/src/main/java/com/diagbot/vo/IntroducePageVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/16 15:50
+ */
+@Getter
+@Setter
+public class IntroducePageVO extends Page {
+    Map<String, Object> map;
+}

+ 23 - 0
icssman-service/src/main/java/com/diagbot/vo/IntroduceVO.java

@@ -0,0 +1,23 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.IntroduceDetail;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import java.util.List;
+
+/**
+ * @Description:提示信息保存参数
+ * @Author:zhaops
+ * @time: 2018/11/16 14:29
+ */
+@Getter
+@Setter
+public class IntroduceVO {
+    private Long id;
+    @NotBlank(message = "请输入名称")
+    private String name;
+    private String remark;
+    private List<IntroduceDetail> detailList;
+}

+ 19 - 0
icssman-service/src/main/java/com/diagbot/web/IntroduceDetailController.java

@@ -0,0 +1,19 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 提示信息明细 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@RestController
+@RequestMapping("/introduceDetail")
+public class IntroduceDetailController {
+
+}

+ 84 - 0
icssman-service/src/main/java/com/diagbot/web/IntroduceInfoController.java

@@ -0,0 +1,84 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.IntroduceInfo;
+import com.diagbot.facade.IntroduceInfoFacade;
+import com.diagbot.vo.IntroducePageVO;
+import com.diagbot.vo.IntroduceVO;
+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;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 提示信息 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@RestController
+@RequestMapping("/introduceInfo")
+@Api(value = "提示信息维护相关API", tags = { "提示信息维护相关API" })
+public class IntroduceInfoController {
+
+    @Autowired
+    IntroduceInfoFacade introduceInfoFacade;
+
+    @ApiOperation(value = "保存提示信息[by:zhaops]",
+            notes = "id: 修改时带id,新增时未空<br>" +
+                    "name: 名称,必填<br>" +
+                    "remark:备注<br>" +
+                    "detailList:提示信息明细列表")
+    @PostMapping("/saveIntroduce")
+    @SysLogger("saveIntroduce")
+    public RespDTO<Boolean> saveIntroduce(@RequestBody @Valid IntroduceVO introduceVO) {
+        Boolean data = introduceInfoFacade.saveIntroduce(introduceVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "单条删除提示信息[by:zhaops]",
+            notes = "id: id,必填")
+    @PostMapping("/deleteRecord")
+    @SysLogger("deleteRecord")
+    public RespDTO<Boolean> deleteRecord(@RequestParam Long id) {
+        Boolean data = introduceInfoFacade.deleteRecord(id);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "批量删除提示信息[by:zhaops]",
+            notes = "ids: ids,必填")
+    @PostMapping("/deleteRecords")
+    @SysLogger("deleteRecords")
+    public RespDTO<Boolean> deleteRecords(@RequestParam Long[] ids) {
+        Boolean data = introduceInfoFacade.deleteRecords(ids);
+        return RespDTO.onSuc(data);
+    }
+
+    /**
+     * 分页查询提示信息,可带等于条件
+     *
+     * @param introducePageVO
+     * @return
+     */
+    @ApiOperation(value = "分页查询提示信息,可带等于条件[by:zhaops]",
+            notes = "current:页码,必填<br>" +
+                    "size:每页显示条数,必填<br>" +
+                    "map:查询条件(=),key为数据库字段名<br>")
+    @PostMapping("/getPageByMap")
+    @SysLogger("getPageByMap")
+    public RespDTO getPageByMap(@RequestBody IntroducePageVO introducePageVO) {
+        IPage<IntroduceInfo> infoIPage = introduceInfoFacade.getPageByMap(introducePageVO);
+        return RespDTO.onSuc(infoIPage);
+    }
+}

+ 19 - 0
icssman-service/src/main/java/com/diagbot/web/IntroduceMapController.java

@@ -0,0 +1,19 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 标签与提示信息映射表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-11-16
+ */
+@RestController
+@RequestMapping("/introduceMap")
+public class IntroduceMapController {
+
+}

+ 20 - 0
icssman-service/src/main/resources/mapper/IntroduceDetailMapper.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.IntroduceDetailMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.IntroduceDetail">
+        <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="introduce_id" property="introduceId" />
+        <result column="title" property="title" />
+        <result column="content" property="content" />
+        <result column="order_no" property="orderNo" />
+        <result column="position" property="position" />
+    </resultMap>
+
+</mapper>

+ 17 - 0
icssman-service/src/main/resources/mapper/IntroduceInfoMapper.xml

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

+ 19 - 0
icssman-service/src/main/resources/mapper/IntroduceMapMapper.xml

@@ -0,0 +1,19 @@
+<?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.IntroduceMapMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.IntroduceMap">
+        <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="introduce_id" property="introduceId" />
+        <result column="type" property="type" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>