From ba013f5ac2d79126d7885cbf111f2e5ad6670458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Tue, 30 Jul 2024 16:15:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=88=9B=E5=BB=BA=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=8F=AF=E4=BB=A5=E7=9C=8B=E5=88=B0=E6=89=80=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E5=B9=B4=E5=BA=A6=E6=AF=94=E8=B5=9B=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompPointController.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java index 1c33d0e2..24053d0d 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java @@ -148,17 +148,24 @@ public class AnnualCompPointController extends JeecgController queryWrapperComp = new LambdaQueryWrapper<>(); // id位数相同,可用like模糊 - queryWrapperComp.like(Comp::getCompAdmin, userId); + queryWrapperComp.eq(Comp::getCompAdmin, userId); List list = compService.list(queryWrapperComp); + if(list.isEmpty()){ + return Result.error("未绑定比赛"); + } List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); // 获取负责的年度比赛id QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); - queryWrapperAnnual.in(ids.size()!=0,"compid",ids); + /*queryWrapperAnnual.in(ids.size()!=0,"compid",ids);*/ + queryWrapperAnnual.in("compid",ids); List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.isEmpty()){ + return Result.error("未创建年度比赛"); + } List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); - queryWrapper.in(annualIds.size()!=0,"annual_comp_id",annualIds); + queryWrapper.in("annual_comp_id",annualIds); queryWrapper.eq("annual_comp_switch","Y"); // 比赛必须是开启的 Page page = new Page(pageNo, pageSize); IPage pageList = annualCompPointService.page(page, queryWrapper);