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
76cd062d
Commit
76cd062d
authored
Jun 10, 2019
by
youjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
2550938d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
28 deletions
+39
-28
TourBaseController.java
...ava/com/xxfc/platform/tour/common/TourBaseController.java
+8
-9
TourGoodSpeController.java
...va/com/xxfc/platform/tour/rest/TourGoodSpeController.java
+14
-14
TourTagController.java
...n/java/com/xxfc/platform/tour/rest/TourTagController.java
+16
-4
bootstrap.yml
xx-tour/xx-tour-server/src/main/resources/bootstrap.yml
+1
-1
No files found.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/common/TourBaseController.java
View file @
76cd062d
...
...
@@ -10,17 +10,16 @@ import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
public
class
TourBaseController
<
Biz
extends
BaseBiz
>
extends
CommonBaseController
{
@Autowired
protected
Biz
baseBiz
;
@Autowired
protected
UserFeign
userFeign
;
@Autowired
protected
UserAuthConfig
userAuthConfig
;
public
AppUserDTO
getUserInfo
(){
return
userFeign
.
userDetailByToken
(
userAuthConfig
.
getToken
(
request
)).
getData
();
}
// @Autowired
// protected UserFeign userFeign;
// @Autowired
// protected UserAuthConfig userAuthConfig;
//
// public AppUserDTO getUserInfo(){
// return userFeign.userDetailByToken(userAuthConfig.getToken(request)).getData();
// }
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodSpeController.java
View file @
76cd062d
...
...
@@ -14,19 +14,19 @@ import org.springframework.web.bind.annotation.*;
public
class
TourGoodSpeController
extends
TourBaseController
<
TourGoodSpeBiz
>
{
//获取价格
@RequestMapping
(
value
=
"/user/prices"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
TourSpePriceVo
>
prices
(
@RequestBody
TourSpePriceDTO
priceDto
)
{
return
baseBiz
.
getPricesByuserid
(
priceDto
);
}
//减库存
@RequestMapping
(
value
=
"/stock"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
TourSpePriceVo
>
stock
(
@RequestParam
(
value
=
"speId"
,
defaultValue
=
"0"
)
Integer
speId
,
@RequestParam
(
value
=
"number"
,
defaultValue
=
"0"
)
Integer
number
){
return
baseBiz
.
cutStock
(
speId
,
number
);
}
//
//
//获取价格
//
@RequestMapping(value = "/user/prices", method = RequestMethod.POST)
//
public ObjectRestResponse<TourSpePriceVo> prices(@RequestBody TourSpePriceDTO priceDto) {
//
return baseBiz.getPricesByuserid(priceDto);
//
}
//
//
//减库存
//
@RequestMapping(value = "/stock", method = RequestMethod.GET)
//
public ObjectRestResponse<TourSpePriceVo> stock(
//
@RequestParam(value = "speId",defaultValue = "0")Integer speId,
//
@RequestParam(value = "number",defaultValue = "0") Integer number){
//
return baseBiz.cutStock(speId,number);
//
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourTagController.java
View file @
76cd062d
package
com
.
xxfc
.
platform
.
tour
.
rest
;
import
cn.hutool.core.bean.BeanUtil
;
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.github.wxiaoqi.security.common.vo.PageParam
;
import
com.xxfc.platform.tour.biz.TourTagBiz
;
import
com.xxfc.platform.tour.entity.TourBanner
;
import
com.xxfc.platform.tour.entity.TourTag
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
org.beetl.core.om.ArrayAA
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -22,13 +27,13 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
private
TourTagBiz
tagBiz
;
@GetMapping
(
"/app/unauth/getTagList"
)
public
ListRestResponse
getTagList
(
@RequestBody
Map
<
Object
,
Integer
>
map
){
public
ListRestResponse
getTagList
(
pageDTO
dto
){
if
(
map
==
null
||
map
.
keySet
().
size
()==
0
)
{
if
(
dto
==
null
)
{
new
ListRestResponse
<>().
result
(
"错误"
);
}
Integer
hot
=
map
.
get
(
"hot"
);
Integer
hot
=
dto
.
getHot
(
);
...
...
@@ -38,7 +43,7 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
}
PageDataVO
<
TourTag
>
all
=
tagBiz
.
findAll
(
map
);
PageDataVO
<
TourTag
>
all
=
tagBiz
.
findAll
(
BeanUtil
.
beanToMap
(
dto
)
);
return
new
ListRestResponse
().
result
(
all
).
count
(
all
.
getData
().
size
());
...
...
@@ -64,5 +69,12 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
}
@Data
public
class
pageDTO
extends
PageParam
{
@ApiModelProperty
(
"是否热门"
)
Integer
hot
;
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/resources/bootstrap.yml
View file @
76cd062d
...
...
@@ -23,7 +23,7 @@ spring:
cloud
:
nacos
:
config
:
server-addr
:
1
27.0.0.1
:8848
server-addr
:
1
0.1.37.192
:8848
---
spring
:
...
...
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