浏览代码

ICSS检索添加字段

wangyu 6 年之前
父节点
当前提交
3871808911

+ 4 - 0
icss-service/src/main/java/com/diagbot/vo/RetrievalVO.java

@@ -25,4 +25,8 @@ public class RetrievalVO {
     private Integer sexType;
     //需要去重的id
     private List<Long> inputIds;
+    //标签标识
+    private Integer tagType;
+    //元素类型
+    private Integer itemType;
 }

+ 3 - 1
icss-service/src/main/java/com/diagbot/web/RetrievalController.java

@@ -38,7 +38,9 @@ public class RetrievalController {
                     "age:年龄,必填<br>" +
                     "inputStr:检索内容,必填<br>" +
                     "sexType:性别,必填<br>" +
-                    "inputIds:需要去重的id")
+                    "inputIds:需要去重的id<br>" +
+                    "tagType: 标签标识<br>" +
+                    "itemType: 元素类型<br>")
     @PostMapping("/getTagInfos")
     @SysLogger("getTagInfos")
     public RespDTO<List<RetrievalDTO>> getTagInfos(@Valid @RequestBody RetrievalVO retrievalVO) {

+ 18 - 0
icss-service/src/main/resources/mapper/RetrievalMapper.xml

@@ -26,6 +26,12 @@
             <![CDATA[ and c.age_begin <= #{age} ]]>
             <![CDATA[ and c.age_end >= #{age} ]]>
         </if>
+        <if test="tagType != null and tagType != ''">
+            <![CDATA[ and c.tag_type = #{tagType} ]]>
+        </if>
+        <if test="itemType != null">
+            <![CDATA[ and c.item_type = #{itemType} ]]>
+        </if>
         <if test="sexType == 3">
             and c.sex_type in ('1','2','3')
         </if>
@@ -49,6 +55,12 @@
             <![CDATA[ and c.age_begin <= #{age} ]]>
             <![CDATA[ and c.age_end >= #{age} ]]>
         </if>
+        <if test="tagType != null and tagType != ''">
+            <![CDATA[ and c.tag_type = #{tagType} ]]>
+        </if>
+        <if test="itemType != null">
+            <![CDATA[ and c.item_type = #{itemType} ]]>
+        </if>
         <if test="sexType == 3">
             and c.sex_type in ('1','2','3')
         </if>
@@ -72,6 +84,12 @@
             <![CDATA[ and c.age_begin <= #{age} ]]>
             <![CDATA[ and c.age_end >= #{age} ]]>
         </if>
+        <if test="tagType != null and tagType != ''">
+            <![CDATA[ and c.tag_type = #{tagType} ]]>
+        </if>
+        <if test="itemType != null">
+            <![CDATA[ and c.item_type = #{itemType} ]]>
+        </if>
         <if test="sexType == 3">
             and c.sex_type in ('1','2','3')
         </if>