Browse Source

新闻关键字查询

phoenix 1 year ago
parent
commit
e77e1b6cfb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/resources/mapper/oa/NewsMapper.xml

+ 3 - 1
src/main/resources/mapper/oa/NewsMapper.xml

@@ -21,7 +21,9 @@
             and t.full_head LIKE CONCAT('%',#{dto.fullHead},'%')
         </if>
         <if test="dto.keyword != null and dto.keyword != ''">
-            and t.keyword LIKE CONCAT('%',#{dto.keyword},'%')
+            and (t.keyword LIKE CONCAT('%',#{dto.keyword},'%')
+            or t.full_head LIKE CONCAT('%',#{dto.keyword},'%')
+            or t.author_name LIKE CONCAT('%',#{dto.keyword},'%'))
         </if>
         <if test="dto.loginId != null and dto.loginId > 0">
             and t.create_user_id = #{dto.loginId}