Browse Source

多个值控制

zhoutg 6 years ago
parent
commit
578996854b

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

@@ -17,7 +17,7 @@ public class QuestionIndexVO {
     private Integer sexType;
     private Integer age;
     private Integer type;
-    private Integer controlType;
+    private List<Integer> controlType;
     private List<Integer> tagType;
     private List<Long> notIds;
     private String existName; //是否重复

+ 5 - 2
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -62,8 +62,11 @@
         <if test="type != null and type != ''">
             and type = #{type}
         </if>
-        <if test="controlType != null and controlType != ''">
-            and control_type = #{controlType}
+        <if test="controlType != null and controlType.size() > 0">
+            and control_type in
+            <foreach  collection="controlType" item="controlType" open="("  separator=","  close=")">
+                #{controlType}
+            </foreach>
         </if>
         <if test="tagType != null and tagType.size() > 0">
             and tag_type in