Pre Merge pull request !834 from Kayleigh Wang/dev

This commit is contained in:
Kayleigh Wang 2026-03-02 05:28:01 +00:00 committed by Gitee
commit cb80e15f75
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 9 additions and 6 deletions

View File

@ -229,9 +229,9 @@ public class AuthController {
String referer = request.getHeader("referer");
if (StringUtils.isNotBlank(referer)) {
// 这里从referer中取值是为了本地使用hosts添加虚拟域名方便本地环境调试
host = referer.split("//")[1].split("/")[0];
host = new java.net.URI(referer).getHost();
} else {
host = new URL(request.getRequestURL().toString()).getHost();
host = new java.net.URI(request.getRequestURL().toString()).getHost();
}
// 根据域名进行筛选
List<TenantListVo> list = StreamUtils.filter(voList, vo ->

View File

@ -19,7 +19,8 @@ public class I18nLocaleResolver implements LocaleResolver {
Locale locale = Locale.getDefault();
if (language != null && language.length() > 0) {
String[] split = language.split("_");
locale = new Locale(split[0], split[1]);
String languageTag = String.join("-", split);
locale = Locale.forLanguageTag(languageTag);
}
return locale;
}

View File

@ -27,7 +27,7 @@ import java.util.stream.IntStream;
public class TestMapJobAnnotation {
@MapExecutor
public ExecuteResult doJobMapExecute(MapArgs mapArgs, MapHandler mapHandler) {
public ExecuteResult doJobMapExecute(MapArgs mapArgs, MapHandler<List<Integer>> mapHandler) {
// 生成1~200数值并分片
int partitionSize = 50;
List<List<Integer>> partition = IntStream.rangeClosed(1, 200)
@ -42,6 +42,7 @@ public class TestMapJobAnnotation {
@MapExecutor(taskName = "doCalc")
public ExecuteResult doCalc(MapArgs mapArgs) {
@SuppressWarnings("unchecked")
List<Integer> sourceList = (List<Integer>) mapArgs.getMapResult();
// 遍历sourceList的每一个元素,计算出一个累加值partitionTotal
int partitionTotal = sourceList.stream().mapToInt(i -> i).sum();

View File

@ -29,7 +29,7 @@ import java.util.stream.IntStream;
public class TestMapReduceAnnotation1 {
@MapExecutor
public ExecuteResult rootMapExecute(MapArgs mapArgs, MapHandler mapHandler) {
public ExecuteResult rootMapExecute(MapArgs mapArgs, MapHandler<List<Integer>> mapHandler) {
int partitionSize = 50;
List<List<Integer>> partition = IntStream.rangeClosed(1, 200)
.boxed()
@ -43,6 +43,7 @@ public class TestMapReduceAnnotation1 {
@MapExecutor(taskName = "doCalc")
public ExecuteResult doCalc(MapArgs mapArgs) {
@SuppressWarnings("unchecked")
List<Integer> sourceList = (List<Integer>) mapArgs.getMapResult();
// 遍历sourceList的每一个元素,计算出一个累加值partitionTotal
int partitionTotal = sourceList.stream().mapToInt(i -> i).sum();

View File

@ -394,7 +394,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
log.warn("[根目录路由冲突] 根目录下路由 '{}' 必须唯一,已被菜单 '{}' 占用", path, sysMenu.getMenuName());
return false;
} else if (StringUtils.equalsAnyIgnoreCase(routeName, dbRouteName)
&& sysMenu.getMenuType().equals(menu.getMenuType())) {
&& sysMenu.getMenuType().equals(menu.getMenuType()) && parentId.equals(dbParentId)) {
log.warn("[路由名称冲突] 路由名称 '{}' 需全局唯一,已被菜单 '{}' 使用", routeName, sysMenu.getMenuName());
return false;
}