mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 09:38:26 +08:00
commit
5906decfba
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -19,6 +19,9 @@ package com.mybatisflex.core;
|
||||
* Mybatis-Flex 可能用到的静态常量
|
||||
*/
|
||||
public class FlexConsts {
|
||||
|
||||
private FlexConsts() {}
|
||||
|
||||
public static final String NAME = "MyBatis-Flex";
|
||||
public static final String VERSION = "1.3.4";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -34,9 +34,11 @@ import java.util.Map;
|
||||
*/
|
||||
public class AuditManager {
|
||||
|
||||
private static MessageFactory messageFactory = new DefaultMessageFactory();
|
||||
|
||||
private static boolean auditEnable = false;
|
||||
private static Clock clock = System::currentTimeMillis;
|
||||
private static MessageFactory MessageFactory = new DefaultMessageFactory();
|
||||
private AuditManager() {}
|
||||
private static MessageCollector messageCollector = new ScheduledMessageCollector();
|
||||
|
||||
public static boolean isAuditEnable() {
|
||||
@ -56,11 +58,11 @@ public class AuditManager {
|
||||
}
|
||||
|
||||
public static MessageFactory getMessageFactory() {
|
||||
return MessageFactory;
|
||||
return messageFactory;
|
||||
}
|
||||
|
||||
public static void setMessageFactory(MessageFactory MessageFactory) {
|
||||
AuditManager.MessageFactory = MessageFactory;
|
||||
public static void setMessageFactory(MessageFactory messageFactory) {
|
||||
AuditManager.messageFactory = messageFactory;
|
||||
}
|
||||
|
||||
public static MessageCollector getMessageCollector() {
|
||||
@ -87,7 +89,7 @@ public class AuditManager {
|
||||
}
|
||||
|
||||
public static <T> T startAudit(AuditRunnable<T> supplier, BoundSql boundSql, Configuration configuration) throws SQLException {
|
||||
AuditMessage auditMessage = MessageFactory.create();
|
||||
AuditMessage auditMessage = messageFactory.create();
|
||||
if (auditMessage == null) {
|
||||
return supplier.execute();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,9 +18,9 @@ package com.mybatisflex.core.audit;
|
||||
|
||||
public class ConsoleMessageCollector implements MessageCollector {
|
||||
|
||||
private SqlDebugPrinter printer = (sql, takedTimeMillis) -> {
|
||||
if (takedTimeMillis != null) {
|
||||
System.out.println("Flex exec sql taked " + takedTimeMillis + " ms >>> " + sql);
|
||||
private SqlDebugPrinter printer = (sql, tookTimeMillis) -> {
|
||||
if (tookTimeMillis != null) {
|
||||
System.out.println("Flex exec sql took " + tookTimeMillis + " ms >>> " + sql);
|
||||
} else {
|
||||
System.out.println("Flex exec sql >>> " + sql);
|
||||
}
|
||||
@ -39,6 +39,6 @@ public class ConsoleMessageCollector implements MessageCollector {
|
||||
}
|
||||
|
||||
public interface SqlDebugPrinter {
|
||||
void print(String sql, Long takedTimeMillis);
|
||||
void print(String sql, Long tookTimeMillis);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -19,6 +19,9 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.security.MessageDigest;
|
||||
|
||||
public class HashUtil {
|
||||
|
||||
private HashUtil() {}
|
||||
|
||||
private static final char[] HEX_DIGITS = "0123456789abcdef".toCharArray();
|
||||
|
||||
public static String md5(String srcStr) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -37,6 +37,8 @@ import java.util.Map.Entry;
|
||||
|
||||
public class HttpUtil {
|
||||
|
||||
private HttpUtil() {}
|
||||
|
||||
private static final String POST = "POST";
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -19,6 +19,8 @@ import java.util.function.Supplier;
|
||||
|
||||
public class DataSourceKey {
|
||||
|
||||
private DataSourceKey() {}
|
||||
|
||||
private static final ThreadLocal<String> keyThreadLocal = new ThreadLocal<>();
|
||||
|
||||
public static void use(String dataSourceKey) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,6 +18,7 @@ package com.mybatisflex.core.dialect;
|
||||
|
||||
import com.mybatisflex.core.exception.FlexExceptions;
|
||||
import com.mybatisflex.core.util.StringUtil;
|
||||
import org.apache.ibatis.datasource.unpooled.UnpooledDataSource;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.lang.reflect.Method;
|
||||
@ -30,6 +31,7 @@ import java.util.regex.Pattern;
|
||||
*/
|
||||
public class DbTypeUtil {
|
||||
|
||||
private DbTypeUtil() {}
|
||||
|
||||
/**
|
||||
* 获取当前配置的 DbType
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -30,6 +30,8 @@ import java.util.Map;
|
||||
*/
|
||||
public class DialectFactory {
|
||||
|
||||
private DialectFactory() {}
|
||||
|
||||
/**
|
||||
* 数据库类型和方言的映射关系,可以通过其读取指定的方言,亦可能通过其扩展其他方言
|
||||
* 比如,在 mybatis-flex 实现的方言中有 bug 或者 有自己的独立实现,可以添加自己的方言实现到
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -24,6 +24,8 @@ import java.util.Map;
|
||||
|
||||
public class KeyGeneratorFactory {
|
||||
|
||||
private KeyGeneratorFactory() {}
|
||||
|
||||
private static final Map<String, IKeyGenerator> KEY_GENERATOR_MAP = new HashMap<>();
|
||||
|
||||
static {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,6 +17,8 @@ package com.mybatisflex.core.keygen;
|
||||
|
||||
public class KeyGenerators {
|
||||
|
||||
private KeyGenerators() {}
|
||||
|
||||
/**
|
||||
* uuid 主键生成器
|
||||
* {@link com.mybatisflex.core.keygen.impl.UUIDKeyGenerator}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -15,9 +15,9 @@
|
||||
*/
|
||||
package com.mybatisflex.core.keygen;
|
||||
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.core.FlexConsts;
|
||||
import com.mybatisflex.core.FlexGlobalConfig;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.core.exception.FlexExceptions;
|
||||
import com.mybatisflex.core.table.IdInfo;
|
||||
import com.mybatisflex.core.table.TableInfo;
|
||||
@ -35,6 +35,7 @@ import java.util.List;
|
||||
|
||||
public class MybatisKeyGeneratorUtil {
|
||||
|
||||
private MybatisKeyGeneratorUtil() {}
|
||||
|
||||
public static KeyGenerator createTableKeyGenerator(TableInfo tableInfo, MappedStatement ms) {
|
||||
List<IdInfo> primaryKeyList = tableInfo.getPrimaryKeyList();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -24,6 +24,7 @@ import java.util.function.Supplier;
|
||||
*/
|
||||
public class MaskManager {
|
||||
|
||||
private MaskManager() {}
|
||||
|
||||
/**
|
||||
* 脱敏处理器,type : processor
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,6 +20,8 @@ package com.mybatisflex.core.mask;
|
||||
*/
|
||||
public class Masks {
|
||||
|
||||
private Masks() {}
|
||||
|
||||
/**
|
||||
* 手机号脱敏
|
||||
*/
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,6 +17,8 @@ package com.mybatisflex.core.mybatis;
|
||||
|
||||
public class MappedStatementTypes {
|
||||
|
||||
private MappedStatementTypes() {}
|
||||
|
||||
private static ThreadLocal<Class<?>> currentTypeTL = new ThreadLocal<>();
|
||||
|
||||
public static void setCurrentType(Class<?> type){
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -30,6 +30,8 @@ import java.util.Map;
|
||||
|
||||
class ProviderUtil {
|
||||
|
||||
private ProviderUtil() {}
|
||||
|
||||
public static String getSqlString(Map params) {
|
||||
return (String) params.get(FlexConsts.SQL);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -30,6 +30,7 @@ import java.util.Map;
|
||||
|
||||
public class CPI {
|
||||
|
||||
private CPI() {}
|
||||
|
||||
public static Object[] getValueArray(QueryWrapper queryWrapper) {
|
||||
return queryWrapper.getValueArray();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -30,6 +30,7 @@ import java.util.List;
|
||||
|
||||
class WrapperUtil {
|
||||
|
||||
private WrapperUtil() {}
|
||||
|
||||
static String buildAsAlias(String alias, IDialect dialect) {
|
||||
return StringUtil.isBlank(alias) ? "" : " AS " + dialect.wrap(alias);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -41,6 +41,8 @@ import java.util.function.Supplier;
|
||||
*/
|
||||
public class Db {
|
||||
|
||||
private Db() {}
|
||||
|
||||
private static final Map<String, RowMapperInvoker> INVOKER_MAP = new ConcurrentHashMap<>();
|
||||
static RowMapperInvoker defaultRowMapperInvoker;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,6 +20,8 @@ package com.mybatisflex.core.row;
|
||||
*/
|
||||
public class RowCPI {
|
||||
|
||||
private RowCPI() {}
|
||||
|
||||
public static Object[] obtainModifyValues(Row row) {
|
||||
return row.obtainModifyValues();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -29,6 +29,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class RowUtil {
|
||||
|
||||
private RowUtil() {}
|
||||
|
||||
static final String INDEX_SEPARATOR = "$";
|
||||
|
||||
private static final Map<Class<?>, Map<String, Method>> classSettersCache = new ConcurrentHashMap<>();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -48,6 +48,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
public class TableInfoFactory {
|
||||
|
||||
private TableInfoFactory() {}
|
||||
|
||||
private static final Set<Class<?>> defaultSupportColumnTypes = CollectionUtil.newHashSet(
|
||||
int.class, Integer.class,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -22,6 +22,7 @@ import java.util.Map;
|
||||
|
||||
public class TableManager {
|
||||
|
||||
private TableManager() {}
|
||||
|
||||
private static DynamicTableProcessor dynamicTableProcessor;
|
||||
private static DynamicSchemaProcessor dynamicSchemaProcessor;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -19,6 +19,8 @@ import java.util.function.Supplier;
|
||||
|
||||
public class TenantManager {
|
||||
|
||||
private TenantManager() {}
|
||||
|
||||
private static final ThreadLocal<Boolean> ignoreFlags = new ThreadLocal<>();
|
||||
|
||||
private static TenantFactory tenantFactory;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -18,6 +18,8 @@ package com.mybatisflex.core.transaction;
|
||||
|
||||
public class TransactionContext {
|
||||
|
||||
private TransactionContext() {}
|
||||
|
||||
private static final ThreadLocal<String> XID_HOLDER = new ThreadLocal<>();
|
||||
|
||||
public static String getXID() {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -30,6 +30,8 @@ import java.util.function.Supplier;
|
||||
*/
|
||||
public class TransactionalManager {
|
||||
|
||||
private TransactionalManager() {}
|
||||
|
||||
private static final Log log = LogFactory.getLog(TransactionalManager.class);
|
||||
|
||||
//<xid : <datasource : connection>>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -20,13 +20,15 @@ import java.util.Objects;
|
||||
|
||||
public class ArrayUtil {
|
||||
|
||||
private ArrayUtil() {}
|
||||
|
||||
|
||||
/**
|
||||
* 判断数组是否为空
|
||||
*
|
||||
* @param array
|
||||
* @param <T>
|
||||
* @return 空 true
|
||||
* @param array 数组
|
||||
* @param <T> 数组类型
|
||||
* @return {@code true} 数组为空,{@code false} 数组不为空
|
||||
*/
|
||||
public static <T> boolean isEmpty(T[] array) {
|
||||
return array == null || array.length == 0;
|
||||
@ -36,9 +38,9 @@ public class ArrayUtil {
|
||||
/**
|
||||
* 判断数组是否不为空
|
||||
*
|
||||
* @param array
|
||||
* @param <T>
|
||||
* @return
|
||||
* @param array 数组
|
||||
* @param <T> 数组类型
|
||||
* @return {@code true} 数组不为空,{@code false} 数组为空
|
||||
*/
|
||||
public static <T> boolean isNotEmpty(T[] array) {
|
||||
return !isEmpty(array);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -28,6 +28,8 @@ import java.util.function.Predicate;
|
||||
*/
|
||||
public class ClassUtil {
|
||||
|
||||
private ClassUtil() {}
|
||||
|
||||
//proxy frameworks
|
||||
private static final List<String> PROXY_CLASS_NAMES = Arrays.asList("net.sf.cglib.proxy.Factory"
|
||||
// cglib
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -21,6 +21,8 @@ import java.util.function.Function;
|
||||
|
||||
public class CollectionUtil {
|
||||
|
||||
private CollectionUtil() {}
|
||||
|
||||
|
||||
public static boolean isEmpty(Collection<?> collection) {
|
||||
return collection == null || collection.isEmpty();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -25,6 +25,7 @@ import java.util.Date;
|
||||
|
||||
public class ConvertUtil {
|
||||
|
||||
private ConvertUtil() {}
|
||||
|
||||
public static Object convert(Object value, Class targetClass) {
|
||||
return convert(value, targetClass, false);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -30,6 +30,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class DateUtil {
|
||||
|
||||
private DateUtil() {}
|
||||
|
||||
public static String datePatternWithoutDividing = "yyyyMMdd";
|
||||
public static String datePattern = "yyyy-MM-dd";
|
||||
public static final String dateMinutePattern = "yyyy-MM-dd HH:mm";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -26,6 +26,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class LambdaUtil {
|
||||
|
||||
private LambdaUtil() {}
|
||||
|
||||
private static final Map<Class<?>, SerializedLambda> lambdaMap = new ConcurrentHashMap<>();
|
||||
|
||||
public static <T> String getFieldName(LambdaGetter<T> getter) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -19,6 +19,8 @@ import java.util.Objects;
|
||||
|
||||
public class ObjectUtil {
|
||||
|
||||
private ObjectUtil() {}
|
||||
|
||||
public static <T> T requireNonNullElse(T t1, T t2) {
|
||||
return t1 == null ? t2 : t1;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -21,6 +21,7 @@ import java.util.regex.Matcher;
|
||||
|
||||
public class SqlUtil {
|
||||
|
||||
private SqlUtil() {}
|
||||
|
||||
public static void keepColumnSafely(String column) {
|
||||
if (StringUtil.isBlank(column)) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -22,6 +22,8 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class StringUtil {
|
||||
|
||||
private StringUtil() {}
|
||||
|
||||
|
||||
/**
|
||||
* 第一个字符转换为小写
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -29,6 +29,8 @@ import java.util.List;
|
||||
|
||||
public class UpdateEntity {
|
||||
|
||||
private UpdateEntity() {}
|
||||
|
||||
private static final ReflectorFactory reflectorFactory = new DefaultReflectorFactory();
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user