引入依赖
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
if(new DateTime(scheduleOrderVo.getStartTime()).isAfterNow()
|| new DateTime(scheduleOrderVo.getEndTime()).isBeforeNow()) {
throw new YyghException(ResultCodeEnum.TIME_NO);
}
@GetMapping("/t4")
public String down3(HttpServletRequest request) throws Exception {
boolean beforeNow = new DateTime("2011-11-12").isBeforeNow();
boolean afterNow = new DateTime("2011-11-12").isAfterNow();
DateTime dateTime = new DateTime();
boolean afterNow1 = new DateTime(2023-12-12).isAfterNow();
//删除session
String id = request.getSession().getId();
return id;
}