浏览代码

修改搜索字段提交

zsy 1 月之前
父节点
当前提交
62eba305ce
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/java/com/rf/help/task/dao/repository/TaskRepository.java

+ 2 - 2
src/main/java/com/rf/help/task/dao/repository/TaskRepository.java

@@ -18,14 +18,14 @@ public interface TaskRepository extends BaseRepository<TaskEntity, String> {
 
     @Query(value = "select * from t_task_info where 1=1 " +
             "and if(?1 is not null and ?1 !='',(task_type = ?1),1=1) " +
-            "and if(?2 is not null and ?2 !='',(details like CONCAT('%',?2,'%') or phone like CONCAT('%',?2,'%')),1=1) " +
+            "and if(?2 is not null and ?2 !='',(details like CONCAT('%',?2,'%') or phone like CONCAT('%',?2,'%') or title like CONCAT('%',?2,'%') or take_delivery_position like CONCAT('%',?2,'%')),1=1) " +
             "and if(?3 is not null and ?3 !='',(publish_user_id = ?3),1=1) " +
             "and if(?4 is not null and ?4 !='',(accept_user_id = ?4),1=1) " +
             "and if(?5 is not null and ?5 !='',(task_status = ?5),1=1) " +
             "order by create_time desc ",
             countQuery = "select * from t_task_info where 1=1 " +
                     "and if(?1 is not null and ?1 !='',(task_type = ?1),1=1) " +
-                    "and if(?2 is not null and ?2 !='',(details like CONCAT('%',?2,'%') or phone like CONCAT('%',?2,'%')),1=1) " +
+                    "and if(?2 is not null and ?2 !='',(details like CONCAT('%',?2,'%') or phone like CONCAT('%',?2,'%') or title like CONCAT('%',?2,'%') or take_delivery_position like CONCAT('%',?2,'%')),1=1) " +
                     "and if(?3 is not null and ?3 !='',(publish_user_id = ?3),1=1) " +
                     "and if(?4 is not null and ?4 !='',(accept_user_id = ?4),1=1) " +
                     "and if(?5 is not null and ?5 !='',(task_status = ?5),1=1) ",