所有用到比赛负责人查询改为等于不用like

main
Gitea 4 months ago
parent 13ebba7b6f
commit ca8fa39455
  1. 6
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java
  2. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java
  3. 19
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  4. 15
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scorepersion/controller/ScorePersionController.java
  5. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/scoresta/controller/ScoreStaController.java

@ -995,7 +995,7 @@ public class AnnualCompetitionProjectRegistrationController {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin", user.getUsername());
queryWrappercomp.eq("comp_admin", user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
Map<String, Object> map = new HashMap<>();
if (list.size() > 0) {
@ -1774,7 +1774,7 @@ public class AnnualCompetitionProjectRegistrationController {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin", user.getUsername());
queryWrappercomp.eq("comp_admin", user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
Map<String, Object> map = new HashMap<>();
if (list.size() > 0) {
@ -2129,7 +2129,7 @@ public class AnnualCompetitionProjectRegistrationController {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();

@ -95,21 +95,30 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup,
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<AnnualCompGroup> queryWrapper = QueryGenerator.initQueryWrapper(annualCompGroup, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapperacp.in("annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.error("未创建年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size()!=0,"ann_comp_p",acpIds);
@ -190,7 +199,7 @@ public class AnnualCompGroupController extends JeecgController<AnnualCompGroup,
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrapper = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrapper.like("comp_admin",user.getUsername());
queryWrapper.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrapper);
String str = "";
for(int i = 0 ; i < list.size() ; i++){

@ -127,23 +127,32 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
//组委会(全部都可以)(根据比赛负责人查询比赛id筛选)
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds);
queryWrapper.in("annal_comp",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapperacp.in("annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.error("未创建年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size()!=0,"annual_comp_p",acpIds);
queryWrapper.in("annual_comp_p",acpIds);
Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize);
IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper);

@ -105,21 +105,30 @@ public class ScorePersionController extends JeecgController<ScorePersion, IScore
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<ScorePersion> queryWrapper = QueryGenerator.initQueryWrapper(scorePersion, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annual_compid",annualIds);
queryWrapper.in("annual_compid",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapperacp.in("annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.error("未创建年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size()!=0,"annual_comp_p",acpIds);

@ -87,23 +87,32 @@ public class ScoreStaController extends JeecgController<ScoreSta, IScoreStaServi
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Comp comp = new Comp();
QueryWrapper<Comp> queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap());
queryWrappercomp.like("comp_admin",user.getUsername());
queryWrappercomp.eq("comp_admin",user.getUsername());
List<Comp> list = compService.list(queryWrappercomp);
if(list.size()==0){
return Result.error("未绑定比赛");
}
List<String> ids = list.stream().map(Comp::getId).collect(Collectors.toList());
QueryWrapper<AnnualComp> queryWrapperAnnual = new QueryWrapper<>();
queryWrapperAnnual.in(ids.size()!=0,"compid",ids);
queryWrapperAnnual.in("compid",ids);
List<AnnualComp> listAnnual = annualCompService.list(queryWrapperAnnual);
if(listAnnual.size()==0){
return Result.error("未创建年度比赛");
}
List<String> annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList());
QueryWrapper<ScoreSta> queryWrapper = QueryGenerator.initQueryWrapper(scoreSta, req.getParameterMap());
queryWrapper.in(annualIds.size()!=0,"annal_comp",annualIds);
queryWrapper.in("annal_comp",annualIds);
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in(annualIds.size()!=0,"annual_comp_id",annualIds);
queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
if(listacp.size()==0){
return Result.error("未创建年度比赛项目");
}
List<String> acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList());
queryWrapper.in(acpIds.size()!=0,"annual_compid",acpIds);
queryWrapper.in("annual_compid",acpIds);
Page<ScoreSta> page = new Page<ScoreSta>(pageNo, pageSize);

Loading…
Cancel
Save