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
8eeba9a8
Commit
8eeba9a8
authored
Jun 03, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改支付
parent
f58dde70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
BaseOrderController.java
...ava/com/xxfc/platform/order/rest/BaseOrderController.java
+7
-10
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BaseOrderController.java
View file @
8eeba9a8
...
...
@@ -93,7 +93,7 @@ public class BaseOrderController extends CommonBaseController {
orderPayVo
.
setBody
(
baseOrder
.
getName
());
orderPayVo
.
setBuyerIp
(
StringUtils
.
defaultIfBlank
(
request
.
getHeader
(
"userHost"
),
ClientUtil
.
getClientIp
(
request
)));
orderPayVo
.
setChannel
(
PayChannelEnum
.
ORDER_CRT
.
getCode
());
orderPayVo
.
setNotifyUrl
(
host
+
order
+
notifyUrl
);
orderPayVo
.
setNotifyUrl
(
host
+
order
+
notifyUrl
+
"?orderNo="
+
baseOrder
.
getNo
()
);
orderPayVo
.
setSubject
(
baseOrder
.
getName
());
orderPayVo
.
setUserId
(
baseOrder
.
getUserId
());
ObjectRestResponse
response
=
BeanUtil
.
toBean
(
thirdFeign
.
wx
(
orderPayVo
),
ObjectRestResponse
.
class
);
...
...
@@ -101,20 +101,20 @@ public class BaseOrderController extends CommonBaseController {
//.data(PageDataVO.pageInfo(query.getPage(), query.getLimit(), baseOrderBiz.pageByParm(query.getSuper())));
}
@RequestMapping
(
value
=
"/notifyUrl"
,
method
=
RequestMethod
.
POS
T
)
@RequestMapping
(
value
=
"/notifyUrl"
,
method
=
RequestMethod
.
GE
T
)
@ResponseBody
@ApiOperation
(
value
=
"订单支付回调"
)
@IgnoreClientToken
public
ObjectRestResponse
notifyUrl
(
@RequestBody
NotifyUrlDTO
dto
){
public
ObjectRestResponse
notifyUrl
(
NotifyUrlDTO
dto
){
//判断是否成功,并且订单是未支付状态,则添加支付编号和修改状态
if
(
S
TATUS_SUCCESS
.
equals
(
dto
.
getStatus
())
&&
S
trUtil
.
isNotBlank
(
dto
.
getOrderNo
())){
if
(
StrUtil
.
isNotBlank
(
dto
.
getOrderNo
())){
BaseOrder
baseOrder
=
baseOrderBiz
.
selectOne
(
new
BaseOrder
(){{
setNo
(
dto
.
getOrderNo
());
}});
if
(
OrderStatusEnum
.
ORDER_UNPAY
.
equals
(
baseOrder
.
getStatus
()))
{
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_TOSTART
.
getCode
());
baseOrder
.
setOutTradeNo
(
dto
.
get
Out
TradeNo
());
baseOrder
.
setOutTradeNo
(
dto
.
getTradeNo
());
baseOrderBiz
.
updateById
(
baseOrder
);
}
else
{
log
.
info
(
" exception notifyUrl : "
+
JSONUtil
.
toJsonStr
(
dto
));
...
...
@@ -151,10 +151,7 @@ public class BaseOrderController extends CommonBaseController {
private
String
orderNo
;
//订单号
@ApiModelProperty
(
value
=
"订单号"
)
private
String
outTradeNo
;
@ApiModelProperty
(
value
=
"支付是否成功 1:成功;2:失败"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"支付订单(流水)号"
)
private
String
tradeNo
;
}
}
\ No newline at end of file
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