Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
shop
Commits
da92fb78
Commit
da92fb78
authored
Sep 18, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
663913ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
GoodsCollectTask.java
...java/com/egolm/shop/schedules/goods/GoodsCollectTask.java
+8
-6
No files found.
src/main/java/com/egolm/shop/schedules/goods/GoodsCollectTask.java
View file @
da92fb78
...
@@ -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
@
Rest
Controller
@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
(
"
cre
ateFullIndex"
)
@PostMapping
(
"
upd
ateFullIndex"
)
public
String
cre
ateFullIndex
()
{
public
String
upd
ateFullIndex
()
{
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
(
"update
Lasted
Index"
)
public
String
updateIndex
()
{
public
String
update
Lasted
Index
()
{
this
.
minuteExecute
();
this
.
minuteExecute
();
return
Rjx
.
jsonOk
().
toJson
();
return
Rjx
.
jsonOk
().
toJson
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment