init
This commit is contained in:
@@ -56,7 +56,15 @@ public class UserForbidManager {
|
||||
dto.setRemark(userForbidReq.getReason());
|
||||
this.forbid(dto);
|
||||
}else if(integer == 2){ // 封设备
|
||||
// 封设备
|
||||
UserInfo userInfo = userInfoService.getByUserId(user.getId());
|
||||
if(userInfo != null && StringUtils.isNotEmpty(userInfo.getImei())){
|
||||
UserForbidDTO dto = new UserForbidDTO();
|
||||
dto.setForbidTime(userForbidReq.getForbidTime());
|
||||
dto.setForbidType(ForbidTypeEnum.IMEI.getCode());
|
||||
dto.setMember(userInfo.getImei());
|
||||
dto.setRemark(userForbidReq.getReason());
|
||||
this.forbid(dto);
|
||||
}
|
||||
}else if(integer == 3){ // 封IP
|
||||
UserInfo userInfo = userInfoService.getByUserId(user.getId());
|
||||
if(userInfo != null && StringUtils.isNotEmpty(userInfo.getLastLoginIp())){
|
||||
@@ -113,7 +121,7 @@ public class UserForbidManager {
|
||||
noForbid = CheckForbid.forbid(traceId);
|
||||
noForbid.setMessage("您的账号已被封禁");
|
||||
|
||||
}else if(IMEI != null){
|
||||
}else if(StringUtils.isNotBlank(IMEI)){
|
||||
forbidId = forbidCache.checkForbid(IMEI, ForbidTypeEnum.IMEI);
|
||||
if(forbidId == null){
|
||||
return noForbid;
|
||||
@@ -123,7 +131,7 @@ public class UserForbidManager {
|
||||
String traceId = IdManager.nextIdStr();
|
||||
noForbid = CheckForbid.forbid(traceId);
|
||||
noForbid.setMessage("您的设备已被封禁");
|
||||
}else if(ip != null){
|
||||
}else if(StringUtils.isNotBlank(ip)){
|
||||
forbidId = forbidCache.checkForbid(ip, ForbidTypeEnum.IP);
|
||||
if(forbidId == null){
|
||||
return noForbid;
|
||||
|
||||
Reference in New Issue
Block a user