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
05c041c2
Commit
05c041c2
authored
Jun 08, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
4a997db7
a8d88dfc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
18 deletions
+45
-18
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+24
-10
TourGoodMapper.java
...in/java/com/xxfc/platform/tour/mapper/TourGoodMapper.java
+1
-0
TourGoodController.java
.../java/com/xxfc/platform/tour/rest/TourGoodController.java
+19
-8
TourGoodMapper.xml
...-tour-server/src/main/resources/mapper/TourGoodMapper.xml
+1
-0
No files found.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
05c041c2
...
...
@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -20,19 +21,32 @@ import java.util.Map;
*/
@Service
@Slf4j
public
class
TourGoodBiz
extends
BaseBiz
<
TourGoodMapper
,
TourGood
>
{
public
class
TourGoodBiz
extends
BaseBiz
<
TourGoodMapper
,
TourGood
>
{
@Autowired
private
TourGoodMapper
tourGoodMapper
;
public
PageDataVO
<
TourGood
>
getGoodList
(
int
page
,
int
limit
,
String
query
,
Double
latitude
,
Double
longitude
,
Integer
tagId
,
Double
distance
){
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"query"
,
query
);
params
.
put
(
"latitude"
,
latitude
);
params
.
put
(
"longitude"
,
longitude
);
params
.
put
(
"tagId"
,
tagId
);
params
.
put
(
"distance"
,
distance
);
// List<TourGood> list = tourGoodMapper.getGoodList(params);
return
PageDataVO
.
pageInfo
(
page
,
limit
,
mapper
.
getGoodList
(
params
));
/**
* 查询旅游路线列表
*
* @param page
* @param limit
* @param query
* @param latitude
* @param longitude
* @param tagId
* @param distance
* @return
*/
public
PageDataVO
<
TourGood
>
getGoodList
(
int
page
,
int
limit
,
String
query
,
Double
latitude
,
Double
longitude
,
Integer
tagId
,
Double
distance
)
{
//查询参数
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"query"
,
query
);
params
.
put
(
"latitude"
,
latitude
);
params
.
put
(
"longitude"
,
longitude
);
params
.
put
(
"tagId"
,
tagId
);
params
.
put
(
"distance"
,
distance
);
// List<TourGood> list = tourGoodMapper.getGoodList(params);
return
PageDataVO
.
pageInfo
(
page
,
limit
,
mapper
.
getGoodList
(
params
));
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourGoodMapper.java
View file @
05c041c2
...
...
@@ -18,5 +18,6 @@ public interface TourGoodMapper extends Mapper<TourGood> {
//获取商品信息
public
TourGood
getOne
(
@Param
(
"id"
)
Integer
id
);
//查询旅游路线列表
public
List
<
TourGood
>
getGoodList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
map
);
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodController.java
View file @
05c041c2
...
...
@@ -13,17 +13,28 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping
(
"tourGood"
)
public
class
TourGoodController
extends
BaseController
<
TourGoodBiz
,
TourGood
>
{
public
class
TourGoodController
extends
BaseController
<
TourGoodBiz
,
TourGood
>
{
@ApiOperation
(
"订单详情"
)
@RequestMapping
(
value
=
"/app/unauth/getGoodList"
,
method
=
RequestMethod
.
GET
)
//@GetMapping(value = "/app/unauth/getGoodList")
/**
* 查询旅游路线列表
*
* @param page
* @param limit
* @param query
* @param latitude
* @param longitude
* @param tagId
* @param distance
* @return
*/
@ApiOperation
(
"查询旅游路线列表"
)
@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"
)
String
query
,
@RequestParam
(
value
=
"latitude"
,
required
=
false
)
Double
latitude
,
@RequestParam
(
value
=
"longitude"
,
required
=
false
)
Double
long
itude
,
@RequestParam
(
value
=
"
tagId"
,
required
=
false
)
Integer
tagId
,
@RequestParam
(
value
=
"distance"
,
defaultValue
=
"10.00"
)
Double
distance
){
//BaseResponse baseResponse = new BaseResponse();
public
PageDataVO
<
TourGood
>
getGoodList
(
@RequestParam
(
value
=
"page"
,
required
=
true
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
required
=
true
)
Integer
limit
,
@RequestParam
(
value
=
"query"
)
String
query
,
@RequestParam
(
value
=
"latitude"
,
required
=
false
)
Double
lat
itude
,
@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
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodMapper.xml
View file @
05c041c2
...
...
@@ -25,6 +25,7 @@
<result
property=
"unit"
column=
"unit"
/>
</resultMap>
<!--查询旅游路线列表-->
<select
id=
"getGoodList"
parameterType=
"java.util.Map"
resultMap=
"tourGoodMap"
>
SELECT * from tour_good t
where 1=1
...
...
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