Browse Source

标签维护

zhoutg 6 years ago
parent
commit
ae3ced8d92

+ 0 - 20
icssman-service/src/main/java/com/diagbot/dto/DictionaryInfoDTO.java

@@ -1,20 +0,0 @@
-package com.diagbot.dto;
-
-import com.diagbot.entity.DictionaryInfo;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description: 
- * @Author: ztg
- * @Date: 2018/12/25 15:25
- */
-@Getter
-@Setter
-public class DictionaryInfoDTO {
-    private Long groupType;
-    private String reamrk;
-    private List<DictionaryInfo> detail;
-}

+ 3 - 17
icssman-service/src/main/java/com/diagbot/facade/QuestionInfoFacade.java

@@ -49,7 +49,7 @@ import java.util.stream.Collectors;
 
 /**
  * @Description:
- * @Author:zhaops
+ * @Author:zhoutg
  * @time: 2018/11/23 11:37
  */
 @Component
@@ -342,7 +342,7 @@ public class QuestionInfoFacade extends QuestionInfoServiceImpl {
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("type", questionInfo.getType())
                 .ne("id", questionInfo.getId() == null ? -1 : questionInfo.getId()));
-        if (questionInfoList.size() > 0) { //标签type、tagName唯一
+        if (ListUtil.isNotEmpty(questionInfoList)) { //标签type、tagName唯一
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "标签名称已重复,无法建立");
         }
         if ("save".equals(param.getSaveOrUpdate())) {
@@ -451,6 +451,7 @@ public class QuestionInfoFacade extends QuestionInfoServiceImpl {
         paramMap.put("type", questionIndexVO.getType());
         paramMap.put("controlType", questionIndexVO.getControlType());
         paramMap.put("notIds", questionIndexVO.getNotIds());
+        paramMap.put("tagType", questionIndexVO.getTagType());
         return this.index(paramMap);
     }
 
@@ -471,21 +472,6 @@ public class QuestionInfoFacade extends QuestionInfoServiceImpl {
     }
 
 
-    /**
-     * 根据标签名获取标签信息
-     *
-     * @param questionInfo
-     * @return
-     */
-    public QuestionInfo getQuestionInfos(QuestionInfo questionInfo) {
-        QueryWrapper<QuestionInfo> queryWrapper = new QueryWrapper<QuestionInfo>();
-        queryWrapper.eq("is_deleted", "N");
-        queryWrapper.eq("type", 1);
-        queryWrapper.eq("name", questionInfo.getName());
-        return this.getOne(queryWrapper);
-    }
-
-
     /**
      * 根据标签名获取标签信息
      *

+ 2 - 1
icssman-service/src/main/java/com/diagbot/vo/QuestionIndexVO.java

@@ -7,7 +7,7 @@ import java.util.List;
 
 /**
  * @Description:
- * @Author:zhaops
+ * @Author:zhoutg
  * @time: 2018/11/29 15:09
  */
 @Getter
@@ -18,5 +18,6 @@ public class QuestionIndexVO {
     private Integer age;
     private Integer type;
     private Integer controlType;
+    private String tagType;
     private List<Long> notIds;
 }

+ 3 - 0
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -63,6 +63,9 @@
         <if test="controlType != null and controlType != ''">
             and control_type = #{controlType}
         </if>
+        <if test="tagType != null and tagType != ''">
+            and tag_type = #{tagType}
+        </if>
         <if test="notIds != null and notIds.size() > 0 ">
             and id not in
             <foreach  collection="notIds" item="id" open="("  separator=","  close=")">