update 优化部分导入语句,修改List<Long>为Collection<Long>

This commit is contained in:
AprilWind
2026-03-19 09:29:19 +08:00
parent 7db9749718
commit f1c2f0d458
100 changed files with 254 additions and 232 deletions

View File

@@ -7,7 +7,7 @@ import cn.hutool.core.lang.RegexPool;
* <p>
* 常用正则表达式集合,更多正则见: https://any86.github.io/any-rule/
*
* @author Feng
* @author AprilWind
*/
public interface RegexConstants extends RegexPool {

View File

@@ -2,6 +2,7 @@ package org.dromara.common.core.service;
import org.dromara.common.core.domain.dto.DeptDTO;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@@ -41,6 +42,6 @@ public interface DeptService {
* @param deptIds 部门 ID 列表
* @return Map其中 key 为部门 IDvalue 为对应的部门名称
*/
Map<Long, String> selectDeptNamesByIds(List<Long> deptIds);
Map<Long, String> selectDeptNamesByIds(Collection<Long> deptIds);
}

View File

@@ -1,6 +1,6 @@
package org.dromara.common.core.service;
import java.util.List;
import java.util.Collection;
import java.util.Map;
/**
@@ -16,6 +16,6 @@ public interface PostService {
* @param postIds 岗位 ID 列表
* @return Map其中 key 为岗位 IDvalue 为对应的岗位名称
*/
Map<Long, String> selectPostNamesByIds(List<Long> postIds);
Map<Long, String> selectPostNamesByIds(Collection<Long> postIds);
}

View File

@@ -1,6 +1,6 @@
package org.dromara.common.core.service;
import java.util.List;
import java.util.Collection;
import java.util.Map;
/**
@@ -16,6 +16,6 @@ public interface RoleService {
* @param roleIds 角色 ID 列表
* @return Map其中 key 为角色 IDvalue 为对应的角色名称
*/
Map<Long, String> selectRoleNamesByIds(List<Long> roleIds);
Map<Long, String> selectRoleNamesByIds(Collection<Long> roleIds);
}

View File

@@ -2,6 +2,7 @@ package org.dromara.common.core.service;
import org.dromara.common.core.domain.dto.UserDTO;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@@ -58,7 +59,7 @@ public interface UserService {
* @param userIds 用户ids
* @return 用户列表
*/
List<UserDTO> selectListByIds(List<Long> userIds);
List<UserDTO> selectListByIds(Collection<Long> userIds);
/**
* 通过角色ID查询用户ID
@@ -66,7 +67,7 @@ public interface UserService {
* @param roleIds 角色ids
* @return 用户ids
*/
List<Long> selectUserIdsByRoleIds(List<Long> roleIds);
List<Long> selectUserIdsByRoleIds(Collection<Long> roleIds);
/**
* 通过角色ID查询用户
@@ -74,7 +75,7 @@ public interface UserService {
* @param roleIds 角色ids
* @return 用户
*/
List<UserDTO> selectUsersByRoleIds(List<Long> roleIds);
List<UserDTO> selectUsersByRoleIds(Collection<Long> roleIds);
/**
* 通过部门ID查询用户
@@ -82,7 +83,7 @@ public interface UserService {
* @param deptIds 部门ids
* @return 用户
*/
List<UserDTO> selectUsersByDeptIds(List<Long> deptIds);
List<UserDTO> selectUsersByDeptIds(Collection<Long> deptIds);
/**
* 通过岗位ID查询用户
@@ -90,7 +91,7 @@ public interface UserService {
* @param postIds 岗位ids
* @return 用户
*/
List<UserDTO> selectUsersByPostIds(List<Long> postIds);
List<UserDTO> selectUsersByPostIds(Collection<Long> postIds);
/**
* 根据用户 ID 列表查询用户昵称映射关系
@@ -98,6 +99,6 @@ public interface UserService {
* @param userIds 用户 ID 列表
* @return Map其中 key 为用户 IDvalue 为对应的用户昵称
*/
Map<Long, String> selectUserNicksByIds(List<Long> userIds);
Map<Long, String> selectUserNicksByIds(Collection<Long> userIds);
}

View File

@@ -7,7 +7,7 @@ import org.dromara.common.core.constant.RegexConstants;
/**
* 正则相关工具类
*
* @author Feng
* @author AprilWind
*/
public final class RegexUtils extends ReUtil {

View File

@@ -10,7 +10,7 @@ import java.util.regex.Pattern;
* 正则字段校验器
* 主要验证字段非空、是否为满足指定格式等
*
* @author Feng
* @author AprilWind
*/
public class RegexValidator extends Validator {

View File

@@ -174,7 +174,13 @@ public class PlusDataPermissionHandler {
return StringUtils.EMPTY;
}
/**
* 获取当前登录用户信息
*
* @return 当前登录用户的LoginUser对象可能为null如未登录场景
*/
private LoginUser currentUser() {
// 从数据权限助手缓存中获取当前登录用户
LoginUser currentUser = DataPermissionHelper.getVariable("user");
if (ObjectUtil.isNull(currentUser)) {
currentUser = LoginHelper.getLoginUser();

View File

@@ -11,7 +11,7 @@ import org.springframework.context.annotation.Primary;
/**
* 短信配置类
*
* @author Feng
* @author AprilWind
*/
@AutoConfiguration(after = {DataRedisAutoConfiguration.class})
public class SmsAutoConfiguration {

View File

@@ -10,7 +10,7 @@ import java.time.Duration;
* SmsDao缓存配置 (使用框架自带RedisUtils实现 协议统一)
* <p>主要用于短信重试和拦截的缓存
*
* @author Feng
* @author AprilWind
*/
public class PlusSmsDao implements SmsDao {