修改方法

dev
王家东 5 months ago
parent 2353481d5d
commit 76c3d4a6bb
  1. 49
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/service/impl/AnnualCompetitionProjectRegistrationServiceImpl.java

@ -281,4 +281,53 @@ public class AnnualCompetitionProjectRegistrationServiceImpl extends ServiceImpl
}
}
//这个主要适用于
/* @Override
public String trueorflase(StudentSignUpVo studentSignUpVo) {
AnnualCompPoint annualCompPoint = iAnnualCompPointService.getById(studentSignUpVo.getId());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//用于判断个人赛还是团队赛,个人赛是N团队赛是Y
String flag ="0";
if (StringUtils.equals("Y", annualCompPoint.getEntryForm())) {
String[] numbersArray = studentSignUpVo.getTeamManagementList().split(",");
List<String> numbersList = Arrays.asList(numbersArray);
//查询是否已经报名过了
for(int i=0;i<numbersList.size();i++){
if (finisbaoming(studentSignUpVo.getId(),sysUser.getUsername())){
flag = "1";
}
else if (finisbaoming(studentSignUpVo.getId(),numbersList.get(i))){
flag = "2";
}else{
flag = "0";
}
}
} else {
if(finisbaoming(studentSignUpVo.getId(),sysUser.getUsername())){
flag = "1";
} else {
flag = "0";
}
}
return flag;
}
//公共方法,用于检测这个用户是否已经在这个年度比赛项目中已报名
public boolean finisbaoming(String acpid,String uname){
boolean flag ;
Integer istrue =0;
SysUser user = iSysUserService.getUserByName(uname);
istrue = annualCompetitionProjectRegistrationMapper.finisbaoming(acpid,user.getId());
if (istrue>=1){
flag =true;
} else if (istrue==null){
flag = false;
} else {
flag = false;
}
return flag;
}*/
}

Loading…
Cancel
Save