mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
cad拆单多租户信息透传异常修复
This commit is contained in:
-16
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.messaging.handler.invocation;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
|
||||
import com.cf.imes.framework.organ.core.util.OrganUtils;
|
||||
import org.springframework.core.DefaultParameterNameDiscoverer;
|
||||
@@ -35,7 +33,6 @@ import java.lang.reflect.Type;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static com.cf.imes.framework.web.core.util.WebFrameworkUtils.HEADER_ORGAN_ID;
|
||||
import static com.cf.imes.framework.web.core.util.WebFrameworkUtils.HEADER_PEEK;
|
||||
|
||||
/**
|
||||
* Extension of {@link HandlerMethod} that invokes the underlying method with
|
||||
@@ -125,7 +122,6 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||
// 注意:如下是本类的改动点!!!
|
||||
// 情况一:无组织编号的情况
|
||||
Long organId= parseorganId(message);
|
||||
parsePeek(message);
|
||||
if (organId == null) {
|
||||
return doInvoke(args);
|
||||
}
|
||||
@@ -153,18 +149,6 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||
throw new IllegalArgumentException("未知的数据类型:" + organId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 头部带有多数据源,透传
|
||||
*
|
||||
* @param message
|
||||
*/
|
||||
private void parsePeek(Message<?> message) {
|
||||
Object peek = message.getHeaders().get(HEADER_PEEK);
|
||||
if (ObjectUtil.isNotNull(peek)) {
|
||||
DynamicDataSourceContextHolder.push(peek.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the method argument values for the current message, checking the provided
|
||||
* argument values and falling back to the configured argument resolvers.
|
||||
|
||||
Reference in New Issue
Block a user