Commit 2409924d by liuyu

2023年04月26 pair实例化bug

parent c583acc4
...@@ -16,13 +16,12 @@ import com.zhiwei.middleware.automatic.son.util.CosineSimilarity; ...@@ -16,13 +16,12 @@ import com.zhiwei.middleware.automatic.son.util.CosineSimilarity;
import com.zhiwei.middleware.automatic.son.util.MarkInfoUtil; import com.zhiwei.middleware.automatic.son.util.MarkInfoUtil;
import com.zhiwei.middleware.automatic.son.util.RedissonUtil; import com.zhiwei.middleware.automatic.son.util.RedissonUtil;
import com.zhiwei.middleware.automatic.son.util.Tools; import com.zhiwei.middleware.automatic.son.util.Tools;
import javafx.util.Pair;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.apache.commons.lang3.tuple.Pair;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -51,8 +50,8 @@ public class TaskServiceCommon implements TaskService { ...@@ -51,8 +50,8 @@ public class TaskServiceCommon implements TaskService {
this.templateTitleService = templateTitleService; this.templateTitleService = templateTitleService;
this.dubboHandler = dubboHandler; this.dubboHandler = dubboHandler;
this.autoMarkExecutor = autoMarkExecutor; this.autoMarkExecutor = autoMarkExecutor;
TYPE_MAP.put(TaskType.COMMON_TWO.getType(), new Pair<>(TaskType.COMMON_TWO, this::getMultiAutoInfo)); TYPE_MAP.put(TaskType.COMMON_TWO.getType(), Pair.of(TaskType.COMMON_TWO, this::getMultiAutoInfo));
TYPE_MAP.put(TaskType.COMMON_ONE.getType(), new Pair<>(TaskType.COMMON_ONE, this::getOneAutoInfo)); TYPE_MAP.put(TaskType.COMMON_ONE.getType(), Pair.of(TaskType.COMMON_ONE, this::getOneAutoInfo));
} }
@Override @Override
......
...@@ -15,7 +15,7 @@ import com.zhiwei.middleware.automatic.son.util.CosineSimilarity; ...@@ -15,7 +15,7 @@ import com.zhiwei.middleware.automatic.son.util.CosineSimilarity;
import com.zhiwei.middleware.automatic.son.util.Tools; import com.zhiwei.middleware.automatic.son.util.Tools;
import com.zhiwei.nlp.AggreeBootStarter; import com.zhiwei.nlp.AggreeBootStarter;
import com.zhiwei.nlp.vo.KResult; import com.zhiwei.nlp.vo.KResult;
import javafx.util.Pair; import org.apache.commons.lang3.tuple.Pair;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
...@@ -57,9 +57,9 @@ public class TaskServiceTemplate implements TaskService { ...@@ -57,9 +57,9 @@ public class TaskServiceTemplate implements TaskService {
this.esDao = esDao; this.esDao = esDao;
this.esIndexes = esIndexes; this.esIndexes = esIndexes;
this.executor = executor; this.executor = executor;
TYPE_MAP.put(TaskType.TEMPLATE.getType(), new Pair<>(TaskType.TEMPLATE, this::runTask)); TYPE_MAP.put(TaskType.TEMPLATE.getType(), Pair.of(TaskType.TEMPLATE, this::runTask));
TYPE_MAP.put(TaskType.TEMPLATE_MODIFY.getType(), new Pair<>(TaskType.TEMPLATE_MODIFY, this::templateModify)); TYPE_MAP.put(TaskType.TEMPLATE_MODIFY.getType(), Pair.of(TaskType.TEMPLATE_MODIFY, this::templateModify));
TYPE_MAP.put(TaskType.TEMPLATE_RESET.getType(), new Pair<>(TaskType.TEMPLATE_RESET, this::templateReset)); TYPE_MAP.put(TaskType.TEMPLATE_RESET.getType(), Pair.of(TaskType.TEMPLATE_RESET, this::templateReset));
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment