perf:调整导入流程的泛型
This commit is contained in:
@@ -69,7 +69,7 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
|
|||||||
* @param title 标题
|
* @param title 标题
|
||||||
* @param list 要导入的数据
|
* @param list 要导入的数据
|
||||||
*/
|
*/
|
||||||
public <T> CoreLogProcess addProcess(String title, List<T> list, ProcessImportConsumer consumer) {
|
public <T> CoreLogProcess addProcess(String title, List<T> list, ProcessImportConsumer<T> consumer) {
|
||||||
if (CollUtil.isEmpty(list)) {
|
if (CollUtil.isEmpty(list)) {
|
||||||
throw new ApiException("文件中不存在数据");
|
throw new ApiException("文件中不存在数据");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.tiesheng.core.util;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ProcessImportConsumer {
|
public interface ProcessImportConsumer<T> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,7 +12,7 @@ public interface ProcessImportConsumer {
|
|||||||
* @param <T>
|
* @param <T>
|
||||||
* @return 返回成功的数量
|
* @return 返回成功的数量
|
||||||
*/
|
*/
|
||||||
<T> int accept(List<T> list);
|
int accept(List<T> list);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user