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 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) {
/**
* 判断考试时间
*/

View File

@ -234,7 +234,7 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
}
@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(",");
params.put("examPlanIdList", examPlanIds);
List<ExamPlanDTO> list = examPlanDao.list(params);
@ -288,12 +288,17 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
}
}
String endTime = examPlanDTO.getEndTime();
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;

View File

@ -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