Commit da92fb78 authored by Quxl's avatar Quxl

x

parent 663913ca
......@@ -11,9 +11,9 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.FileUtil;
import com.egolm.common.bean.Rjx;
......@@ -24,7 +24,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Api(tags={"搜索引擎更新工具"})
@Controller
@RestController
@RequestMapping("util/search/goods")
public class GoodsCollectTask extends AbstractSolrApi{
......@@ -54,6 +54,8 @@ public class GoodsCollectTask extends AbstractSolrApi{
private String deleteIndexQuerySql;
@PostConstruct
@ApiOperation("更新查询语句")
@PostMapping("updateQuerySql")
public void init() {
createIndexQuerySql = FileUtil.fileToString(createIndexQueryFilePath);
updateIndexQuerySql = FileUtil.fileToString(deleteIndexQueryFilePath);
......@@ -61,8 +63,8 @@ public class GoodsCollectTask extends AbstractSolrApi{
}
@ApiOperation("更新全量索引")
@PostMapping("createFullIndex")
public String createFullIndex() {
@PostMapping("updateFullIndex")
public String updateFullIndex() {
this.createIndex();
return Rjx.jsonOk().toJson();
}
......@@ -75,8 +77,8 @@ public class GoodsCollectTask extends AbstractSolrApi{
}
@ApiOperation("更新最新索引")
@PostMapping("updateIndex")
public String updateIndex() {
@PostMapping("updateLastedIndex")
public String updateLastedIndex() {
this.minuteExecute();
return Rjx.jsonOk().toJson();
}
......
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