Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
6a0b2312
Commit
6a0b2312
authored
Sep 18, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
综合搜索业务
parent
6771567b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
8 deletions
+46
-8
SearchController.java
...in/java/com/xxfc/platform/uccn/rest/SearchController.java
+46
-8
No files found.
xx-uccn/xx-uccn-server/src/main/java/com/xxfc/platform/uccn/rest/SearchController.java
View file @
6a0b2312
...
@@ -2,14 +2,14 @@ package com.xxfc.platform.uccn.rest;
...
@@ -2,14 +2,14 @@ package com.xxfc.platform.uccn.rest;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.uccn.biz.SearchBiz
;
import
com.xxfc.platform.uccn.biz.SearchBiz
;
import
com.xxfc.platform.uccn.comstnt.ServiceConstant
;
import
com.xxfc.platform.uccn.vo.SearchResultVo
;
import
com.xxfc.platform.uccn.vo.SearchResultVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleModelQueryCondition
;
import
com.xxfc.platform.vehicle.pojo.dto.BranchCompanyFindDTO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
* @author libin
* @author libin
...
@@ -23,11 +23,49 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -23,11 +23,49 @@ import org.springframework.web.bind.annotation.RestController;
@Api
(
tags
=
"官网*综合搜索"
)
@Api
(
tags
=
"官网*综合搜索"
)
public
class
SearchController
{
public
class
SearchController
{
private
final
SearchBiz
searchBiz
;
private
final
SearchBiz
searchBiz
;
private
final
VehicleModelController
vehicleModelController
;
private
final
GwTourController
gwTourController
;
private
final
CampsiteUccnController
campsiteUccnController
;
private
final
ArticleController
articleController
;
private
final
SummitActivityController
summitActivityController
;
private
final
BranchCompanyController
branchCompanyController
;
@GetMapping
@GetMapping
public
ObjectRestResponse
<
SearchResultVo
>
search
(
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyWord
){
public
ObjectRestResponse
search
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
SearchResultVo
searchResultVo
=
searchBiz
.
searchWithKeyWords
(
keyWord
);
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyWord
,
return
ObjectRestResponse
.
succ
(
searchResultVo
);
@RequestParam
(
value
=
"page"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
required
=
false
,
defaultValue
=
"10"
)
Integer
limit
)
{
switch
(
type
)
{
case
ServiceConstant
.
VEHICLE
:
VehicleModelQueryCondition
vehicleModelQueryCondition
=
new
VehicleModelQueryCondition
();
vehicleModelQueryCondition
.
setPage
(
page
);
vehicleModelQueryCondition
.
setLimit
(
limit
);
vehicleModelQueryCondition
.
setVehicleName
(
keyWord
);
return
vehicleModelController
.
findVehicleModelPageUnauthfind
(
vehicleModelQueryCondition
);
case
ServiceConstant
.
BRANCH_COMPANY
:
BranchCompanyFindDTO
branchCompanyFindDTO
=
new
BranchCompanyFindDTO
();
branchCompanyFindDTO
.
setPage
(
page
);
branchCompanyFindDTO
.
setLimit
(
limit
);
branchCompanyFindDTO
.
setName
(
keyWord
);
return
branchCompanyController
.
listBranchCompanyWithPage
(
branchCompanyFindDTO
);
case
ServiceConstant
.
TROUR
:
return
gwTourController
.
getGoodList
(
page
,
limit
,
null
,
keyWord
);
case
ServiceConstant
.
CAMPSITE
:
return
campsiteUccnController
.
findCampsiteShopPageByType
(
null
,
page
,
limit
,
keyWord
);
case
ServiceConstant
.
NEWS
:
return
articleController
.
getArticleList
(
page
,
limit
,
null
,
keyWord
);
case
ServiceConstant
.
ACTIVITY
:
return
summitActivityController
.
findSummitActivityWithPage
(
page
,
limit
,
null
,
keyWord
);
default
:
SearchResultVo
searchResultVo
=
searchBiz
.
searchWithKeyWords
(
keyWord
);
return
ObjectRestResponse
.
succ
(
searchResultVo
);
}
}
}
}
}
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