main
黄海 3 years ago
parent 758566f119
commit 1e689ea955

@ -18,12 +18,12 @@ import java.util.Map;
public class IsLoginInterceptor implements Interceptor {
@Override
public void intercept(Invocation inv) {
//增加IP范围检查在合法的范围内就放行即可 2022-12-09
boolean flag = CommonUtil.checkAllowIpAddress(inv.getController().getRequest());
if(flag) {
inv.invoke();
return;
}
// //增加IP范围检查在合法的范围内就放行即可 2022-12-09
// boolean flag = CommonUtil.checkAllowIpAddress(inv.getController().getRequest());
// if(flag) {
// inv.invoke();
// return;
// }
//正常的登录验证逻辑代码
IsLoginInterface annotation = inv.getMethod().getAnnotation(IsLoginInterface.class);
@ -42,7 +42,9 @@ public class IsLoginInterceptor implements Interceptor {
}
//1、读取cookie,获取所有本域下的配置值
boolean isTrue;
if ((con.getCookie("person_id") == null) || (con.getCookie("bureau_id") == null) ||
if ((con.getCookie("toupiaoren_tel"))==null || (con.getCookie("person_id") == null) || (con.getCookie("bureau_id") == null) ||
(con.getCookie("identity_id") == null || (con.getCookie("org_code") == null))) {
isTrue = false;
} else {

@ -7,6 +7,7 @@ import com.jfinal.aop.Before;
import com.jfinal.core.Controller;
import com.jfinal.ext.interceptor.GET;
import com.jfinal.ext.interceptor.POST;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import java.util.List;
@ -19,10 +20,10 @@ public class TouPiaoController extends Controller {
*
*
* 2022-12-11
http://10.10.11.124:9000/FengHuang/TouPiao/getHouXuanRenList?type_id=1
http://10.10.11.124:9000/FengHuang/TouPiao/getHouXuanRenList?type_id=2
*
* http://10.10.11.124:9000/FengHuang/TouPiao/getHouXuanRenList?type_id=1
*
* http://10.10.11.124:9000/FengHuang/TouPiao/getHouXuanRenList?type_id=2
*/
@Before({GET.class})
@IsLoginInterface({})
@ -30,4 +31,13 @@ public class TouPiaoController extends Controller {
List<Record> list = tm.getHouXuanRenList(type_id);
renderJson(CommonUtil.renderJsonForLayUI(list));
}
@Before({GET.class})
@IsLoginInterface({})
public void getTouPiaoRenInfo() {
String toupiaoren_tel = getCookie("toupiaoren_tel");
String sql = "select * from t_toupiao_toupiaoren where toupiaoren_tel=?";
List<Record> list = Db.find(sql, toupiaoren_tel);
renderJson(CommonUtil.renderJsonForLayUI(list));
}
}

@ -18,7 +18,7 @@ import java.util.UUID;
public class TouPiaoModel {
public List<Record> getHouXuanRenList(int type_id) {
String sql = "select * from t_toupiao_houxuanren where type_id=?";
String sql = "select * from t_toupiao_houxuanren where houxuanren_type_id=?";
return Db.find(sql, type_id);
}
}
Loading…
Cancel
Save