use of com.ikoori.vip.common.annotion.log.BussinessLog in project vip by guangdada.
the class UserMgrController method reset.
/**
* 重置管理员的密码
*/
@RequestMapping("/reset")
@BussinessLog(value = "重置管理员密码", key = "userId", dict = Dict.UserDict)
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Tip reset(@RequestParam Integer userId) {
if (ToolUtil.isEmpty(userId)) {
throw new BussinessException(BizExceptionEnum.REQUEST_NULL);
}
User user = this.userMapper.selectById(userId);
user.setSalt(ShiroKit.getRandomSalt(5));
user.setPassword(ShiroKit.md5(Const.DEFAULT_PWD, user.getSalt()));
this.userMapper.updateById(user);
return SUCCESS_TIP;
}
Aggregations