Commit da92fb78 authored by Quxl's avatar Quxl

x

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