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
447d7345
authored
Aug 03, 2018
by
chongli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信小程序
parent
fd86ed04
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
293 additions
and
0 deletions
src/main/java/com/ctrip/fun/golf/api/basic/VoucherMController.java
src/main/java/com/ctrip/fun/golf/api/order/CommuneOrderMController.java
src/main/java/com/ctrip/fun/golf/api/user/UserMController.java
src/main/java/com/ctrip/fun/golf/aspect/RestAspect.java
src/main/java/com/ctrip/fun/golf/service/basic/VoucherMService.java
src/main/java/com/ctrip/fun/golf/service/order/CommuneOrderMService.java
src/main/java/com/ctrip/fun/golf/service/user/UserMService.java
src/main/resources/rpc.properties
src/main/java/com/ctrip/fun/golf/api/basic/VoucherMController.java
View file @
447d7345
...
...
@@ -9,6 +9,8 @@ import java.util.Map;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -19,9 +21,12 @@ import com.ctrip.fun.common.vo.Request;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.ResponseError
;
import
com.ctrip.fun.common.vo.SortDirectionEnum
;
import
com.ctrip.fun.common.vo.basic.VoucherGetLogBean
;
import
com.ctrip.fun.common.vo.basic.VoucherItemDTO
;
import
com.ctrip.fun.common.vo.basic.VoucherQueryDto
;
import
com.ctrip.fun.common.vo.basic.VoucherQueryRequestDTO
;
import
com.ctrip.fun.common.vo.basic.VoucherShareLogBean
;
import
com.ctrip.fun.common.vo.membership.MbsOrderBean
;
import
com.ctrip.fun.golf.secrity.Security
;
import
com.ctrip.fun.golf.secrity.UserContext
;
import
com.ctrip.fun.golf.service.basic.VoucherMService
;
...
...
@@ -148,6 +153,45 @@ public class VoucherMController {
return
voucherService
.
queryListForPersonalCenter
(
voucherQuery
);
}
//获取所有的券
@ResponseBody
@Security
@RequestMapping
(
value
=
"/voucher/queryListForMiniApps"
,
method
=
RequestMethod
.
GET
,
params
=
{
"token"
,
"uid"
,
"used"
,
"expired"
,
"shared"
,
"pagerOffset"
,
"pagerPerPage"
})
public
Object
queryListForMiniApps
(
@RequestParam
String
token
,
VoucherQueryDto
voucherQuery
)
{
return
voucherService
.
queryListForMiniApps
(
voucherQuery
);
}
//生成一次分享
@ResponseBody
@Security
@RequestMapping
(
value
=
"/voucher/shareVoucherForMiniApps/{token}"
,
method
=
RequestMethod
.
POST
)
public
Object
shareVoucherForMiniApps
(
@PathVariable
String
token
,
@RequestBody
VoucherShareLogBean
voucherShareLogBean
)
{
return
voucherService
.
shareVoucherForMiniApps
(
voucherShareLogBean
);
}
//获取券的分享记录
@ResponseBody
@RequestMapping
(
value
=
"/voucher/getShareVoucherLogForMiniApps"
,
method
=
RequestMethod
.
GET
,
params
=
{
"id"
})
public
Object
getShareVoucherLogForMiniApps
(
VoucherShareLogBean
voucherShareLogBean
)
{
return
voucherService
.
getShareVoucherLogForMiniApps
(
voucherShareLogBean
);
}
//抢券
@ResponseBody
@Security
@RequestMapping
(
value
=
"/voucher/getSharedVoucherForMiniApps/{token}"
,
method
=
RequestMethod
.
POST
)
public
Object
getShareVoucherLogForMiniApps
(
@PathVariable
String
token
,
@RequestBody
VoucherGetLogBean
voucherGetLogBean
)
{
return
voucherService
.
getSharedVoucherForMiniApps
(
voucherGetLogBean
);
}
//取消分享
@ResponseBody
@Security
@RequestMapping
(
value
=
"/voucher/cancelShareVoucherForMiniApps/{token}"
,
method
=
RequestMethod
.
POST
)
public
Object
cancelShareVoucherForMiniApps
(
@PathVariable
String
token
,
@RequestBody
VoucherShareLogBean
voucherShareLogBean
)
{
return
voucherService
.
cancelShareVoucherForMiniApps
(
voucherShareLogBean
);
}
@ResponseBody
@Security
@RequestMapping
(
value
=
"/voucher/queryListForCourseOrder"
,
method
=
RequestMethod
.
GET
,
params
=
{
"token"
,
"resourceId"
,
"playDate"
,
"sortField"
,
"sortDirection"
,
"pagerOffset"
,
...
...
src/main/java/com/ctrip/fun/golf/api/order/CommuneOrderMController.java
View file @
447d7345
...
...
@@ -7,11 +7,21 @@ import java.util.Map;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.alibaba.fastjson.JSONObject
;
import
com.ctrip.fun.common.vo.Request
;
import
com.ctrip.fun.common.vo.Response
;
import
com.ctrip.fun.common.vo.ResponseStatusEnum
;
import
com.ctrip.fun.common.vo.order.CommuneOrderBean
;
import
com.ctrip.fun.common.vo.order.CommuneOrderListItemBean
;
import
com.ctrip.fun.common.vo.order.CommuneOrderResourceBean
;
import
com.ctrip.fun.common.vo.order.PlaceOrderResponseBean
;
import
com.ctrip.fun.golf.secrity.Security
;
import
com.ctrip.fun.golf.secrity.UserContext
;
import
com.ctrip.fun.golf.service.order.AbstractOrderMService
;
import
com.ctrip.fun.golf.service.order.CommuneOrderMService
;
...
...
@@ -22,6 +32,22 @@ public class CommuneOrderMController extends AbstractOrderMController<CommuneOrd
@Autowired
private
CommuneOrderMService
communeOrderMService
=
null
;
@SuppressWarnings
(
"unchecked"
)
@ResponseBody
@Security
(
index
=
1
,
field
=
"token"
)
@RequestMapping
(
value
=
"/ordersForMiniApps"
,
method
=
RequestMethod
.
POST
)
public
Object
placeOrder
(
@RequestBody
CommuneOrderBean
communeOrderBean
)
{
Response
<
JSONObject
>
response
=
new
Response
<
JSONObject
>();
Request
<
CommuneOrderBean
>
request
=
new
Request
<
CommuneOrderBean
>();
request
.
setBody
(
communeOrderBean
);
communeOrderBean
.
setUid
(
UserContext
.
getUserId
());
request
.
setUserId
(
UserContext
.
getUserId
());
response
=
communeOrderMService
.
placeOrderForMiniApp
(
request
);
return
response
;
}
@Override
protected
AbstractOrderMService
<
CommuneOrderBean
,
CommuneOrderResourceBean
,
CommuneOrderListItemBean
>
getOrderService
()
{
return
communeOrderMService
;
...
...
src/main/java/com/ctrip/fun/golf/api/user/UserMController.java
View file @
447d7345
...
...
@@ -16,6 +16,9 @@ import javax.servlet.http.HttpServletResponse;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -24,11 +27,15 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.ctrip.fun.common.core.util.DateUtil
;
import
com.ctrip.fun.common.core.util.EncryptUtil
;
import
com.ctrip.fun.common.core.util.JsonUtil
;
import
com.ctrip.fun.common.vo.PagedResponseBean
;
import
com.ctrip.fun.common.vo.Request
;
import
com.ctrip.fun.common.vo.Response
;
...
...
@@ -46,6 +53,8 @@ import com.ctrip.fun.common.vo.user.ChangePasswordBean;
import
com.ctrip.fun.common.vo.user.ImUserBean
;
import
com.ctrip.fun.common.vo.user.LoginBean
;
import
com.ctrip.fun.common.vo.user.LoginResultBean
;
import
com.ctrip.fun.common.vo.user.MiniAppLoginBean
;
import
com.ctrip.fun.common.vo.user.MiniAppLoginResultBean
;
import
com.ctrip.fun.common.vo.user.RecommendUserBean
;
import
com.ctrip.fun.common.vo.user.RecommendUserItemBean
;
import
com.ctrip.fun.common.vo.user.RecommendUserListQuery
;
...
...
@@ -57,6 +66,7 @@ import com.ctrip.fun.common.vo.user.UserExtBean;
import
com.ctrip.fun.common.vo.user.UserQuery
;
import
com.ctrip.fun.common.vo.user.VerifyCodeBean
;
import
com.ctrip.fun.common.vo.user.VerifyResultBean
;
import
com.ctrip.fun.common.vo.user.WeChatAppLoginReq
;
import
com.ctrip.fun.common.vo.user.WeChatUserBean
;
import
com.ctrip.fun.common.vo.user.WeChatUserResultBean
;
import
com.ctrip.fun.golf.secrity.Security
;
...
...
@@ -443,6 +453,53 @@ public class UserMController {
*/
@SuppressWarnings
(
"unchecked"
)
@ResponseBody
@RequestMapping
(
value
=
"/v1/loginMiniApp"
,
method
=
RequestMethod
.
POST
)
public
Object
loginMiniApp
(
@RequestBody
WeChatAppLoginReq
req
)
{
MiniAppLoginResultBean
miniAppLoginResultBean
=
userMService
.
loginMiniApp
(
req
);
Map
mp
=
new
HashMap
();
mp
.
put
(
"miniAppLoginResultBean"
,
miniAppLoginResultBean
);
return
mp
;
}
/**
* 用户注册
*
* @param registerBean
* @return
*/
@SuppressWarnings
(
"unchecked"
)
@ResponseBody
@RequestMapping
(
value
=
"/v1/miniAppLoginByDynamicPassword"
,
method
=
RequestMethod
.
POST
)
public
Object
loginMiniApp
(
@RequestBody
MiniAppLoginBean
req
)
{
MiniAppLoginResultBean
miniAppLoginResultBean
=
userMService
.
miniAppLoginByDynamicPassword
(
req
);
Map
mp
=
new
HashMap
();
mp
.
put
(
"miniAppLoginResultBean"
,
miniAppLoginResultBean
);
return
mp
;
}
/**
* 用户注册
*
* @param registerBean
* @return
*/
@SuppressWarnings
(
"unchecked"
)
@ResponseBody
@RequestMapping
(
value
=
"/v1/getUserInfoForMiniApp"
,
method
=
RequestMethod
.
GET
)
public
Object
loginMiniApp
(
String
mobile
)
{
return
userMService
.
getUserInfoForMiniApp
(
mobile
).
getBody
();
}
/**
* 用户注册
*
* @param registerBean
* @return
*/
@SuppressWarnings
(
"unchecked"
)
@ResponseBody
@RequestMapping
(
value
=
"/v1/users"
,
method
=
RequestMethod
.
POST
)
public
Object
register
(
@RequestBody
RegisterBean
registerBean
)
{
RegisterResultBean
registerResultBean
=
userMService
.
register
(
registerBean
);
...
...
src/main/java/com/ctrip/fun/golf/aspect/RestAspect.java
View file @
447d7345
src/main/java/com/ctrip/fun/golf/service/basic/VoucherMService.java
View file @
447d7345
...
...
@@ -12,9 +12,11 @@ import com.ctrip.fun.common.core.util.StringUtils;
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.VoucherItemDTO
;
import
com.ctrip.fun.common.vo.basic.VoucherQueryDto
;
import
com.ctrip.fun.common.vo.basic.VoucherQueryRequestDTO
;
import
com.ctrip.fun.common.vo.basic.VoucherShareLogBean
;
import
com.ctrip.fun.golf.service.BaseService
;
/*
...
...
@@ -163,4 +165,75 @@ public class VoucherMService extends BaseService {
return
response
;
}
public
Object
queryListForMiniApps
(
VoucherQueryDto
query
)
{
PagedResponseBean
<
VoucherItemDTO
>
pagedResponseBean
=
new
PagedResponseBean
<
VoucherItemDTO
>(
0
,
new
ArrayList
<
VoucherItemDTO
>());
String
uri
=
super
.
getServiceUri
(
"uri.voucher.queryListForMiniApps"
);
HttpEntity
<
Request
<
VoucherQueryDto
>>
entity
=
new
HttpEntity
<
Request
<
VoucherQueryDto
>>(
new
Request
<
VoucherQueryDto
>(
null
,
query
));
Response
<
PagedResponseBean
<
VoucherItemDTO
>>
response
=
null
;
try
{
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
PagedResponseBean
<
VoucherItemDTO
>>>()
{
}).
getBody
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
pagedResponseBean
;
}
if
(
response
==
null
||
response
.
getStatus
()
!=
0
||
response
.
getBody
()
==
null
)
{
return
pagedResponseBean
;
}
return
response
.
getBody
();
}
public
Object
shareVoucherForMiniApps
(
VoucherShareLogBean
query
)
{
PagedResponseBean
<
VoucherItemDTO
>
pagedResponseBean
=
new
PagedResponseBean
<
VoucherItemDTO
>(
0
,
new
ArrayList
<
VoucherItemDTO
>());
String
uri
=
super
.
getServiceUri
(
"uri.voucher.shareVoucherForMiniApps"
);
HttpEntity
<
Request
<
VoucherShareLogBean
>>
entity
=
new
HttpEntity
<
Request
<
VoucherShareLogBean
>>(
new
Request
<
VoucherShareLogBean
>(
null
,
query
));
Response
<
VoucherShareLogBean
>
response
=
null
;
try
{
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
VoucherShareLogBean
>>()
{}).
getBody
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
pagedResponseBean
;
}
return
response
.
getBody
();
}
public
Object
getShareVoucherLogForMiniApps
(
VoucherShareLogBean
query
)
{
PagedResponseBean
<
VoucherItemDTO
>
pagedResponseBean
=
new
PagedResponseBean
<
VoucherItemDTO
>(
0
,
new
ArrayList
<
VoucherItemDTO
>());
String
uri
=
super
.
getServiceUri
(
"uri.voucher.getShareVoucherLogForMiniApps"
);
HttpEntity
<
Request
<
VoucherShareLogBean
>>
entity
=
new
HttpEntity
<
Request
<
VoucherShareLogBean
>>(
new
Request
<
VoucherShareLogBean
>(
null
,
query
));
Response
<
VoucherShareLogBean
>
response
=
null
;
try
{
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
VoucherShareLogBean
>>()
{}).
getBody
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
pagedResponseBean
;
}
return
response
.
getBody
();
}
public
Object
getSharedVoucherForMiniApps
(
VoucherGetLogBean
query
)
{
String
uri
=
super
.
getServiceUri
(
"uri.voucher.getSharedVoucherForMiniApps"
);
HttpEntity
<
Request
<
VoucherGetLogBean
>>
entity
=
new
HttpEntity
<
Request
<
VoucherGetLogBean
>>(
new
Request
<
VoucherGetLogBean
>(
null
,
query
));
Response
<
String
>
response
=
new
Response
<
String
>();
try
{
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
String
>>()
{}).
getBody
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
response
;
}
return
response
;
}
public
Object
cancelShareVoucherForMiniApps
(
VoucherShareLogBean
query
)
{
String
uri
=
super
.
getServiceUri
(
"uri.voucher.cancelShareVoucherForMiniApps"
);
HttpEntity
<
Request
<
VoucherShareLogBean
>>
entity
=
new
HttpEntity
<
Request
<
VoucherShareLogBean
>>(
new
Request
<
VoucherShareLogBean
>(
null
,
query
));
Response
<
String
>
response
=
new
Response
<
String
>();
try
{
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
String
>>()
{}).
getBody
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
());
return
response
;
}
return
response
;
}
}
src/main/java/com/ctrip/fun/golf/service/order/CommuneOrderMService.java
View file @
447d7345
...
...
@@ -4,12 +4,18 @@
package
com
.
ctrip
.
fun
.
golf
.
service
.
order
;
import
org.springframework.core.ParameterizedTypeReference
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
com.alibaba.fastjson.JSONObject
;
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.order.CommuneOrderBean
;
import
com.ctrip.fun.common.vo.order.CommuneOrderListItemBean
;
import
com.ctrip.fun.common.vo.order.CommuneOrderResourceBean
;
import
com.ctrip.fun.common.vo.order.PlaceOrderResponseBean
;
public
class
CommuneOrderMService
extends
AbstractOrderMService
<
CommuneOrderBean
,
CommuneOrderResourceBean
,
CommuneOrderListItemBean
>
{
...
...
@@ -22,6 +28,20 @@ public class CommuneOrderMService extends AbstractOrderMService<CommuneOrderBean
return
"communeOrder"
;
}
public
Response
<
JSONObject
>
placeOrderForMiniApp
(
@RequestBody
Request
<
CommuneOrderBean
>
request
)
{
{
String
uri
=
super
.
getServiceUri
(
"uri.communeOrder.placeOrderForMiniApp"
);
HttpEntity
<
Request
<
CommuneOrderBean
>>
entity
=
new
HttpEntity
<
Request
<
CommuneOrderBean
>>(
request
);
Response
<
JSONObject
>
response
=
super
.
exchange
(
uri
,
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
JSONObject
>>()
{
}).
getBody
();
return
response
;
}
}
@Override
public
ParameterizedTypeReference
<
Response
<
CommuneOrderBean
>>
getOrderDetailParameterizedTypeReference
()
{
ParameterizedTypeReference
<
Response
<
CommuneOrderBean
>>
parameterizedTypeReference
=
new
ParameterizedTypeReference
<
Response
<
CommuneOrderBean
>>()
{
...
...
src/main/java/com/ctrip/fun/golf/service/user/UserMService.java
View file @
447d7345
...
...
@@ -18,6 +18,8 @@ import com.ctrip.fun.common.vo.user.ChangePasswordBean;
import
com.ctrip.fun.common.vo.user.ImUserBean
;
import
com.ctrip.fun.common.vo.user.LoginBean
;
import
com.ctrip.fun.common.vo.user.LoginResultBean
;
import
com.ctrip.fun.common.vo.user.MiniAppLoginBean
;
import
com.ctrip.fun.common.vo.user.MiniAppLoginResultBean
;
import
com.ctrip.fun.common.vo.user.RecommendUserBean
;
import
com.ctrip.fun.common.vo.user.RecommendUserItemBean
;
import
com.ctrip.fun.common.vo.user.RecommendUserListQuery
;
...
...
@@ -29,6 +31,7 @@ import com.ctrip.fun.common.vo.user.UserExtBean;
import
com.ctrip.fun.common.vo.user.UserQuery
;
import
com.ctrip.fun.common.vo.user.VerifyCodeBean
;
import
com.ctrip.fun.common.vo.user.VerifyResultBean
;
import
com.ctrip.fun.common.vo.user.WeChatAppLoginReq
;
import
com.ctrip.fun.common.vo.user.WeChatUserBean
;
import
com.ctrip.fun.common.vo.user.WeChatUserResultBean
;
import
com.ctrip.fun.golf.exceptions.RestException
;
...
...
@@ -228,6 +231,65 @@ public class UserMService extends BaseService {
}
public
MiniAppLoginResultBean
loginMiniApp
(
WeChatAppLoginReq
req
)
{
Request
<
WeChatAppLoginReq
>
request
=
new
Request
<
WeChatAppLoginReq
>(
""
,
req
);
HttpEntity
<
Request
<
WeChatAppLoginReq
>>
entity
=
new
HttpEntity
<
Request
<
WeChatAppLoginReq
>>(
request
);
MiniAppLoginResultBean
responseBean
=
null
;
Response
<
MiniAppLoginResultBean
>
response
=
super
.
exchange
(
this
.
getServiceUri
(
"uri.user.loginMiniApp"
),
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
MiniAppLoginResultBean
>>()
{
}).
getBody
();
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
"[list] status:{}, msg: {}"
,
response
.
getStatus
(),
response
.
getMessage
());
if
(
response
.
getStatus
()
==
-
1
)
{
throw
new
RestException
(
500
,
response
.
getMessage
());
}
else
{
throw
new
RestException
(
response
.
getStatus
(),
response
.
getMessage
());
}
}
return
responseBean
;
}
public
MiniAppLoginResultBean
miniAppLoginByDynamicPassword
(
MiniAppLoginBean
req
)
{
Request
<
MiniAppLoginBean
>
request
=
new
Request
<
MiniAppLoginBean
>(
""
,
req
);
HttpEntity
<
Request
<
MiniAppLoginBean
>>
entity
=
new
HttpEntity
<
Request
<
MiniAppLoginBean
>>(
request
);
MiniAppLoginResultBean
responseBean
=
null
;
Response
<
MiniAppLoginResultBean
>
response
=
super
.
exchange
(
this
.
getServiceUri
(
"uri.user.miniAppLoginByDynamicPassword"
),
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
MiniAppLoginResultBean
>>()
{
}).
getBody
();
if
(
response
.
getStatus
()
==
0
)
{
responseBean
=
response
.
getBody
();
}
else
{
logger
.
error
(
"[list] status:{}, msg: {}"
,
response
.
getStatus
(),
response
.
getMessage
());
if
(
response
.
getStatus
()
==
-
1
)
{
throw
new
RestException
(
500
,
response
.
getMessage
());
}
else
{
throw
new
RestException
(
response
.
getStatus
(),
response
.
getMessage
());
}
}
return
responseBean
;
}
public
Response
<
Map
<
String
,
String
>>
getUserInfoForMiniApp
(
String
req
)
{
Request
<
String
>
request
=
new
Request
<
String
>(
""
,
req
);
HttpEntity
<
Request
<
String
>>
entity
=
new
HttpEntity
<
Request
<
String
>>(
request
);
Response
<
Map
<
String
,
String
>>
resp
=
super
.
exchange
(
this
.
getServiceUri
(
"uri.user.getUserInfoForMiniApp"
),
HttpMethod
.
POST
,
entity
,
new
ParameterizedTypeReference
<
Response
<
Map
<
String
,
String
>>>()
{
}).
getBody
();
return
resp
;
}
public
LoginResultBean
login
(
LoginBean
loginBean
)
{
Request
<
LoginBean
>
request
=
new
Request
<
LoginBean
>(
""
,
loginBean
);
...
...
src/main/resources/rpc.properties
View file @
447d7345
...
...
@@ -49,6 +49,9 @@ uri.order.callback=/fun-golf-service/{orderType}/callback
uri.order.confirmReceving
=
/fun-golf-service/mall/order/confirmReceving
uri.order.deleteOrder
=
/fun-golf-service/{orderType}/deleteOrder
#communeOrder
uri.communeOrder.placeOrderForMiniApp
=
/fun-golf-service/communeOrder/placeOrderForMiniApp
# order0
uri.order.QueryOrderList
=
/fun-golf-service/Order/QueryOrderList
uri.order.PlaceOrder
=
/fun-golf-service/Order/PlaceOrder
...
...
@@ -66,6 +69,9 @@ uri.user.userDetail=/fun-golf-service/user/userDetail
uri.user.sendVerifyCode
=
/fun-golf-service/user/sendVerifyCode
uri.user.validateMobilePhone
=
/fun-golf-service/user/validateMobilePhone
uri.user.register
=
/fun-golf-service/user/register
uri.user.miniAppLoginByDynamicPassword
=
/fun-golf-service/user/miniAppLoginByDynamicPassword
uri.user.getUserInfoForMiniApp
=
/fun-golf-service/user/getUserInfoForMiniApp
uri.user.loginMiniApp
=
/fun-golf-service/user/loginMiniApp
uri.user.changePassword
=
/fun-golf-service/user/changePassword
uri.user.changeUserInfo
=
/fun-golf-service/user/changeUserInfo
uri.user.sendResetPwdVerifyCode
=
/fun-golf-service/user/sendResetPwdVerifyCode
...
...
@@ -93,6 +99,11 @@ uri.EntityImage.upload=/fun-golf-service/entityImage/upload
uri.district.GetDistrictWeatherForecast
=
/fun-golf-service/district/weatherForecast
uri.voucher.voucherSearch
=
/fun-golf-service/Voucher/QueryVoucherList
uri.voucher.queryListForMiniApps
=
/fun-golf-service/Voucher/queryListForMiniApps
uri.voucher.shareVoucherForMiniApps
=
/fun-golf-service/Voucher/shareVoucherForMiniApps
uri.voucher.getShareVoucherLogForMiniApps
=
/fun-golf-service/Voucher/getShareVoucherLogForMiniApps
uri.voucher.getSharedVoucherForMiniApps
=
/fun-golf-service/Voucher/getSharedVoucherForMiniApps
uri.voucher.cancelShareVoucherForMiniApps
=
/fun-golf-service/Voucher/cancelShareVoucherForMiniApps
uri.voucher.queryListForPersonalCenter
=
/fun-golf-service/Voucher/queryListForPersonalCenter
uri.voucher.queryListForCourseOrder
=
/fun-golf-service/Voucher/queryListForCourseOrder
uri.voucher.queryListForTourOrder
=
/fun-golf-service/Voucher/queryListForTourOrder
...
...
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