excel 数据导入查重
peisheng 发布于73月前 1答/1882阅

需求是 excel 导入的数据需要进行 査重 处理  , 自己考虑在 拦截器中写逻辑,可是 importBefore 没有效果,不知道问题在什么地方 ? 


public class FuncionIntercept  extends MetaObjectIntercept{

public void importBefore(AopContext ac) throws Exception {

for (Record record : ac.records) {

System.out.println(ac.toString());

/*if (record.getStr("status").equals("3")) {

throw new Exception("数据状态异常");

}*/

}

}

  

}


[沙发] Jieven
@peisheng 使用错误,请认真阅读基础文档,http://cdn.eova.cn/eova_doc_1.5.pdf
里面有详细讲解元对象拦截器和菜单业务拦截器的区别和用法!
应该继承 SingleIntercept 且在菜单上配置拦截器!
提交评论
嘿,我来帮你!