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
90d5f431
Commit
90d5f431
authored
Oct 13, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索引擎优化
parent
6d2166d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
SolrGoodsController.java
...n/java/com/egolm/shop/controller/SolrGoodsController.java
+13
-1
SystemCtrlController.java
.../java/com/egolm/shop/controller/SystemCtrlController.java
+0
-1
No files found.
src/main/java/com/egolm/shop/controller/SolrGoodsController.java
View file @
90d5f431
...
...
@@ -10,6 +10,7 @@ import com.egolm.common.jdbc.Page;
import
com.egolm.shop.service.SolrGoodsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -25,8 +26,16 @@ public class SolrGoodsController {
@RequestMapping
(
"query"
)
@ApiOperation
(
"搜索引擎商品搜索"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
dataType
=
"long"
,
allowMultiple
=
false
,
name
=
"index"
,
value
=
"分页编号"
),
@ApiImplicitParam
(
dataType
=
"long"
,
allowMultiple
=
false
,
name
=
"size"
,
value
=
"分页大小"
),
@ApiImplicitParam
(
dataType
=
"string"
,
allowMultiple
=
false
,
name
=
"queryKey"
,
value
=
"搜索关键字"
),
@ApiImplicitParam
(
dataType
=
"string"
,
allowMultiple
=
true
,
name
=
"orders"
,
value
=
"排序关键字"
),
@ApiImplicitParam
(
dataType
=
"string"
,
allowMultiple
=
true
,
name
=
"keywords"
,
value
=
"精确搜索条件"
),
@ApiImplicitParam
(
dataType
=
"string"
,
allowMultiple
=
true
,
name
=
"facetFields"
,
value
=
"单字段分组字段"
),
@ApiImplicitParam
(
dataType
=
"string"
,
allowMultiple
=
true
,
name
=
"facetPivotFields"
,
value
=
"多字段分组字段"
),
})
public
Object
query
(
Page
page
,
String
queryKey
,
String
[]
keywords
,
String
[]
facetFields
,
String
[]
facetPivotFields
)
{
public
Object
query
(
Long
index
,
Long
size
,
String
queryKey
,
String
[]
orders
,
String
[]
keywords
,
String
[]
facetFields
,
String
[]
facetPivotFields
)
{
Page
page
=
new
Page
(
index
,
size
,
orders
);
return
service
.
query
(
page
,
queryKey
,
keywords
,
facetFields
,
facetPivotFields
);
}
...
...
@@ -41,6 +50,9 @@ public class SolrGoodsController {
@ResponseBody
@RequestMapping
(
"updateByDistrictID"
)
@ApiOperation
(
"搜索引擎按区域编号更新商品索引"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
dataType
=
"string"
,
name
=
"sDistrictID"
,
value
=
"区域编号"
),
})
public
Object
updateByDistrictID
(
String
sDistrictID
)
{
service
.
update
(
sDistrictID
);
return
Rjx
.
jsonOk
();
...
...
src/main/java/com/egolm/shop/controller/SystemCtrlController.java
View file @
90d5f431
package
com
.
egolm
.
shop
.
controller
;
import
java.util.HashMap
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
...
...
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