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
3366b2fb
Commit
3366b2fb
authored
Jun 01, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改回调
parent
6810340a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
OrderPayBiz.java
...ain/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
+4
-4
OrderPayController.java
...xfc/platform/universal/controller/OrderPayController.java
+6
-0
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/OrderPayBiz.java
View file @
3366b2fb
...
...
@@ -73,16 +73,16 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
}
//支付回调
public
void
notice
(
String
orderNo
,
String
serialNumber
){
log
.
error
(
"---支付回调---
order
_no====="
+
orderNo
+
"----开始处理"
);
log
.
error
(
"---支付回调---
trade
_no====="
+
orderNo
+
"----开始处理"
);
Example
example
=
new
Example
(
OrderPay
.
class
);
example
.
createCriteria
().
andEqualTo
(
"
order
_no"
,
orderNo
).
andEqualTo
(
"is_del"
,
0
).
andEqualTo
(
"status"
,
0
);
example
.
createCriteria
().
andEqualTo
(
"
trade
_no"
,
orderNo
).
andEqualTo
(
"is_del"
,
0
).
andEqualTo
(
"status"
,
0
);
List
<
OrderPay
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
.
size
()==
0
){
log
.
error
(
"---支付回调---
order
_no====="
+
orderNo
+
"----订单不存在或已处理"
);
log
.
error
(
"---支付回调---
trade
_no====="
+
orderNo
+
"----订单不存在或已处理"
);
return
;
}
example
.
clear
();
example
.
createCriteria
().
andEqualTo
(
"
order
_no"
,
orderNo
);
example
.
createCriteria
().
andEqualTo
(
"
trade
_no"
,
orderNo
);
OrderPay
orderPay
=
new
OrderPay
();
orderPay
.
setFinishTime
(
System
.
currentTimeMillis
());
orderPay
.
setStatus
(
1
);
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/OrderPayController.java
View file @
3366b2fb
...
...
@@ -7,6 +7,7 @@ import com.xxfc.platform.universal.biz.OrderPayBiz;
import
com.xxfc.platform.universal.entity.OrderPay
;
import
com.xxfc.platform.universal.vo.OrderPayVo
;
import
com.xxfc.platform.universal.weixin.util.XMLUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jdom.JDOMException
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -19,6 +20,7 @@ import java.util.Map;
@RestController
@RequestMapping
(
"pay"
)
@Slf4j
public
class
OrderPayController
extends
BaseController
<
OrderPayBiz
,
OrderPay
>
{
/**
...
...
@@ -54,6 +56,8 @@ public class OrderPayController extends BaseController<OrderPayBiz,OrderPay> {
outSteam
.
close
();
inStream
.
close
();
String
result
=
new
String
(
outSteam
.
toByteArray
(),
"utf-8"
);
log
.
info
(
"---支付回调---result====="
+
result
);
Map
<
String
,
String
>
map
=
null
;
try
{
map
=
XMLUtil
.
doXMLParse
(
result
);
...
...
@@ -62,8 +66,10 @@ public class OrderPayController extends BaseController<OrderPayBiz,OrderPay> {
}
if
(
"SUCCESS"
.
equals
(
map
.
get
(
"return_code"
))
&&
"SUCCESS"
.
equals
(
map
.
get
(
"result_code"
)))
{
try
{
String
orderno
=
map
.
get
(
"out_trade_no"
);
String
serialNumber
=
map
.
get
(
"transaction_id"
);
log
.
info
(
"---支付回调---orderno====="
+
orderno
+
"-----serialNumber====="
+
serialNumber
);
baseBiz
.
notice
(
orderno
,
serialNumber
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
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