This commit is contained in:
wucongxing8150 2025-03-14 18:13:39 +08:00
parent 034e51dc47
commit 38503334f6
2 changed files with 5 additions and 2 deletions

View File

@ -165,7 +165,7 @@ func (r *CaseDao) GetCasePageSearch(req requests.GetCasePage, page, pageSize int
Where("case_user.case_id = case.case_id").
Where("case_user.user_id = ?", req.UserId)
query = query.Where("NOT EXISTS (?)", caseUserSubQuery)
query = query.Where("EXISTS (?)", caseUserSubQuery)
}
if req.IsTakePart == 2 {
@ -179,7 +179,7 @@ func (r *CaseDao) GetCasePageSearch(req requests.GetCasePage, page, pageSize int
Where("case_user.case_id = case.case_id").
Where("case_user.user_id IN (?)", userIds)
query = query.Where("EXISTS (?)", caseUserSubQuery)
query = query.Where("NOT EXISTS (?)", caseUserSubQuery)
}
// 排序

View File

@ -59,3 +59,6 @@ time="2025-03-14 18:03:30" level=info msg=access http_status=200 ip=127.0.0.1 me
time="2025-03-14 18:04:21" level=info msg=access http_status=200 ip=127.0.0.1 method=GET params="map[is_take_part:2 project_id:1900443789521063936]" total_time=803.253583ms uri="/case/page?project_id=1900443789521063936&is_take_part=2"
time="2025-03-14 18:10:51" level=info msg=access http_status=200 ip=127.0.0.1 method=GET params="map[is_take_part:2 project_id:1900443789521063936]" total_time=447.065833ms uri="/case/page?project_id=1900443789521063936&is_take_part=2"
time="2025-03-14 18:11:05" level=info msg=access http_status=200 ip=127.0.0.1 method=GET params="map[is_take_part:1 project_id:1900443789521063936]" total_time=797.357125ms uri="/case/page?project_id=1900443789521063936&is_take_part=1"
time="2025-03-14 18:12:20" level=info msg=access http_status=200 ip=127.0.0.1 method=GET params="map[is_take_part:2 project_id:1900443789521063936]" total_time=505.207667ms uri="/case/page?project_id=1900443789521063936&is_take_part=2"
time="2025-03-14 18:13:29" level=info msg=access http_status=200 ip=127.0.0.1 method=GET params="map[is_take_part:1 project_id:1900443789521063936]" total_time=467.341709ms uri="/case/page?project_id=1900443789521063936&is_take_part=1"
time="2025-03-14 18:13:34" level=info msg=access http_status=200 ip=127.0.0.1 method=GET params="map[is_take_part:2 project_id:1900443789521063936]" total_time=792.205125ms uri="/case/page?project_id=1900443789521063936&is_take_part=2"