diff --git a/servers/boe-server-all/src/main/java/com/xboe/module/boecase/dao/CasesRecordDao.java b/servers/boe-server-all/src/main/java/com/xboe/module/boecase/dao/CasesRecordDao.java index a251471a..672a0885 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/module/boecase/dao/CasesRecordDao.java +++ b/servers/boe-server-all/src/main/java/com/xboe/module/boecase/dao/CasesRecordDao.java @@ -20,8 +20,7 @@ public interface CasesRecordDao extends JpaRepository, JpaSpecifi @Query(nativeQuery = true, value = "select c.* from ( select b.*" + " from boe_cases_recommend_push_record a INNER JOIN boe_cases b on a.case_id = b.id" + - " where b.deleted=0 and a.push_status = 3 and a.push_user_id= :#{#condition.userId}" + - " and if(IFNULL(:#{#condition.refId},'') !='' ,a.recommend_id = :#{#condition.refId},1=1) " + + " where b.deleted=0 and a.push_status = 3 and a.deleted=0 and a.push_user_id= :#{#condition.userId}" + " and if(IFNULL(:#{#condition.keyWord},'')!='',b.title like CONCAT('%',:#{#condition.keyWord},'%')" + " or b.author_name like CONCAT('%',:#{#condition.keyWord},'%')" + " or b.keyword1 like CONCAT('%',:#{#condition.keyWord},'%')" + @@ -37,8 +36,7 @@ public interface CasesRecordDao extends JpaRepository, JpaSpecifi " order by a.sys_create_time DESC, a.read_flag ASC) as c group by c.id", countQuery = "select count(*) FROM (select c.* from ( select b.*" + " from boe_cases_recommend_push_record a INNER JOIN boe_cases b on a.case_id = b.id " + - " where b.deleted=0 and a.push_status = 3 and a.push_user_id= :#{#condition.userId}" + - " and if(IFNULL(:#{#condition.refId},'') !='' ,a.recommend_id = :#{#condition.refId},1=1) " + + " where b.deleted=0 and a.push_status = 3 and a.deleted=0 and a.push_user_id= :#{#condition.userId}" + " and if(IFNULL(:#{#condition.keyWord},'')!='',b.title like CONCAT('%',:#{#condition.keyWord},'%')" + " or b.author_name like CONCAT('%',:#{#condition.keyWord},'%')" + " or b.keyword1 like CONCAT('%',:#{#condition.keyWord},'%')" +