Commit ad3a98af authored by mcb's avatar mcb

no message

parent 8e3f9c35
package com.jz.common.utils.web; package com.jz.common.utils.web;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
...@@ -105,8 +106,22 @@ public class SessionUtils { ...@@ -105,8 +106,22 @@ public class SessionUtils {
} }
return (DmpMember)principal; return (DmpMember)principal;
} }
/** /**
* @Title: getSessionUserId
* @Description: 获取登录用户ID
* @return String 返回类型
*/
public static String getCurrentUserId(){
String userId = "";
DmpMember user = getSecurityUser();
if(user != null){
userId = String.valueOf(user.getUserId());
}
return userId;
}
/**
* @Title: getAuthentication * @Title: getAuthentication
* @Description: TODO(获取authentication) * @Description: TODO(获取authentication)
* @param @return 参数 * @param @return 参数
......
...@@ -228,8 +228,6 @@ public class RealTimeSyncController { ...@@ -228,8 +228,6 @@ public class RealTimeSyncController {
if (StringUtils.isEmpty(params.get("targetDataSourceId").toString())) { if (StringUtils.isEmpty(params.get("targetDataSourceId").toString())) {
return new JsonResult(ResultCode.PARAMS_ERROR, "目标数据源id不能为空!"); return new JsonResult(ResultCode.PARAMS_ERROR, "目标数据源id不能为空!");
} }
boolean flag = false;
//异步提交 //异步提交
Thread thread = new Thread(new Runnable() { Thread thread = new Thread(new Runnable() {
@Override @Override
...@@ -242,7 +240,6 @@ public class RealTimeSyncController { ...@@ -242,7 +240,6 @@ public class RealTimeSyncController {
} }
}); });
thread.start(); thread.start();
return new JsonResult(); return new JsonResult();
} }
......
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
ds.host, ds.host,
ds.port, ds.port,
ds.endpoint, ds.endpoint,
ds,access_key as accessKey, ds.access_key as accessKey,
ds.access_id as accessId, ds.access_id as accessId,
dsdt.datasource_type as datasourceTypeName, dsdt.datasource_type as datasourceTypeName,
dsdt.driver_class_name as driverName dsdt.driver_class_name as driverName
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment