change - 二期门体库看板添加数据接口
parent
f7aac8956a
commit
b981533bf3
@ -1,29 +0,0 @@
|
||||
package com.ruoyi.framework.interceptor;
|
||||
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class AInterceptor implements HandlerInterceptor {
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
|
||||
throws Exception {
|
||||
if(afterDate("2024-02-08")){
|
||||
return false;
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static boolean afterDate(String date){
|
||||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
LocalDate localTime=LocalDate.parse(date,dtf);
|
||||
return LocalDate.now().isAfter(localTime);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue