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
811bd86b
Commit
811bd86b
authored
Jun 10, 2019
by
wuwz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
旅游路线
parent
cea189b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+5
-2
TourGoodController.java
.../java/com/xxfc/platform/tour/rest/TourGoodController.java
+6
-4
No files found.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
811bd86b
...
...
@@ -2,6 +2,9 @@ package com.xxfc.platform.tour.biz;
import
com.github.pagehelper.PageHelper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.constant.RestCode
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.tour.mapper.TourGoodMapper
;
...
...
@@ -37,9 +40,9 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
* @param distance
* @return
*/
public
PageDataVO
<
TourGood
>
getGoodList
(
int
page
,
int
limit
,
String
query
,
Double
latitude
,
Double
longitude
,
Integer
tagId
,
Double
distance
){
public
ObjectRestResponse
<
TourGood
>
getGoodList
(
int
page
,
int
limit
,
String
query
,
Double
latitude
,
Double
longitude
,
Integer
tagId
,
Double
distance
){
Map
<
String
,
Object
>
params
=
initParam
(
page
,
limit
,
query
,
latitude
,
longitude
,
tagId
,
distance
);
return
PageDataVO
.
pageInfo
(
page
,
limit
,
()
->
mapper
.
getGoodList
(
params
));
return
new
ObjectRestResponse
().
status
(
RestCode
.
SUCCESS
.
getStatus
()).
msg
(
RestCode
.
SUCCESS
.
getMsg
()).
data
(
PageDataVO
.
pageInfo
(
page
,
limit
,
()
->
mapper
.
getGoodList
(
params
)
));
}
private
Map
<
String
,
Object
>
initParam
(
int
page
,
int
limit
,
String
query
,
Double
latitude
,
Double
longitude
,
Integer
tagId
,
Double
distance
)
{
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodController.java
View file @
811bd86b
...
...
@@ -3,10 +3,12 @@ package com.xxfc.platform.tour.rest;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.tour.biz.TourGoodBiz
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -31,10 +33,10 @@ public class TourGoodController extends BaseController<TourGoodBiz, TourGood> {
@RequestMapping
(
value
=
"/app/unauth/getGoodList"
,
method
=
RequestMethod
.
GET
)
@IgnoreClientToken
@ResponseBody
public
PageDataVO
<
TourGood
>
getGoodList
(
@RequestParam
(
value
=
"page"
,
required
=
true
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
required
=
true
)
Integer
limit
,
@RequestParam
(
value
=
"query"
,
required
=
false
)
String
query
,
@RequestParam
(
value
=
"latitude"
,
required
=
false
)
Double
latitude
,
@RequestParam
(
value
=
"longitude"
,
required
=
false
)
Double
longitude
,
@RequestParam
(
value
=
"tagId"
,
required
=
false
)
Integer
tagId
,
@RequestParam
(
value
=
"distance"
,
defaultValue
=
"10.00"
)
Double
distance
)
{
public
ObjectRestResponse
<
TourGood
>
getGoodList
(
@RequestParam
(
value
=
"page"
,
required
=
true
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
required
=
true
)
Integer
limit
,
@RequestParam
(
value
=
"query"
,
required
=
false
)
String
query
,
@RequestParam
(
value
=
"latitude"
,
required
=
false
)
Double
latitude
,
@RequestParam
(
value
=
"longitude"
,
required
=
false
)
Double
longitude
,
@RequestParam
(
value
=
"tagId"
,
required
=
false
)
Integer
tagId
,
@RequestParam
(
value
=
"distance"
,
defaultValue
=
"10.00"
)
Double
distance
)
{
return
baseBiz
.
getGoodList
(
page
,
limit
,
query
,
latitude
,
longitude
,
tagId
,
distance
);
}
}
\ No newline at end of file
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