mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 22:57:17 +08:00 
			
		
		
		
	refactor: 优化部分代码
修复 Sonar 扫描问题
This commit is contained in:
		| @@ -16,13 +16,15 @@ | ||||
|  | ||||
| package top.charles7c.continew.admin.common.constant; | ||||
|  | ||||
| import top.charles7c.continew.starter.extension.crud.constant.ContainerPool; | ||||
|  | ||||
| /** | ||||
|  * 数据源容器相关常量(Crane4j 数据填充组件使用) | ||||
|  * | ||||
|  * @author Charles7c | ||||
|  * @since 2024/1/20 12:33 | ||||
|  */ | ||||
| public class ContainerConstants implements top.charles7c.continew.starter.extension.crud.constant.ContainerConstants { | ||||
| public class ContainerConstants extends ContainerPool { | ||||
|  | ||||
|     private ContainerConstants() { | ||||
|     } | ||||
|   | ||||
| @@ -30,6 +30,9 @@ import top.charles7c.continew.starter.core.util.validate.ValidationUtils; | ||||
|  */ | ||||
| public class SecureUtils { | ||||
|  | ||||
|     private SecureUtils() { | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 公钥加密 | ||||
|      * | ||||
| @@ -74,7 +77,4 @@ public class SecureUtils { | ||||
|     public static String md5Salt(String data, String salt) { | ||||
|         return SecureUtil.md5(SecureUtil.md5(data) + salt); | ||||
|     } | ||||
|  | ||||
|     private SecureUtils() { | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -42,6 +42,9 @@ import java.time.LocalDateTime; | ||||
|  */ | ||||
| public class LoginHelper { | ||||
|  | ||||
|     private LoginHelper() { | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 用户登录并缓存用户信息 | ||||
|      * | ||||
| @@ -133,7 +136,4 @@ public class LoginHelper { | ||||
|     public static String getNickname(Long userId) { | ||||
|         return ExceptionUtils.exToNull(() -> SpringUtil.getBean(CommonUserService.class).getNicknameById(userId)); | ||||
|     } | ||||
|  | ||||
|     private LoginHelper() { | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user