feat: upgrade framework 3.6.5
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.wfc</groupId>
|
||||
<artifactId>wfc</artifactId>
|
||||
<version>3.6.4</version>
|
||||
<version>3.6.5</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.wfc.common.core.domain.R;
|
||||
import org.wfc.common.core.enums.UserStatus;
|
||||
import org.wfc.common.core.exception.ServiceException;
|
||||
import org.wfc.common.core.text.Convert;
|
||||
import org.wfc.common.core.utils.DateUtils;
|
||||
import org.wfc.common.core.utils.StringUtils;
|
||||
import org.wfc.common.core.utils.ip.IpUtils;
|
||||
import org.wfc.common.redis.service.RedisService;
|
||||
@@ -83,7 +84,7 @@ public class SysLoginService
|
||||
{
|
||||
throw new ServiceException(userResult.getMsg());
|
||||
}
|
||||
|
||||
|
||||
LoginUser userInfo = userResult.getData();
|
||||
SysUser user = userResult.getData().getSysUser();
|
||||
if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
|
||||
@@ -98,9 +99,26 @@ public class SysLoginService
|
||||
}
|
||||
passwordService.validate(user, password);
|
||||
recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");
|
||||
recordLoginInfo(user.getUserId());
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录登录信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
*/
|
||||
public void recordLoginInfo(Long userId)
|
||||
{
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserId(userId);
|
||||
// 更新用户登录IP
|
||||
sysUser.setLoginIp(IpUtils.getIpAddr());
|
||||
// 更新用户登录时间
|
||||
sysUser.setLoginDate(DateUtils.getNowDate());
|
||||
remoteUserService.recordUserLogin(sysUser, SecurityConstants.INNER);
|
||||
}
|
||||
|
||||
public void logout(String loginName)
|
||||
{
|
||||
recordLogService.recordLogininfor(loginName, Constants.LOGOUT, "退出成功");
|
||||
|
||||
Reference in New Issue
Block a user