比赛一个人只可以绑定一个比赛

gst4base
王家东 24 hours ago
parent f75a69d54a
commit d3beb8af85
  1. 12
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java

@ -344,10 +344,14 @@ public class CompController extends JeecgController<Comp, ICompService> {
comp.setCompweight(csort);*/
/*--------------------------王家东添加开始============================*/
compService.updateById(comp);
return Result.OK("编辑成功!");
List<Comp> complistbuycompadmin = compService.query().eq("comp_admin",comp.getCompAdmin()).list();
if (complistbuycompadmin.size()>0){
return Result.error("该用户已经绑定过比赛了,请选择其他用户。");
}else {
/*--------------------------王家东添加开始============================*/
compService.updateById(comp);
return Result.OK("编辑成功!");
}
}
/**

Loading…
Cancel
Save