修改登录权限,修改吊牌翻倍价格
This commit is contained in:
@@ -64,7 +64,7 @@ public class ShiroRealm extends AuthorizingRealm {
|
||||
private boolean isPassIp(String loginIp) {
|
||||
// 获取所有的授权IP
|
||||
List<String> ipList = loginIpMapper.getAllIp();
|
||||
if(loginIp == "127.0.0.1"){
|
||||
if (loginIp == "127.0.0.1") {
|
||||
return true;
|
||||
}
|
||||
for (String agreeIp : ipList) {
|
||||
@@ -112,7 +112,9 @@ public class ShiroRealm extends AuthorizingRealm {
|
||||
loginLog.setStatus("异常");
|
||||
agreeLogin = false;
|
||||
}
|
||||
|
||||
if ("2".equals(user.getNeedIp())) {
|
||||
agreeLogin = true;
|
||||
}
|
||||
loginLog.setLoginTime(new Date());
|
||||
loginLog.setRemark(loginRemark);
|
||||
loginLogMapper.addLog(loginLog);
|
||||
@@ -122,7 +124,7 @@ public class ShiroRealm extends AuthorizingRealm {
|
||||
}
|
||||
|
||||
/** 处理生日 */
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
/*SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date birthDate = null;
|
||||
String birthDay = "";
|
||||
// 生日日期/类型不为空
|
||||
@@ -151,7 +153,7 @@ public class ShiroRealm extends AuthorizingRealm {
|
||||
} catch (ParseException e) {
|
||||
// e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
/** 处理session(将用户信息存入session) */
|
||||
// 将用户信息存入session
|
||||
|
||||
Reference in New Issue
Block a user