mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增webcad生产单导入:1、cadtoken请求网关异常修复;2、cad拆单批量数据组织id缺省补充;
This commit is contained in:
@@ -214,7 +214,6 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
|
||||
gatewayLog.getEndTime()).toMillis()));
|
||||
// 设置其它字段
|
||||
gatewayLog.setUserId(SecurityFrameworkUtils.getLoginUserId(exchange));
|
||||
gatewayLog.setUserType(SecurityFrameworkUtils.getLoginUserType(exchange));
|
||||
gatewayLog.setResponseHeaders(response.getHeaders());
|
||||
gatewayLog.setHttpStatus(response.getStatusCode());
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cf.imes.gateway.util;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.cf.imes.framework.common.util.json.JsonUtils;
|
||||
import com.cf.imes.gateway.filter.security.LoginUser;
|
||||
import lombok.SneakyThrows;
|
||||
@@ -60,8 +61,10 @@ public class SecurityFrameworkUtils {
|
||||
* @param user 用户
|
||||
*/
|
||||
public static void setLoginUser(ServerWebExchange exchange, LoginUser user) {
|
||||
exchange.getAttributes().put(LOGIN_USER_ID_ATTR, user.getId());
|
||||
exchange.getAttributes().put(LOGIN_USER_TYPE_ATTR, user.getUserType());
|
||||
Long userId = user.getId();
|
||||
if (ObjectUtil.isNotNull(userId)) {
|
||||
exchange.getAttributes().put(LOGIN_USER_ID_ATTR, userId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user