yonge 5 years ago
parent
commit
e334f478d3

+ 8 - 3
cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -37,9 +37,14 @@
 			<if test="search != null">
 				and title_ like '%' #{search} '%'
 			</if>
-			<if test="memo != null">
-				and memo_ = #{memo}
-			</if>
+			<choose>
+		        <when test="memo != null and memo != ''">
+		            and memo_ = #{memo}
+		        </when>
+		        <otherwise>
+		            and memo_ is null
+		        </otherwise>
+		    </choose>
 		</where>
 	</sql>