bug修改。
This commit is contained in:
parent
a855cc5534
commit
b8d77f35e7
@ -292,7 +292,7 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
|
|||||||
// 时间比较
|
// 时间比较
|
||||||
Date nowDate = simpleDateFormat.parse(nowTime);
|
Date nowDate = simpleDateFormat.parse(nowTime);
|
||||||
Date endDate = simpleDateFormat.parse(endTime);
|
Date endDate = simpleDateFormat.parse(endTime);
|
||||||
if(nowDate.getTime() <= endDate.getTime()) {
|
if(nowDate.getTime() >= endDate.getTime()) {
|
||||||
examPlanDTO.setBtnStatus("报名截止");
|
examPlanDTO.setBtnStatus("报名截止");
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
@ -335,4 +335,17 @@ public class ExamPlanServiceImpl extends DefaultBaseService implements IExamPlan
|
|||||||
contentService.updatePublishStatus(params.get("contentId").toString(), Integer.valueOf(params.get("isSend").toString()));
|
contentService.updatePublishStatus(params.get("contentId").toString(), Integer.valueOf(params.get("isSend").toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) throws ParseException {
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
String nowTime = simpleDateFormat.format(new Date());
|
||||||
|
String endTime = "2021-06-10 14:47:29";
|
||||||
|
Date nowDate = simpleDateFormat.parse(nowTime);
|
||||||
|
Date endDate = simpleDateFormat.parse(endTime);
|
||||||
|
if(nowDate.getTime() <= endDate.getTime()) {
|
||||||
|
System.out.println("报名截至");
|
||||||
|
}else {
|
||||||
|
System.out.println("报名继续");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user