From 9959465bd863df64374bcbadb5d46d7842e81395 Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 27 Dec 2022 19:17:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=A2=9E=E5=8A=A0=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xboe/school/api/PortalLoginApi.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/servers/boe-server-all/src/main/java/com/xboe/school/api/PortalLoginApi.java b/servers/boe-server-all/src/main/java/com/xboe/school/api/PortalLoginApi.java index e3c24496..48ea351e 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/school/api/PortalLoginApi.java +++ b/servers/boe-server-all/src/main/java/com/xboe/school/api/PortalLoginApi.java @@ -32,6 +32,7 @@ import com.xboe.core.JsonResponseStatus; import com.xboe.core.api.ApiBaseController; import com.xboe.data.dto.UserData; import com.xboe.data.outside.IOutSideDataService; +import com.xboe.data.service.IDataUserSyncService; import com.xboe.externalinterface.system.service.IFwUserService; import com.xboe.system.logs.entity.SysLogLogin; import com.xboe.system.logs.service.ISysLogLoginService; @@ -69,6 +70,9 @@ public class PortalLoginApi extends ApiBaseController { @Autowired IOutSideDataService outsideService; + + @Autowired + IDataUserSyncService userSyncService; @GetMapping("/captcha") public JsonResponse> captcha() { @@ -214,8 +218,12 @@ public class PortalLoginApi extends ApiBaseController { log.error("未获取当前登录人的用户信息"); return wrap(JsonResponseStatus.TOKEN_NOPASS, "用户信息查询失败"); } - //检查本地是否存在,如果存在就更新,不存在就添加 + try { + userSyncService.syncUserFull(udata); + }catch(Exception exp) { + log.error("登录同步用户错误",exp); + } Map data = new HashMap(); Map map = new HashMap(); @@ -257,7 +265,7 @@ public class PortalLoginApi extends ApiBaseController { } Account account = null; if(StringUtil.isNotBlank(tokenInfo.get("aid"))){ - //检查系统用户是否存在 + //检查系统用户是否存在 account = accountService.get(tokenInfo.get("aid")); }else{ //log.error("查询用户kid【"+tokenInfo.get("userId")+"】");