推荐查询修改

This commit is contained in:
buerjun
2023-07-10 12:01:30 +08:00
parent 75d449a191
commit 9f2ab0fa1a

View File

@@ -20,8 +20,7 @@ public interface CasesRecordDao extends JpaRepository<Cases, String>, 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<Cases, String>, 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},'%')" +