同一年都比赛下项目名称不可重复

main
王家东 4 months ago
parent 6cf1fb6915
commit 1fef75cfbc
  1. 9
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/service/impl/AnnualCompPointServiceImpl.java

@ -47,6 +47,9 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
@Autowired
private AnnualCompPointMapper annualCompPointMapper;
@Autowired
private IAnnualCompPointService annualCompPointService;
//奖项
@Autowired
private AnnualCompAwardMapper annualCompAwardMapper;
@ -83,6 +86,12 @@ public class AnnualCompPointServiceImpl extends ServiceImpl<AnnualCompPointMappe
if (annualComp == null) {
return Result.error("年度比赛错误");
}
//校验同一年度比赛下项目名称不可重复
List<AnnualCompPoint> annualCompPointListzbc = annualCompPointService.query().eq("annual_comp_id",annualCompPoint.getAnnualCompId()).eq("obj_name",annualCompPoint.getObjName()).list();
if (annualCompPointListzbc.size()>0){
return Result.error("同一年度比赛下项目名称不可重复");
}
if (annualComp.getIsopen().equals("0")) {
return Result.error("请先启动年度比赛");

Loading…
Cancel
Save