diff --git a/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java b/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java index 6b3d8d1..086977c 100644 --- a/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java @@ -47,7 +47,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.text.DateFormat; -import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; @@ -433,7 +432,7 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist * @param distributionVO */ @Override - public void update(String token, String distributionId, DistributionVO distributionVO) throws ParseException { + public void update(String token, String distributionId, DistributionVO distributionVO) { /** * 判断考试时间 */ diff --git a/src/main/java/cn/com/tenlion/service/examplan/impl/ExamPlanServiceImpl.java b/src/main/java/cn/com/tenlion/service/examplan/impl/ExamPlanServiceImpl.java index 960ee68..db80700 100644 --- a/src/main/java/cn/com/tenlion/service/examplan/impl/ExamPlanServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examplan/impl/ExamPlanServiceImpl.java @@ -234,7 +234,7 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan } @Override - public List list(Map params) throws ParseException { + public List list(Map params) { String[] examPlanIds = params.get("examPlanIdList") == null ? null : params.get("examPlanIdList").toString().split(","); params.put("examPlanIdList", examPlanIds); List list = examPlanDao.list(params); @@ -288,12 +288,17 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan } } String endTime = examPlanDTO.getEndTime(); - // 时间比较 - Date nowDate = simpleDateFormat.parse(nowTime); - Date endDate = simpleDateFormat.parse(endTime); - if(nowDate.getTime() <= endDate.getTime()) { - examPlanDTO.setBtnStatus("报名截止"); + try{ + // 时间比较 + Date nowDate = simpleDateFormat.parse(nowTime); + Date endDate = simpleDateFormat.parse(endTime); + if(nowDate.getTime() <= endDate.getTime()) { + examPlanDTO.setBtnStatus("报名截止"); + } + }catch (Exception e){ + e.printStackTrace(); } + } } return list; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1df3848..afe9511 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,6 @@ server: - port: 7009 - url: http://192.168.0.115:7009/signup + port: 8089 + url: http://192.168.0.111:8089/signup system-title: 考试报名系统 system-sub-title: 考试报名系统 default-home-page: indexweb