|
@@ -156,16 +156,19 @@ public class MaterialUserServiceImpl implements MaterialUserService {
|
|
|
sysUserRoleRelationDao.insertBatch(materialAudit.getUser_id(), Arrays.asList(materialAudit.getRole_id()));
|
|
|
|
|
|
|
|
|
- // 重置的过期时间直接给7天
|
|
|
- Long tokenDurationMilliseconds = userUtil.getTokenDuration(true);
|
|
|
- Integer tokenDurationHours = Convert.toInt(tokenDurationMilliseconds / 3600000L);
|
|
|
- // 实时更新缓存: 用户信息
|
|
|
- SysUserInfo userInfoLasest = sysUserService.selectUserInfo(entity);
|
|
|
- // 赋加缓存时间 { token_expiration }
|
|
|
- SysUserInfo userInfoLasestCatch = userUtil.syncUpdateUserCatch(userInfoLasest, tokenDurationHours, true);
|
|
|
-
|
|
|
- // 发送SSE消息到前端
|
|
|
- sseUtil.send(userInfoLasestCatch.getUser_id(), new SseResponse(SseResponseEnum.SYSTEM_USER_UPDATE, userInfoLasestCatch).toJsonStr());
|
|
|
+ // [2025-08-18] 需求:后台加白后,前台踢掉用户,强制让该用户重新登录;
|
|
|
+ // https://www.tapd.cn/tapd_fe/61244365/story/detail/1161244365001000497
|
|
|
+ sysUserService.kickUser(materialAudit.getUser_id());
|
|
|
+
|
|
|
+// // 重置的过期时间直接给7天
|
|
|
+// Long tokenDurationMilliseconds = userUtil.getTokenDuration(true);
|
|
|
+// Integer tokenDurationHours = Convert.toInt(tokenDurationMilliseconds / 3600000L);
|
|
|
+// // 实时更新缓存: 用户信息
|
|
|
+// SysUserInfo userInfoLasest = sysUserService.selectUserInfo(entity);
|
|
|
+// // 赋加缓存时间 { token_expiration }
|
|
|
+// SysUserInfo userInfoLasestCatch = userUtil.syncUpdateUserCatch(userInfoLasest, tokenDurationHours, true);
|
|
|
+// // 发送SSE消息到前端
|
|
|
+// sseUtil.send(userInfoLasestCatch.getUser_id(), new SseResponse(SseResponseEnum.SYSTEM_USER_UPDATE, userInfoLasestCatch).toJsonStr());
|
|
|
|
|
|
return Map.of("user_id", materialAudit.getUser_id());
|
|
|
}
|