1、新增小程序相关接口
2、调整OA
This commit is contained in:
+21
-2
@@ -1,9 +1,13 @@
|
||||
package org.springblade.thirdparty.oa.config;
|
||||
|
||||
import feign.Request;
|
||||
import feign.RequestInterceptor;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author bfhuange
|
||||
* @since 2024/12/18
|
||||
@@ -16,8 +20,23 @@ public class OAFeignClientConfig {
|
||||
public RequestInterceptor requestInterceptor() {
|
||||
return template -> {
|
||||
// 空实现屏蔽 全局拦截器 BladeFeignRequestInterceptor
|
||||
String authorization=oaProperties.getAuthorization();
|
||||
template.header("Authorization",authorization);
|
||||
template.header("Authorization", normalizeAuthorization(oaProperties.getAuthorization()));
|
||||
};
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Request.Options options() {
|
||||
return new Request.Options(10, TimeUnit.SECONDS, 120, TimeUnit.SECONDS, true);
|
||||
}
|
||||
|
||||
private String normalizeAuthorization(String authorization) {
|
||||
if (StringUtil.isBlank(authorization)) {
|
||||
return authorization;
|
||||
}
|
||||
if (StringUtil.startsWithIgnoreCase(authorization, "Basic ")
|
||||
|| StringUtil.startsWithIgnoreCase(authorization, "Bearer ")) {
|
||||
return authorization;
|
||||
}
|
||||
return "Basic " + authorization;
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -30,4 +30,8 @@ public class OAConvertConstant {
|
||||
* 根公司父id
|
||||
*/
|
||||
public static final Long ROOT_PARENT_ID = 0L;
|
||||
/**
|
||||
* 同步人员时挂载的顶级组织名称
|
||||
*/
|
||||
public static final String ROOT_COMPANY_NAME = "桂物物流集团";
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -42,6 +42,6 @@ public interface IOAClient {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("${thirdParty.oa.queryPersonPageUrl:/api/hrm/resful/getHrmUserInfoWithPage}")
|
||||
@PostMapping("${thirdParty.oa.queryPersonPageUrl:/gwzh/OA/OA_GET_USER_LIST}")
|
||||
OAResponse<OAPersonResponse> queryPersonPage(@RequestBody OASearch<OAPersonSearch> param);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user