Ver código fonte

收藏列表修改

小么熊🐻 3 anos atrás
pai
commit
1c0199ffe4

+ 4 - 4
jkt-service/src/main/resources/mapper/question/QuestionCollectionMapper.xml

@@ -19,10 +19,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectQuestionCollectionList"  parameterType="QuestionCollectionListDTO" resultMap="QuestionCollectionResult">
         <include refid="selectQuestionCollectionVo"/>
         <where>
-            <if test="userId != null "> and user_id = #{userId}</if>
-            <if test="questionId != null "> and question_id = #{questionId}</if>
-            <if test="km != null "> and km = #{km}</if>
-            <if test="carType != null "> and car_type = #{carType}</if>
+            <if test="userId != null and userId !='' "> and user_id = #{userId}</if>
+            <if test="questionId != null and questionId !=''  "> and question_id = #{questionId}</if>
+            <if test="km != null and km !='' "> and km = #{km}</if>
+            <if test="carType != null and carType !='' "> and car_type = #{carType}</if>
         </where>
     </select>
 

+ 4 - 4
jkt-service/src/main/resources/mapper/question/QuestionWrongMapper.xml

@@ -19,10 +19,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectQuestionWrongList" parameterType="QuestionWrong" resultMap="QuestionWrongResult">
         <include refid="selectQuestionWrongVo"/>
         <where>
-            <if test="userId != null "> and user_id = #{userId}</if>
-            <if test="questionId != null "> and question_id = #{questionId}</if>
-            <if test="km != null "> and km = #{km}</if>
-            <if test="carType != null "> and car_type = #{carType}</if>
+            <if test="userId != null and userId !='' "> and user_id = #{userId}</if>
+            <if test="questionId != null questionId != ''"> and question_id = #{questionId}</if>
+            <if test="km != null and km!='' "> and km = #{km}</if>
+            <if test="carType != null and carType =!=''"> and car_type = #{carType}</if>
         </where>
     </select>