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
e7ec6f1a
Commit
e7ec6f1a
authored
Jun 10, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
76cd062d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
31 deletions
+28
-31
TourBaseController.java
...ava/com/xxfc/platform/tour/common/TourBaseController.java
+10
-9
TourGoodSpeController.java
...va/com/xxfc/platform/tour/rest/TourGoodSpeController.java
+14
-14
TourUserController.java
.../java/com/xxfc/platform/tour/rest/TourUserController.java
+4
-8
No files found.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/common/TourBaseController.java
View file @
e7ec6f1a
...
@@ -11,15 +11,16 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -11,15 +11,16 @@ import org.springframework.beans.factory.annotation.Autowired;
@Slf4j
@Slf4j
public
class
TourBaseController
<
Biz
extends
BaseBiz
>
extends
CommonBaseController
{
public
class
TourBaseController
<
Biz
extends
BaseBiz
>
extends
CommonBaseController
{
@Autowired
protected
Biz
baseBiz
;
@Autowired
protected
UserFeign
userFeign
;
@Autowired
protected
UserAuthConfig
userAuthConfig
;
// @Autowired
public
AppUserDTO
getUserInfo
(){
// protected UserFeign userFeign;
return
userFeign
.
userDetailByToken
(
userAuthConfig
.
getToken
(
request
)).
getData
();
// @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 @
e7ec6f1a
...
@@ -14,19 +14,19 @@ import org.springframework.web.bind.annotation.*;
...
@@ -14,19 +14,19 @@ import org.springframework.web.bind.annotation.*;
public
class
TourGoodSpeController
extends
TourBaseController
<
TourGoodSpeBiz
>
{
public
class
TourGoodSpeController
extends
TourBaseController
<
TourGoodSpeBiz
>
{
//
//
//获取价格
//获取价格
//
@RequestMapping(value = "/user/prices", method = RequestMethod.POST)
@RequestMapping
(
value
=
"/user/prices"
,
method
=
RequestMethod
.
POST
)
//
public ObjectRestResponse<TourSpePriceVo> prices(@RequestBody TourSpePriceDTO priceDto) {
public
ObjectRestResponse
<
TourSpePriceVo
>
prices
(
@RequestBody
TourSpePriceDTO
priceDto
)
{
//
return baseBiz.getPricesByuserid(priceDto);
return
baseBiz
.
getPricesByuserid
(
priceDto
);
//
}
}
//
//
//减库存
//减库存
//
@RequestMapping(value = "/stock", method = RequestMethod.GET)
@RequestMapping
(
value
=
"/stock"
,
method
=
RequestMethod
.
GET
)
//
public ObjectRestResponse<TourSpePriceVo> stock(
public
ObjectRestResponse
<
TourSpePriceVo
>
stock
(
//
@RequestParam(value = "speId",defaultValue = "0")Integer speId,
@RequestParam
(
value
=
"speId"
,
defaultValue
=
"0"
)
Integer
speId
,
//
@RequestParam(value = "number",defaultValue = "0") Integer number){
@RequestParam
(
value
=
"number"
,
defaultValue
=
"0"
)
Integer
number
){
//
return baseBiz.cutStock(speId,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/TourUserController.java
View file @
e7ec6f1a
package
com
.
xxfc
.
platform
.
tour
.
rest
;
package
com
.
xxfc
.
platform
.
tour
.
rest
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ListRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.tour.biz.TourUserBiz
;
import
com.xxfc.platform.tour.biz.TourUserBiz
;
import
com.xxfc.platform.tour.common.TourBaseController
;
import
com.xxfc.platform.tour.common.TourBaseController
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
com.xxfc.platform.tour.entity.TourUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -17,15 +16,12 @@ import java.util.List;
...
@@ -17,15 +16,12 @@ import java.util.List;
@RequestMapping
(
"tourUser"
)
@RequestMapping
(
"tourUser"
)
public
class
TourUserController
extends
TourBaseController
<
TourUserBiz
>
{
public
class
TourUserController
extends
TourBaseController
<
TourUserBiz
>
{
@Autowired
private
TourUserBiz
userBiz
;
@GetMapping
(
"/app/unauth/getTourUser/{isChild}"
)
@GetMapping
(
"/app/unauth/getTourUser/{isChild}"
)
public
ListRestResponse
getTourUser
(
@PathVariable
int
isChild
){
public
ListRestResponse
getTourUser
(
@PathVariable
int
isChild
){
// AppUserDTO userInfo = getUserInfo();
AppUserDTO
userInfo
=
getUserInfo
();
// Integer id = userInfo.getId();
Integer
id
=
userInfo
.
getId
();
Integer
id
=
14
;
List
<
TourUser
>
tourUsers
=
baseBiz
.
getTourUser
(
id
,
isChild
);
List
<
TourUser
>
tourUsers
=
userBiz
.
getTourUser
(
id
,
isChild
);
return
new
ListRestResponse
().
result
(
tourUsers
).
count
(
tourUsers
.
size
());
return
new
ListRestResponse
().
result
(
tourUsers
).
count
(
tourUsers
.
size
());
}
}
...
...
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