浏览代码

我的承办增加关键字搜索

dzx 5 月之前
父节点
当前提交
7840e81015
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/main/resources/mapper/oa/OfficialDocumentReceivedHandleMapper.xml

+ 8 - 0
src/main/resources/mapper/oa/OfficialDocumentReceivedHandleMapper.xml

@@ -48,6 +48,14 @@
         <if test="dto.handleDateStart != null and dto.handleDateEnd != ''">
             AND DATE_FORMAT(t1.handle_time, '%Y-%m-%d') between and #{dto.handleDateStart} and #{dto.handleDateEnd}
         </if>
+        <if test="dto.keyword != null and dto.keyword != ''">
+            AND (
+                t1.received_type like concat('%', #{dto.keyword},'%')
+                or t1.received_title like concat('%', #{dto.keyword},'%')
+                or t3.name like concat('%', #{dto.keyword},'%')
+                or t4.name like concat('%', #{dto.keyword},'%')
+            )
+        </if>
         order by t1.id desc
     </select>