mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 08:57:17 +08:00
chore: 解决部分 sonar 问题
This commit is contained in:
@@ -42,6 +42,7 @@ import top.continew.starter.extension.crud.autoconfigure.CrudTreeProperties;
|
|||||||
import top.continew.starter.extension.crud.model.entity.BaseIdDO;
|
import top.continew.starter.extension.crud.model.entity.BaseIdDO;
|
||||||
import top.continew.starter.extension.crud.model.query.PageQuery;
|
import top.continew.starter.extension.crud.model.query.PageQuery;
|
||||||
import top.continew.starter.extension.crud.model.query.SortQuery;
|
import top.continew.starter.extension.crud.model.query.SortQuery;
|
||||||
|
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
|
||||||
import top.continew.starter.extension.crud.model.resp.PageResp;
|
import top.continew.starter.extension.crud.model.resp.PageResp;
|
||||||
import top.continew.starter.excel.util.ExcelUtils;
|
import top.continew.starter.excel.util.ExcelUtils;
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ import java.util.Optional;
|
|||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public abstract class CrudServiceImpl<M extends BaseMapper<T>, T extends BaseIdDO, L, D, Q, C> extends ServiceImpl<M, T> implements CrudService<L, D, Q, C> {
|
public class CrudServiceImpl<M extends BaseMapper<T>, T extends BaseIdDO, L, D, Q, C> extends ServiceImpl<M, T> implements CrudService<L, D, Q, C> {
|
||||||
|
|
||||||
protected final Class<L> listClass = this.currentListClass();
|
protected final Class<L> listClass = this.currentListClass();
|
||||||
protected final Class<D> detailClass = this.currentDetailClass();
|
protected final Class<D> detailClass = this.currentDetailClass();
|
||||||
@@ -130,6 +131,11 @@ public abstract class CrudServiceImpl<M extends BaseMapper<T>, T extends BaseIdD
|
|||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LabelValueResp> listDict(Q query, SortQuery sortQuery) {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long create(C req) {
|
public Long create(C req) {
|
||||||
|
@@ -71,7 +71,7 @@ import java.util.function.Function;
|
|||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public abstract class CrudServiceImpl<M extends BaseMapper<T>, T extends BaseIdDO, L, D, Q, C> extends ServiceImpl<M, T> implements CrudService<L, D, Q, C> {
|
public class CrudServiceImpl<M extends BaseMapper<T>, T extends BaseIdDO, L, D, Q, C> extends ServiceImpl<M, T> implements CrudService<L, D, Q, C> {
|
||||||
|
|
||||||
private Class<L> listClass;
|
private Class<L> listClass;
|
||||||
private Class<D> detailClass;
|
private Class<D> detailClass;
|
||||||
|
@@ -53,7 +53,7 @@ public class CryptoAutoConfiguration {
|
|||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean
|
@ConditionalOnMissingBean
|
||||||
public MyBatisEncryptInterceptor myBatisEncryptInterceptor() {
|
public MyBatisEncryptInterceptor mybatisEncryptInterceptor() {
|
||||||
return new MyBatisEncryptInterceptor();
|
return new MyBatisEncryptInterceptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ public class CryptoAutoConfiguration {
|
|||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(MyBatisDecryptInterceptor.class)
|
@ConditionalOnMissingBean(MyBatisDecryptInterceptor.class)
|
||||||
public MyBatisDecryptInterceptor myBatisDecryptInterceptor() {
|
public MyBatisDecryptInterceptor mybatisDecryptInterceptor() {
|
||||||
return new MyBatisDecryptInterceptor();
|
return new MyBatisDecryptInterceptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,10 +20,11 @@ package top.continew.starter.security.crypto.encryptor;
|
|||||||
* 加密器基类
|
* 加密器基类
|
||||||
*
|
*
|
||||||
* @author lishuyan
|
* @author lishuyan
|
||||||
|
* @since 2.13.2
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractEncryptor implements IEncryptor {
|
public abstract class AbstractEncryptor implements IEncryptor {
|
||||||
|
|
||||||
public AbstractEncryptor(CryptoContext context) {
|
protected AbstractEncryptor(CryptoContext context) {
|
||||||
// 配置校验与配置注入
|
// 配置校验与配置注入
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ public abstract class AbstractSymmetricCryptoEncryptor extends AbstractEncryptor
|
|||||||
*/
|
*/
|
||||||
private final CryptoContext context;
|
private final CryptoContext context;
|
||||||
|
|
||||||
public AbstractSymmetricCryptoEncryptor(CryptoContext context) {
|
protected AbstractSymmetricCryptoEncryptor(CryptoContext context) {
|
||||||
super(context);
|
super(context);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
@@ -24,6 +24,7 @@ import java.util.Objects;
|
|||||||
* 加密上下文
|
* 加密上下文
|
||||||
*
|
*
|
||||||
* @author lishuyan
|
* @author lishuyan
|
||||||
|
* @since 2.13.2
|
||||||
*/
|
*/
|
||||||
public class CryptoContext {
|
public class CryptoContext {
|
||||||
|
|
||||||
|
@@ -34,6 +34,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
* 加密助手
|
* 加密助手
|
||||||
*
|
*
|
||||||
* @author lishuyan
|
* @author lishuyan
|
||||||
|
* @since 2.13.2
|
||||||
*/
|
*/
|
||||||
public class EncryptHelper {
|
public class EncryptHelper {
|
||||||
|
|
||||||
@@ -49,6 +50,9 @@ public class EncryptHelper {
|
|||||||
*/
|
*/
|
||||||
private static final Map<Integer, IEncryptor> ENCRYPTOR_CACHE = new ConcurrentHashMap<>();
|
private static final Map<Integer, IEncryptor> ENCRYPTOR_CACHE = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
private EncryptHelper() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化默认配置
|
* 初始化默认配置
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user