Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-golf-mobile
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4b84ea4a
authored
Jan 18, 2022
by
caosy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过期会员购买限制
parent
baa6e495
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
103 deletions
src/main/java/com/ctrip/fun/golf/api/basic/VoucherMController.java
src/main/java/com/ctrip/fun/golf/api/user/UserMController.java
src/main/java/com/ctrip/fun/golf/service/basic/VoucherMService.java
src/main/resources/rpc.properties
src/main/java/com/ctrip/fun/golf/api/basic/VoucherMController.java
View file @
4b84ea4a
...
...
@@ -24,7 +24,6 @@ import com.ctrip.fun.common.vo.ResponseError;
import
com.ctrip.fun.common.vo.ResponseStatusEnum
;
import
com.ctrip.fun.common.vo.SortDirectionEnum
;
import
com.ctrip.fun.common.vo.basic.VoucherGetLogBean
;
import
com.ctrip.fun.common.vo.basic.VoucherGiftQuery
;
import
com.ctrip.fun.common.vo.basic.VoucherItemDTO
;
import
com.ctrip.fun.common.vo.basic.VoucherQueryDto
;
import
com.ctrip.fun.common.vo.basic.VoucherQueryRequestDTO
;
...
...
@@ -309,67 +308,7 @@ public class VoucherMController {
return
response
;
}
/**
* 换卷列表
*/
@ResponseBody
@Security
@RequestMapping
(
value
=
"/voucher/getVoucherGiftList"
,
method
=
RequestMethod
.
GET
,
params
=
{
"token"
,
"uid"
,
"pagerOffset"
,
"pagerPerPage"
,
"status"
})
public
Object
getVoucherGiftList
(
@RequestParam
String
token
,
VoucherGiftQuery
voucherGiftQuery
)
{
voucherGiftQuery
.
setToken
(
token
);
System
.
out
.
println
(
"getVoucherGiftList1===>"
);
return
voucherService
.
getVoucherGiftList
(
voucherGiftQuery
);
}
/**
* 客户确认换卷
*/
@ResponseBody
@Transactional
@Security
@RequestMapping
(
value
=
"/voucher/voucherGiftAffirm"
,
method
=
RequestMethod
.
GET
,
params
=
{
"token"
,
"id"
})
public
Object
voucherGiftAffirm
(
@RequestParam
String
token
,
VoucherGiftQuery
voucherGiftQuery
)
{
Response
<?>
response
=
new
Response
();
Request
<
VoucherGiftQuery
>
request
=
new
Request
<
VoucherGiftQuery
>();
voucherGiftQuery
.
setUid
(
UserContext
.
getUserId
());
request
.
setUserId
(
UserContext
.
getUserId
());
request
.
setBody
(
voucherGiftQuery
);
response
=
voucherService
.
voucherGiftAffirm
(
request
);
if
(
response
.
getStatus
()
==
ResponseStatusEnum
.
SUCCESS
.
getValue
())
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"success"
,
true
);
return
map
;
}
else
{
return
handFailResponse
(
response
);
}
}
/**
* 客户取消换卷
*/
@ResponseBody
@Security
@RequestMapping
(
value
=
"/voucher/voucherGiftCancel"
,
method
=
RequestMethod
.
GET
,
params
=
{
"token"
,
"id"
})
public
Object
voucherGiftCancel
(
@RequestParam
String
token
,
VoucherGiftQuery
voucherGiftQuery
)
{
Response
<?>
response
=
new
Response
();
Request
<
VoucherGiftQuery
>
request
=
new
Request
<
VoucherGiftQuery
>();
voucherGiftQuery
.
setUid
(
UserContext
.
getUserId
());
request
.
setUserId
(
UserContext
.
getUserId
());
request
.
setBody
(
voucherGiftQuery
);
response
=
voucherService
.
voucherGiftCancel
(
request
);
if
(
response
.
getStatus
()
==
ResponseStatusEnum
.
SUCCESS
.
getValue
())
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"success"
,
true
);
return
map
;
}
else
{
return
handFailResponse
(
response
);
}
}
/**
...
...
src/main/java/com/ctrip/fun/golf/api/user/UserMController.java
View file @
4b84ea4a
...
...
@@ -804,6 +804,7 @@ public class UserMController {
mp
.
put
(
"golfLevel"
,
userBean
.
getGolfLevel
());
mp
.
put
(
"userWorkerId"
,
userBean
.
getUserWorkerId
());
mp
.
put
(
"isSales"
,
userBean
.
getIsSales
());
mp
.
put
(
"sVipEndTime"
,
userBean
.
getSvipEndTime
());
return
mp
;
}
...
...
src/main/java/com/ctrip/fun/golf/service/basic/VoucherMService.java
View file @
4b84ea4a
...
...
@@ -13,8 +13,6 @@ import com.ctrip.fun.common.vo.PagedResponseBean;
import
com.ctrip.fun.common.vo.Request
;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.basic.VoucherGetLogBean
;
import
com.ctrip.fun.common.vo.basic.VoucherGiftQuery
;
import
com.ctrip.fun.common.vo.basic.VoucherGiftVo
;
import
com.ctrip.fun.common.vo.basic.VoucherItemDTO
;
import
com.ctrip.fun.common.vo.basic.VoucherQueryDto
;
import
com.ctrip.fun.common.vo.basic.VoucherQueryRequestDTO
;
...
...
@@ -202,25 +200,7 @@ public class VoucherMService extends BaseService {
return
response
.
getBody
();
}
public
Object
getVoucherGiftList
(
VoucherGiftQuery
query
){
PagedResponseBean
<
VoucherGiftVo
>
pagedResponseBean
=
new
PagedResponseBean
<
VoucherGiftVo
>(
0
,
new
ArrayList
<
VoucherGiftVo
>());
String
uri
=
super
.
getServiceUri
(
"uri.voucher.getVoucherGiftList"
);
System
.
out
.
println
(
"getVoucherGiftList1===>"
+
uri
);
HttpEntity
<
Request
<
VoucherGiftQuery
>>
entity
=
new
HttpEntity
<
Request
<
VoucherGiftQuery
>>(
new
Request
<
VoucherGiftQuery
>(
null
,
query
));
Response
<
PagedResponseBean
<
VoucherGiftVo
>>
response
=
null
;
try
{
// response = super.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<Response<PagedResponseBean<VoucherGiftVo>>>() {
// }).getBody();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
pagedResponseBean
;
}
if
(
response
==
null
||
response
.
getStatus
()
!=
0
||
response
.
getBody
()
==
null
)
{
return
pagedResponseBean
;
}
return
response
.
getBody
();
}
...
...
@@ -343,23 +323,4 @@ public class VoucherMService extends BaseService {
}
public
Response
<?>
voucherGiftAffirm
(
Request
<
VoucherGiftQuery
>
request
)
{
String
uri
=
super
.
getServiceUri
(
"uri.voucher.voucherGiftAffirm"
);
HttpEntity
<
Request
<
VoucherGiftQuery
>>
entity
=
new
HttpEntity
<
Request
<
VoucherGiftQuery
>>(
request
);
Response
<?>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<?>>()
{
}).
getBody
();
return
response
;
}
public
Response
<?>
voucherGiftCancel
(
Request
<
VoucherGiftQuery
>
request
)
{
String
uri
=
super
.
getServiceUri
(
"uri.voucher.voucherGiftCancel"
);
HttpEntity
<
Request
<
VoucherGiftQuery
>>
entity
=
new
HttpEntity
<
Request
<
VoucherGiftQuery
>>(
request
);
Response
<?>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<?>>()
{
}).
getBody
();
return
response
;
}
}
src/main/resources/rpc.properties
View file @
4b84ea4a
...
...
@@ -141,9 +141,7 @@ uri.voucher.findUserVoucherById=/fun-golf-service/Voucher/findUserVoucherById
uri.voucherRule.addVoucherRoleUsers
=
/fun-golf-service/voucherRule/addVoucherRoleUsers/{id}
uri.voucherRule.findUserVoucherById
=
/fun-golf-service/voucherRule/getVoucherRuleById
uri.voucherRule.getVoucherRuleRemark
=
/fun-golf-service/voucherRule/getVoucherRuleRemark
uri.voucher.getVoucherGiftList
=
/fun-golf-service/Voucher/getVoucherGiftList
uri.voucher.voucherGiftAffirm
=
/fun-golf-service/Voucher/voucherGiftAffirm
uri.voucher.voucherGiftCancel
=
/fun-golf-service/Voucher/voucherGiftCancel
uri.tour.search
=
/fun-golf-service/tour/search
uri.tour.cities
=
/fun-golf-service/tour/cities
...
...
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