cowr_dict/src/main/java/cn/cloudowr/dict/IdInterceptor.java

21 lines
479 B
Java
Raw Normal View History

2017-02-16 16:36:22 +08:00
package cn.cloudowr.dict;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
/**
* Created by lyf66 on 2017/2/16.
*/
public class IdInterceptor implements Interceptor {
@Override
public void intercept(Invocation inv) {
String id = inv.getController().getPara("id");
if (id != null && !id.isEmpty()) {
inv.invoke();
} else {
inv.getController().renderError(400);
}
}
}