yonge 5 years ago
parent
commit
5633804f8f

+ 9 - 1
cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -24,7 +24,7 @@
 	
 	<sql id="queryCondition">
 		<where>
-			del_flag_=0 and memo_ = #{memo}
+			del_flag_=0 
 			<if test="type != null">
 				and type_ = #{type}
 			</if>
@@ -37,6 +37,14 @@
 			<if test="search != null">
 				and title_ like '%' #{search} '%'
 			</if>
+			<choose>
+		        <when test="memo != null and memo != ''">
+		            and memo_ = #{memo}
+		        </when>
+		        <otherwise>
+		            and memo_ is null
+		        </otherwise>
+	        </choose>
 		</where>
 	</sql>