...
|
...
|
@@ -3,6 +3,8 @@ package com.yoho.search.service.servicenew.scene.common; |
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
|
import com.yoho.search.service.utils.SearchRequestParams;
|
...
|
...
|
@@ -10,6 +12,18 @@ import com.yoho.search.service.vo.SearchApiResult; |
|
|
|
|
|
public abstract class AbstractSceneService {
|
|
|
|
|
|
protected ExecutorService executorService;
|
|
|
|
|
|
@PostConstruct
|
|
|
void init() {
|
|
|
this.setExecutorService();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 子类实现自己的异步执行的线程池
|
|
|
*/
|
|
|
public abstract void setExecutorService();
|
|
|
|
|
|
/**
|
|
|
* 场景化的默认参数
|
|
|
*
|
...
|
...
|
@@ -31,10 +45,6 @@ public abstract class AbstractSceneService { |
|
|
return page;
|
|
|
}
|
|
|
|
|
|
protected ExecutorService executorService;
|
|
|
|
|
|
public abstract void setExecutorService();
|
|
|
|
|
|
public abstract void addParamsToParamMap(Map<String, String> paramMap);
|
|
|
|
|
|
public abstract String pageId();
|
...
|
...
|
|