bug修改。

This commit is contained in:
Renpc-kilig 2021-06-17 15:54:24 +08:00
parent 63c4e336d5
commit ba7e6bd381
3 changed files with 14 additions and 10 deletions

View File

@ -47,7 +47,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@ -433,7 +432,7 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
* @param distributionVO * @param distributionVO
*/ */
@Override @Override
public void update(String token, String distributionId, DistributionVO distributionVO) throws ParseException { public void update(String token, String distributionId, DistributionVO distributionVO) {
/** /**
* 判断考试时间 * 判断考试时间
*/ */

View File

@ -234,7 +234,7 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
} }
@Override @Override
public List<ExamPlanDTO> list(Map<String, Object> params) throws ParseException { public List<ExamPlanDTO> list(Map<String, Object> params) {
String[] examPlanIds = params.get("examPlanIdList") == null ? null : params.get("examPlanIdList").toString().split(","); String[] examPlanIds = params.get("examPlanIdList") == null ? null : params.get("examPlanIdList").toString().split(",");
params.put("examPlanIdList", examPlanIds); params.put("examPlanIdList", examPlanIds);
List<ExamPlanDTO> list = examPlanDao.list(params); List<ExamPlanDTO> list = examPlanDao.list(params);
@ -288,12 +288,17 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
} }
} }
String endTime = examPlanDTO.getEndTime(); String endTime = examPlanDTO.getEndTime();
// 时间比较 try{
Date nowDate = simpleDateFormat.parse(nowTime); // 时间比较
Date endDate = simpleDateFormat.parse(endTime); Date nowDate = simpleDateFormat.parse(nowTime);
if(nowDate.getTime() <= endDate.getTime()) { Date endDate = simpleDateFormat.parse(endTime);
examPlanDTO.setBtnStatus("报名截止"); if(nowDate.getTime() <= endDate.getTime()) {
examPlanDTO.setBtnStatus("报名截止");
}
}catch (Exception e){
e.printStackTrace();
} }
} }
} }
return list; return list;

View File

@ -1,6 +1,6 @@
server: server:
port: 7009 port: 8089
url: http://192.168.0.115:7009/signup url: http://192.168.0.111:8089/signup
system-title: 考试报名系统 system-title: 考试报名系统
system-sub-title: 考试报名系统 system-sub-title: 考试报名系统
default-home-page: indexweb default-home-page: indexweb