mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 02:46:50 +08:00
add 案例添加三级种类查询
This commit is contained in:
@@ -123,8 +123,9 @@ public class CasesApi extends ApiBaseController {
|
||||
return success(views);
|
||||
}
|
||||
|
||||
@PostMapping("/queryListV2")
|
||||
public JsonResponse<PageList<Cases>> queryCaseBreV2(@Validated @RequestBody CasePageVo req){
|
||||
// @PostMapping("/queryListV2")
|
||||
// public JsonResponse<PageList<Cases>> queryCaseBreV2(@Validated @RequestBody CasePageVo req){
|
||||
public JsonResponse<PageList<Cases>> queryCaseBreV2(CasePageVo req){
|
||||
String type = req.getType();
|
||||
PageList<Cases> views;
|
||||
req.setUserId(getCurrent().getAccountId());
|
||||
|
||||
@@ -21,9 +21,8 @@ import java.util.List;
|
||||
*/
|
||||
@Repository
|
||||
public interface CasesRecordDao extends JpaRepository<Cases, String>, JpaSpecificationExecutor<Cases> {
|
||||
|
||||
@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" +
|
||||
" from boe_cases_recommend_push_record a left JOIN boe_cases b on a.case_id = b.id" +
|
||||
" 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},'%')" +
|
||||
@@ -40,9 +39,12 @@ public interface CasesRecordDao extends JpaRepository<Cases, String>, JpaSpecifi
|
||||
" or if(:#{#condition.org2Empty}, 1=2, b.org_domain_parent2 in (:#{#condition.org2}))" +
|
||||
" or if(:#{#condition.org3Empty}, 1=2, b.org_domain_parent3 in (:#{#condition.org3}))" +
|
||||
")" +
|
||||
" and if(:#{#condition.isSysType1Empty} , 1=1, b.sys_type1 = :#{#condition.sysType1} )"+
|
||||
" and if(:#{#condition.isSysType2Empty} , 1=1, b.sys_type2 = :#{#condition.sysType2} )"+
|
||||
" and if(:#{#condition.isSysType3Empty} , 1=1, b.sys_type3 = :#{#condition.sysType3} )"+
|
||||
" 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 " +
|
||||
" from boe_cases_recommend_push_record a left JOIN boe_cases b on a.case_id = b.id " +
|
||||
" 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},'%')" +
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.xboe.module.boecase.dto;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -98,4 +99,10 @@ public class CasePageVo extends PageDto {
|
||||
return this.isOrg1Empty() && this.isOrg2Empty() && this.isOrg3Empty();
|
||||
}
|
||||
|
||||
public boolean isSysType1Empty(){ return StrUtil.isEmpty(this.sysType1); }
|
||||
|
||||
public boolean isSysType2Empty(){ return StrUtil.isEmpty(this.sysType2); }
|
||||
|
||||
public boolean isSysType3Empty(){ return StrUtil.isEmpty(this.sysType3); }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user