userexamine

master
20918 12 months ago
parent f6aed30243
commit b96faf400b

@ -72,15 +72,20 @@ public class SysUserExamineController extends BaseController {
/** /**
* *
* @param sysUser * @param userId
* @return * @return
*/ */
@RequiresPermissions("system:userexamine:examine") @RequiresPermissions("system:userexamine:examine")
@Log(title = "用户审核", businessType = BusinessType.EXAMINE) @Log(title = "用户审核", businessType = BusinessType.EXAMINE)
@GetMapping("/saveexamine") @GetMapping("/saveexamine/{userId}/{examine}/{examinedate}/{examineuser}")
@ResponseBody @ResponseBody
public AjaxResult editSave(@Validated SysUser sysUser) public AjaxResult editSave(@PathVariable("userId") Long userId,@PathVariable("examine")
String examine,@PathVariable("examinedate") String examinedate,@PathVariable("examineuser") String examineuser)
{ {
SysUser sysUser = userService.selectUserById(userId);
sysUser.setExamine(examine);
sysUser.setExaminedate(examinedate);
sysUser.setExamineuser(examineuser);
return toAjax(userService.updateUser(sysUser)); return toAjax(userService.updateUser(sysUser));
} }
} }

@ -6,6 +6,7 @@ user.password.not.match=用户不存在/密码错误
user.password.retry.limit.count=密码输入错误{0}次 user.password.retry.limit.count=密码输入错误{0}次
user.password.retry.limit.exceed=密码输入错误{0}次帐户锁定10分钟 user.password.retry.limit.exceed=密码输入错误{0}次帐户锁定10分钟
user.password.delete=对不起,您的账号已被删除 user.password.delete=对不起,您的账号已被删除
user.examine.disabled=抱歉,你的用户未经过审核
user.blocked=用户已封禁,请联系管理员 user.blocked=用户已封禁,请联系管理员
role.blocked=角色已封禁,请联系管理员 role.blocked=角色已封禁,请联系管理员
login.blocked=很遗憾访问IP已被列入系统黑名单 login.blocked=很遗憾访问IP已被列入系统黑名单

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>登录保密业务辅助管理系统系统</title> <title>登录保密业务辅助管理系统系统</title>
<meta name="description" content="若依后台管理框架"> <meta name="description" content="后台管理框架">
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/> <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/> <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/> <link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>

@ -0,0 +1,24 @@
package com.ruoyi.common.enums;
public enum ExamineState {
ENABLE("0", "通过"), DISABLE("1", "未通过"), DEFAULT("2", "未审核");
private final String code;
private final String info;
ExamineState(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

@ -0,0 +1,10 @@
package com.ruoyi.common.exception.user;
public class UserDisableException extends UserException{
private static final long serialVersionUID = 1L;
public UserDisableException()
{
super("user.examine.disabled", null);
}
}

@ -2,6 +2,9 @@ package com.ruoyi.framework.shiro.service;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import com.ruoyi.common.enums.ExamineState;
import com.ruoyi.common.exception.user.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
@ -10,12 +13,6 @@ import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.enums.UserStatus; import com.ruoyi.common.enums.UserStatus;
import com.ruoyi.common.exception.user.BlackListException;
import com.ruoyi.common.exception.user.CaptchaException;
import com.ruoyi.common.exception.user.UserBlockedException;
import com.ruoyi.common.exception.user.UserDeleteException;
import com.ruoyi.common.exception.user.UserNotExistsException;
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.IpUtils; import com.ruoyi.common.utils.IpUtils;
import com.ruoyi.common.utils.MessageUtils; import com.ruoyi.common.utils.MessageUtils;
@ -115,6 +112,15 @@ public class SysLoginService
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.delete"))); AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.delete")));
throw new UserDeleteException(); throw new UserDeleteException();
} }
/**
*
*/
if (ExamineState.DISABLE.getCode().equals(user.getExamine()) || ExamineState.DEFAULT.getCode().equals(user.getExamine()))
{
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.examine.disabled")));
throw new UserDisableException();
}
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
{ {

Loading…
Cancel
Save