|
楼主 |
发表于 2015-2-28 21:59:14
|
显示全部楼层
本帖最后由 Masion 于 2015-2-28 22:05 编辑
在后台的登录动作(/BIZ/system/logic/code/dsrc/OPMProcedure.java)中修改login函数如下- private static Object login(String name, Date loginDate, String pwd, String lang, boolean checkPwd, String ip, Map<Object, Object> options){
- ContextHelper.getSessionContext().put(OrgConstants.SYSTEM_LOGIN_IP, ip); //将登录设备的ip放到SessionContext中
- name = getLoginNameByMail(name); //拿到用户名name
- if (Utils.isEmptyString(lang)){
- lang = "zh_CN"; //拿到语言,默认为简体中文
- }
-
- List result = (List)OrgUtils.login1(name, loginDate, pwd, lang, checkPwd, ip, options); //查询符合条件的操作者(检查密码符合?)
-
- if ("true".equals(result.get(0))){ //如果返回true
- Operator operator = ContextHelper.getOperator(); //取当前操作者
- UserManager.instance().addUser(new User(ContextHelper.getSessionContext().getSessionID(), operator.getName(), operator.getID(), CommonUtils.getCurrentDateTime(), operator.getLoginIP()));
- //在userManager的示例里表中添加操作者(当前sessionID,当前操作者姓名,当前操作者ID,当前日期,当前IP)
- }
-
- //拿到当前登录设备的设备类型和操作系统类型
- String deviceType = "未知";
- String operatingSystem = "未知";
-
- if (options!=null){
- deviceType = (String)options.get("DeviceType");
- if (Utils.isEmptyString(deviceType)){
- deviceType = "未知";
- }
- operatingSystem = (String)options.get("OperatingSystem");
- if (Utils.isEmptyString(operatingSystem)){
- operatingSystem = "未知";
- }
- }
-
- //将设备类型和操作系统类型压到session上下文中
- ContextHelper.getSessionContext().put("DeviceType", deviceType);
- ContextHelper.getSessionContext().put("OperatingSystem", operatingSystem);
- //这里为新增加内容,这里为新增加内容,这里为新增加内容,这里为新增加内容,这里为新增加内容,
- String fingerPrintFeature="yiersan";
- if (options!=null){
- fingerPrintFeature = (String)options.get("fingerPrintFeature");
- checkFingerPrint(fingerPrintFeature,name); //检查指纹是否符合
- }
- //新增完毕,新增完毕,新增完毕,新增完毕,新增完毕,新增完毕,新增完毕,新增完毕,新增完毕,新增完毕,
- checkClientApp(); //检查客户端设备
- return result; //返回符合条件的操作者列表
- }
复制代码 在本文件需要引入厂家提供的指纹对比的类:import com.wellcom.verify.GfpVerifyWell;
|
|