无关风月
20 小时以前 538d011bfe8c57c756c32695c88e07b595d76434
cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java
@@ -286,6 +286,7 @@
        paymentCompetition.setInsertTime(new Date());
        paymentCompetitionService.save(paymentCompetition);
        SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy");
        for (int i = 0; i < jsonArray.size(); i++) {
            JSONObject jsonObject = jsonArray.getJSONObject(i);
            Integer id = jsonObject.getInteger("id");
@@ -294,10 +295,12 @@
            if(tStudent==null || tStudent.getIdCard()==null || "".equals(tStudent.getIdCard())){
                return ResultUtil.error("选择人员未进行实名认证!");
            }
            if (competition.getStartAge() > (Integer.valueOf(sdf.format(new Date())) - Integer.valueOf(sdf.format(tStudent.getBirthday())))) {
            if (competition.getStartAge() > (Integer.valueOf(sdf1.format(new Date())) - Integer.valueOf(sdf1.format(tStudent.getBirthday())))) {
                return ResultUtil.error("【" + tStudent.getName() + "】年龄不符合要求");
            }
            if (competition.getEndAge() < (Integer.valueOf(sdf.format(new Date())) - Integer.valueOf(sdf.format(tStudent.getBirthday())))) {
            if (competition.getEndAge() < (Integer.valueOf(sdf1.format(new Date())) - Integer.valueOf(sdf1.format(tStudent.getBirthday())))) {
                return ResultUtil.error("【" + tStudent.getName() + "】年龄不符合要求");
            }
            Integer isStudent = jsonObject.getInteger("isStudent");