mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 10:56:50 +08:00
用户增加同步的处理
This commit is contained in:
@@ -32,6 +32,7 @@ import com.xboe.core.JsonResponseStatus;
|
|||||||
import com.xboe.core.api.ApiBaseController;
|
import com.xboe.core.api.ApiBaseController;
|
||||||
import com.xboe.data.dto.UserData;
|
import com.xboe.data.dto.UserData;
|
||||||
import com.xboe.data.outside.IOutSideDataService;
|
import com.xboe.data.outside.IOutSideDataService;
|
||||||
|
import com.xboe.data.service.IDataUserSyncService;
|
||||||
import com.xboe.externalinterface.system.service.IFwUserService;
|
import com.xboe.externalinterface.system.service.IFwUserService;
|
||||||
import com.xboe.system.logs.entity.SysLogLogin;
|
import com.xboe.system.logs.entity.SysLogLogin;
|
||||||
import com.xboe.system.logs.service.ISysLogLoginService;
|
import com.xboe.system.logs.service.ISysLogLoginService;
|
||||||
@@ -69,6 +70,9 @@ public class PortalLoginApi extends ApiBaseController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IOutSideDataService outsideService;
|
IOutSideDataService outsideService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IDataUserSyncService userSyncService;
|
||||||
|
|
||||||
@GetMapping("/captcha")
|
@GetMapping("/captcha")
|
||||||
public JsonResponse<Map<String, String>> captcha() {
|
public JsonResponse<Map<String, String>> captcha() {
|
||||||
@@ -214,8 +218,12 @@ public class PortalLoginApi extends ApiBaseController {
|
|||||||
log.error("未获取当前登录人的用户信息");
|
log.error("未获取当前登录人的用户信息");
|
||||||
return wrap(JsonResponseStatus.TOKEN_NOPASS, "用户信息查询失败");
|
return wrap(JsonResponseStatus.TOKEN_NOPASS, "用户信息查询失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
//检查本地是否存在,如果存在就更新,不存在就添加
|
//检查本地是否存在,如果存在就更新,不存在就添加
|
||||||
|
try {
|
||||||
|
userSyncService.syncUserFull(udata);
|
||||||
|
}catch(Exception exp) {
|
||||||
|
log.error("登录同步用户错误",exp);
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, String> data = new HashMap<String, String>();
|
Map<String, String> data = new HashMap<String, String>();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
@@ -257,7 +265,7 @@ public class PortalLoginApi extends ApiBaseController {
|
|||||||
}
|
}
|
||||||
Account account = null;
|
Account account = null;
|
||||||
if(StringUtil.isNotBlank(tokenInfo.get("aid"))){
|
if(StringUtil.isNotBlank(tokenInfo.get("aid"))){
|
||||||
//检查系统用户是否存在
|
//检查系统用户是否存在
|
||||||
account = accountService.get(tokenInfo.get("aid"));
|
account = accountService.get(tokenInfo.get("aid"));
|
||||||
}else{
|
}else{
|
||||||
//log.error("查询用户kid【"+tokenInfo.get("userId")+"】");
|
//log.error("查询用户kid【"+tokenInfo.get("userId")+"】");
|
||||||
|
|||||||
Reference in New Issue
Block a user