diff --git a/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index cbd608a0..94d264f4 100644 --- a/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -99,7 +99,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码 filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除 filterChainDefinitionMap.put("/cms/front/**", "anon"); //cms不拦截 - filterChainDefinitionMap.put("/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/zwhsybsjs", "anon"); //组委会首页接口不拦截 + //filterChainDefinitionMap.put("/annualcompetitionprojectregistration/annualCompetitionProjectRegistration/zwhsybsjs", "anon"); //组委会首页接口不拦截 //CMS门户 filterChainDefinitionMap.put("/cms/front/**","anon"); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java index 99791ff3..ecdf38d9 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java @@ -990,18 +990,33 @@ public class AnnualCompetitionProjectRegistrationController { map.put("bsxmSum",listacp.size()); //前五条项目名称数据以及对应的报名数 List> xmListMap = new ArrayList<>(); - for (int i = 0 ; i <5;i++){ - AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); - QueryWrapper queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); - queryWrapperbm.eq("annual_compid",listacp.get(i).getId()); - queryWrapperbm.eq("enroll_static", "2"); - List listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); - Map map1 = new HashMap<>(); - map1.put("xmname",listacp.get(i).getObjName()); - map1.put("xmbmrs",listbm.size()); - xmListMap.add(map1); + if(listacp.size()>5){ + for (int i = 0 ; i <5;i++){ + AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration(); + QueryWrapper queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); + queryWrapperbm.eq("annual_compid",listacp.get(i).getId()); + queryWrapperbm.eq("enroll_static", "2"); + List listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); + Map map1 = new HashMap<>(); + map1.put("xmname",listacp.get(i).getObjName()); + map1.put("xmbmrs",listbm.size()); + xmListMap.add(map1); + } + }else{ + for (int m = 0 ; m queryWrapperbm = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap()); + queryWrapperbm.eq("annual_compid",listacp.get(m).getId()); + queryWrapperbm.eq("enroll_static", "2"); + List listbm = annualCompetitionProjectRegistrationService.list(queryWrapperbm); + Map map1 = new HashMap<>(); + map1.put("xmname",listacp.get(m).getObjName()); + map1.put("xmbmrs",listbm.size()); + xmListMap.add(map1); + } } + map.put("qwtxmList",xmListMap); //参加比赛队伍数(报名数) List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());