yonge 4 years ago
parent
commit
4c3c6b2d40
1 changed files with 7 additions and 22 deletions
  1. 7 22
      cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

+ 7 - 22
cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -48,14 +48,9 @@
 			<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 or memo_ = '')
-				</otherwise>
-			</choose>
+			<if test="memo != null and memo != ''">
+				and memo_ = #{memo}
+			</if>
 		</where>
 	</sql>
 	
@@ -187,14 +182,9 @@
 		<if test="tenantId != null">
 			and tenant_id_ = #{tenantId}
 		</if>
-		<choose>
-			<when test="memo != null and memo != ''">
+			<if test="memo != null and memo != ''">
 				and memo_ = #{memo}
-			</when>
-			<otherwise>
-				and (memo_ is null or memo_ = '')
-			</otherwise>
-		</choose>
+			</if>
 		order by status_ desc,order_ desc,update_time_ desc
 		<include refid="global.limit" />
 	</select>
@@ -221,13 +211,8 @@
 		<if test="tenantId != null">
 			and tenant_id_ = #{tenantId}
 		</if>
-		<choose>
-			<when test="memo != null and memo != ''">
+			<if test="memo != null and memo != ''">
 				and memo_ = #{memo}
-			</when>
-			<otherwise>
-				and (memo_ is null or memo_ = '')
-			</otherwise>
-		</choose>
+			</if>
 	</select>
 </mapper>