123
This commit is contained in:
@@ -152,10 +152,10 @@ public class UserForbidManager {
|
||||
}
|
||||
|
||||
public CheckForbid checkForbid(Long userId,String usercode, String IMEI, String ip){
|
||||
ForbidTypeEnum typeEnum;
|
||||
CheckForbid noForbid = CheckForbid.noForbid();
|
||||
String member;
|
||||
Long forbidId;
|
||||
ForbidTypeEnum typeEnum = null;
|
||||
String member = null;
|
||||
Long forbidId = 0L;
|
||||
if(StringUtils.isNotEmpty(usercode)){
|
||||
forbidId = forbidCache.checkForbid(usercode, ForbidTypeEnum.USER);
|
||||
if(forbidId == null){
|
||||
@@ -167,7 +167,8 @@ public class UserForbidManager {
|
||||
noForbid = CheckForbid.forbid(traceId);
|
||||
noForbid.setMessage("您的账号已被封禁");
|
||||
|
||||
}else if(StringUtils.isNotBlank(IMEI)){
|
||||
}
|
||||
if(StringUtils.isNotBlank(IMEI)){
|
||||
forbidId = forbidCache.checkForbid(IMEI, ForbidTypeEnum.IMEI);
|
||||
if(forbidId == null){
|
||||
return noForbid;
|
||||
@@ -177,7 +178,8 @@ public class UserForbidManager {
|
||||
String traceId = IdManager.nextIdStr();
|
||||
noForbid = CheckForbid.forbid(traceId);
|
||||
noForbid.setMessage("您的设备已被封禁");
|
||||
}else if(StringUtils.isNotBlank(ip)){
|
||||
}
|
||||
if(StringUtils.isNotBlank(ip)){
|
||||
forbidId = forbidCache.checkForbid(ip, ForbidTypeEnum.IP);
|
||||
if(forbidId == null){
|
||||
return noForbid;
|
||||
@@ -187,8 +189,6 @@ public class UserForbidManager {
|
||||
String traceId = IdManager.nextIdStr();
|
||||
noForbid = CheckForbid.forbid(traceId);
|
||||
noForbid.setMessage("您的IP已被封禁");
|
||||
}else{
|
||||
return noForbid;
|
||||
}
|
||||
if(noForbid.isForbid()){
|
||||
// 保存拦截记录
|
||||
|
||||
Reference in New Issue
Block a user