---添加主数据启动子项目
This commit is contained in:
@ -71,6 +71,8 @@ public class DataLogTools {
|
||||
|
||||
private static Map<Class<?>,LogTableInfo> annotations = Maps.newHashMap();
|
||||
|
||||
private static Map<String,Class<?>> entitys = Maps.newHashMap();
|
||||
|
||||
private static Set<String> logTables = null;
|
||||
|
||||
private static Object lock = new Object();
|
||||
@ -720,17 +722,26 @@ public class DataLogTools {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: TODO(这里用一句话描述这个方法的作用)
|
||||
* @param clazz
|
||||
* @param dataId
|
||||
* @return List<DataChangeLog> 返回类型
|
||||
*/
|
||||
public static <T>List<DataChangeLog> findLogsByEntityId(Class<?> clazz,@NonNull Long dataId) {
|
||||
LogTableInfo tabInfo = getAnnotation(clazz);
|
||||
String tableName = parseLogTableName(tabInfo);
|
||||
return findLogsByEntityId(tableName, dataId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 根据数据id获取操作日志
|
||||
* @param klass 数据java类型
|
||||
* @param tableName 表名
|
||||
* @param dataId 数据id
|
||||
* @return List<DataChangeLog> 返回类型
|
||||
*/
|
||||
public static <T>List<DataChangeLog> findLogsByEntityId(Class<T> klass,@NonNull Long dataId) {
|
||||
LogTableInfo tabInfo = getAnnotation(klass);
|
||||
String tableName = parseLogTableName(tabInfo);
|
||||
public static <T>List<DataChangeLog> findLogsByEntityId(String tableName,@NonNull Long dataId) {
|
||||
if(initTable(tableName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user