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
fd24fcb6
Commit
fd24fcb6
authored
Jun 26, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
dbb8d298
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
6 deletions
+57
-6
pom.xml
xx-app/xx-app-api/pom.xml
+5
-0
AppHomeController.java
...in/java/com/xxfc/platform/app/rest/AppHomeController.java
+6
-2
TourFeign.java
...src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
+7
-0
TourGoodBiz.java
...src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
+11
-0
TourGoodMapper.java
...in/java/com/xxfc/platform/tour/mapper/TourGoodMapper.java
+9
-0
TourGoodController.java
.../java/com/xxfc/platform/tour/rest/TourGoodController.java
+6
-4
TourGoodMapper.xml
...-tour-server/src/main/resources/mapper/TourGoodMapper.xml
+13
-0
No files found.
xx-app/xx-app-api/pom.xml
View file @
fd24fcb6
...
...
@@ -17,6 +17,11 @@
<artifactId>
xx-campsite-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.xxfc.platform
</groupId>
<artifactId>
xx-tour-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/AppHomeController.java
View file @
fd24fcb6
...
...
@@ -10,6 +10,7 @@ import com.github.wxiaoqi.security.common.vo.GoodDataVO;
import
com.xxfc.platform.app.biz.CofigBiz
;
import
com.xxfc.platform.app.entity.Cofig
;
import
com.xxfc.platform.campsite.feign.CampsiteFeign
;
import
com.xxfc.platform.tour.feign.TourFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -31,6 +32,9 @@ public class AppHomeController extends BaseController<CofigBiz,Cofig> {
@Autowired
CampsiteFeign
campsiteFeign
;
@Autowired
TourFeign
tourFeign
;
@RequestMapping
(
value
=
"/app/unauth/goodList"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
<
List
<
GoodDataVO
>>
goodList
(
...
...
@@ -40,9 +44,9 @@ public class AppHomeController extends BaseController<CofigBiz,Cofig> {
){
List
<
GoodDataVO
>
list
=
new
ArrayList
<>();
if
(
type
==
2
){
list
=
campsite
Feign
.
goodList
(
page
,
limit
);
list
=
tour
Feign
.
goodList
(
page
,
limit
);
}
else
if
(
type
==
3
){
list
=
campsiteFeign
.
goodList
(
page
,
limit
);
}
return
new
ObjectRestResponse
<>().
rel
(
true
).
data
(
list
);
}
...
...
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
View file @
fd24fcb6
...
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.tour.feign;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.tour.dto.TourSpePriceDTO
;
import
com.xxfc.platform.tour.entity.TourGood
;
...
...
@@ -10,6 +11,7 @@ import com.xxfc.platform.tour.entity.TourUser;
import
com.xxfc.platform.tour.vo.TourGoodOrderFindVo
;
import
com.xxfc.platform.tour.vo.TourGoodOrderVo
;
import
com.xxfc.platform.tour.vo.TourSpePriceVo
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -83,4 +85,9 @@ public interface TourFeign {
*/
@GetMapping
(
"/tourGood/verfication/orders"
)
PageDataVO
<
TourGoodOrderVo
>
findTourGoodOrders
(
@RequestParam
Map
<
String
,
Object
>
tourGoodOrderFindVo
);
@ApiOperation
(
"首页旅游列表"
)
@GetMapping
(
value
=
"/tourGood/app/shopList"
)
public
List
<
GoodDataVO
>
goodList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"4"
)
Integer
limit
);
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodBiz.java
View file @
fd24fcb6
...
...
@@ -10,6 +10,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
com.github.wxiaoqi.security.common.constant.RestCode
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.tour.dto.*
;
import
com.xxfc.platform.tour.entity.*
;
...
...
@@ -310,6 +311,16 @@ public class TourGoodBiz extends BaseBiz<TourGoodMapper, TourGood> {
}
}
/**
* 首页旅游列表
* @param page
* @param limit
* @return
*/
public
List
<
GoodDataVO
>
getAllByHome
(
Integer
page
,
Integer
limit
){
return
mapper
.
findAllByHome
((
page
-
1
)*
limit
,
limit
);
};
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourGoodMapper.java
View file @
fd24fcb6
package
com
.
xxfc
.
platform
.
tour
.
mapper
;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
com.xxfc.platform.tour.dto.GoodSearchDTO
;
import
com.xxfc.platform.tour.entity.TourGood
;
import
com.xxfc.platform.tour.vo.TourGoodVo
;
...
...
@@ -25,4 +26,12 @@ public interface TourGoodMapper extends Mapper<TourGood> {
//获取商品列表
public
List
<
TourGoodVo
>
findGoodList
(
@Param
(
"params"
)
GoodSearchDTO
tourGoodDTO
);
/**
* 首页旅游列表
* @param start
* @param size
* @return
*/
List
<
GoodDataVO
>
findAllByHome
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"size"
)
Integer
size
);
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodController.java
View file @
fd24fcb6
...
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.tour.rest;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.vo.GoodDataVO
;
import
com.xxfc.platform.tour.biz.TourGoodBiz
;
import
com.xxfc.platform.tour.dto.GoodSearchDTO
;
import
com.xxfc.platform.tour.entity.TourGood
;
...
...
@@ -44,10 +45,11 @@ public class TourGoodController extends BaseController<TourGoodBiz, TourGood> {
return
ObjectRestResponse
.
succ
(
baseBiz
.
getOne
(
id
));
}
@ApiOperation
(
"首页查询旅游路线列表"
)
@RequestMapping
(
value
=
"/app/goodList"
,
method
=
RequestMethod
.
POST
)
public
List
<
TourGoodVo
>
goodList
(
@RequestBody
GoodSearchDTO
dto
)
{
return
baseBiz
.
getAll
(
dto
).
getData
();
@ApiOperation
(
"首页旅游列表"
)
@GetMapping
(
value
=
"/app/shopList"
)
public
List
<
GoodDataVO
>
goodList
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"4"
)
Integer
limit
)
{
return
baseBiz
.
getAllByHome
(
page
,
limit
);
}
...
...
xx-tour/xx-tour-server/src/main/resources/mapper/TourGoodMapper.xml
View file @
fd24fcb6
...
...
@@ -77,6 +77,19 @@
</select>
<!--首页查询全部-->
<select
id=
"findAllByHome"
resultType=
"com.github.wxiaoqi.security.common.vo.GoodDataVO"
>
SELECT g.id as `id`,g.name as `name`,g.cover as `imgUrl`,g.price,
REPLACE(GROUP_CONCAT( DISTINCT t.`name`),',','|')as name1
from tour_good g
LEFT JOIN tour_good_tag tag ON g.id=tag.good_id
LEFT JOIN tour_tag t ON tag.tag_id=t.id
where g.recommend=1
GROUP BY g.id
ORDER BY g.rank DESC ,g.id DESC
limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER}
</select>
<select
id=
"getOne"
resultMap=
"tourGoodMap"
>
SELECT * FROM tour_good WHERE id =#{id} and is_del=0
</select>
...
...
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