|
|
|
|
@ -24,9 +24,9 @@ import org.dromara.common.satoken.utils.LoginHelper;
|
|
|
|
|
import org.dromara.common.social.config.properties.SocialLoginConfigProperties;
|
|
|
|
|
import org.dromara.common.social.config.properties.SocialProperties;
|
|
|
|
|
import org.dromara.common.social.utils.SocialUtils;
|
|
|
|
|
import org.dromara.common.sse.dto.SseMessageDto;
|
|
|
|
|
import org.dromara.common.sse.utils.SseMessageUtils;
|
|
|
|
|
import org.dromara.common.tenant.helper.TenantHelper;
|
|
|
|
|
import org.dromara.common.websocket.dto.WebSocketMessageDto;
|
|
|
|
|
import org.dromara.common.websocket.utils.WebSocketUtils;
|
|
|
|
|
import org.dromara.system.domain.bo.SysTenantBo;
|
|
|
|
|
import org.dromara.system.domain.vo.SysClientVo;
|
|
|
|
|
import org.dromara.system.domain.vo.SysTenantVo;
|
|
|
|
|
@ -102,11 +102,11 @@ public class AuthController {
|
|
|
|
|
|
|
|
|
|
Long userId = LoginHelper.getUserId();
|
|
|
|
|
scheduledExecutorService.schedule(() -> {
|
|
|
|
|
WebSocketMessageDto dto = new WebSocketMessageDto();
|
|
|
|
|
SseMessageDto dto = new SseMessageDto();
|
|
|
|
|
dto.setMessage("欢迎登录RuoYi-Vue-Plus后台管理系统");
|
|
|
|
|
dto.setSessionKeys(List.of(userId));
|
|
|
|
|
WebSocketUtils.publishMessage(dto);
|
|
|
|
|
}, 3, TimeUnit.SECONDS);
|
|
|
|
|
dto.setUserIds(List.of(userId));
|
|
|
|
|
SseMessageUtils.publishMessage(dto);
|
|
|
|
|
}, 20, TimeUnit.SECONDS);
|
|
|
|
|
return R.ok(loginVo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|