Pre Merge pull request !833 from Kayleigh Wang/dev

This commit is contained in:
Kayleigh Wang 2026-03-01 06:09:38 +00:00 committed by Gitee
commit 4c970fd06f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
9 changed files with 14 additions and 11 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

@ -23,7 +23,7 @@ import java.util.function.Supplier;
* @version 3.5.0
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@SuppressWarnings("unchecked cast")
@SuppressWarnings("unchecked")
public class DataPermissionHelper {
private static final String DATA_PERMISSION_KEY = "data:permission";

View File

@ -113,7 +113,7 @@ public class PlusSaTokenDao implements SaTokenDaoBySessionFollowObject {
* @param key 键名称
* @return object
*/
@SuppressWarnings("unchecked cast")
@SuppressWarnings("unchecked")
@Override
public <T> T getObject(String key, Class<T> classType) {
Object o = CAFFEINE.get(key, k -> RedisUtils.getCacheObject(key));

View File

@ -63,7 +63,7 @@ public class LoginHelper {
/**
* 获取用户(多级缓存)
*/
@SuppressWarnings("unchecked cast")
@SuppressWarnings("unchecked")
public static <T extends LoginUser> T getLoginUser() {
SaSession session = StpUtil.getTokenSession();
if (ObjectUtil.isNull(session)) {
@ -75,7 +75,7 @@ public class LoginHelper {
/**
* 获取用户基于token
*/
@SuppressWarnings("unchecked cast")
@SuppressWarnings("unchecked")
public static <T extends LoginUser> T getLoginUser(String token) {
SaSession session = StpUtil.getTokenSessionByToken(token);
if (ObjectUtil.isNull(session)) {

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

@ -26,7 +26,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)
@ -41,6 +41,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

@ -28,7 +28,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()
@ -42,6 +42,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;
}

View File

@ -102,7 +102,7 @@ public class FlwNodeExtServiceImpl implements NodeExtService, IFlwNodeExtService
* @param sources 数据来源枚举类或字典类型
* @return 构建的 `NodeExt` 对象
*/
@SuppressWarnings("unchecked cast")
@SuppressWarnings("unchecked")
private NodeExt buildNodeExt(String code, String name, int type, List<Object> sources) {
NodeExt nodeExt = new NodeExt();
nodeExt.setCode(code);