Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
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
曲欣亮
shop
Commits
dec725a4
Commit
dec725a4
authored
Mar 15, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
097982bf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
OrderServiceImpl.java
...ava/com/egolm/shop/api/service/impl/OrderServiceImpl.java
+22
-3
No files found.
src/main/java/com/egolm/shop/api/service/impl/OrderServiceImpl.java
View file @
dec725a4
...
@@ -333,7 +333,6 @@ public class OrderServiceImpl implements OrderService {
...
@@ -333,7 +333,6 @@ public class OrderServiceImpl implements OrderService {
System
.
out
.
println
(
nPayAmount
);
System
.
out
.
println
(
nPayAmount
);
}
}
@Override
@Transactional
@Transactional
public
void
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
Date
dPayDateTime
)
{
public
void
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
Date
dPayDateTime
)
{
Integer
nIdx
=
jdbcTemplate
.
queryForInt
(
"select ISNULL(MAX(nIdx),0) from tSalesOrderPay where sSalesOrderID = ?"
,
sSalesOrderID
);
Integer
nIdx
=
jdbcTemplate
.
queryForInt
(
"select ISNULL(MAX(nIdx),0) from tSalesOrderPay where sSalesOrderID = ?"
,
sSalesOrderID
);
...
@@ -1138,6 +1137,7 @@ public class OrderServiceImpl implements OrderService {
...
@@ -1138,6 +1137,7 @@ public class OrderServiceImpl implements OrderService {
//回调标记已补款
//回调标记已补款
public
List
<
Map
<
String
,
Object
>>
payCallback
(
WxPayResponse
postData
)
{
public
List
<
Map
<
String
,
Object
>>
payCallback
(
WxPayResponse
postData
)
{
List
<
Map
<
String
,
Object
>>
returnMap
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
returnMap
=
new
ArrayList
<
Map
<
String
,
Object
>>();
try
{
try
{
String
OutTradeNO
=
postData
.
getOut_trade_no
();
String
OutTradeNO
=
postData
.
getOut_trade_no
();
String
TransactionID
=
postData
.
getTransaction_id
();
String
TransactionID
=
postData
.
getTransaction_id
();
...
@@ -1145,8 +1145,9 @@ public class OrderServiceImpl implements OrderService {
...
@@ -1145,8 +1145,9 @@ public class OrderServiceImpl implements OrderService {
String
PayAmount
=
postData
.
getTotal_fee
().
toString
();
String
PayAmount
=
postData
.
getTotal_fee
().
toString
();
String
PayDate
=
postData
.
getTime_end
();
String
PayDate
=
postData
.
getTime_end
();
String
PayChannel
=
postData
.
getPay_type
();
String
PayChannel
=
postData
.
getPay_type
();
String
OpenID
=
postData
.
getOpenid
();
String
paydate
=
DateUtil
.
format
(
DateUtil
.
parse
(
PayDate
,
DateUtil
.
FMT_YYYYMMddHHMMSS
),
DateUtil
.
FMT_DATE_SECOND
);
String
paydate
=
DateUtil
.
format
(
DateUtil
.
parse
(
PayDate
,
DateUtil
.
FMT_YYYYMMddHHMMSS
),
DateUtil
.
FMT_DATE_SECOND
);
logger
.
info
(
"支付回调单号: "
,
OutTradeNO
);
//补款后缀是_D,结算单后缀是_S
//补款后缀是_D,结算单后缀是_S
if
(
OutTradeNO
.
contains
(
"_D"
))
{
if
(
OutTradeNO
.
contains
(
"_D"
))
{
String
sql
=
"exec up_B2BSalesOrderDebtPayCallBack '"
+
OutTradeNO
+
"' ,'"
+
TransactionID
+
"' , '"
+
PayCardNO
+
"' , '"
+
PayAmount
+
"' , '"
+
paydate
+
"' , '"
+
PayChannel
+
"' "
;
String
sql
=
"exec up_B2BSalesOrderDebtPayCallBack '"
+
OutTradeNO
+
"' ,'"
+
TransactionID
+
"' , '"
+
PayCardNO
+
"' , '"
+
PayAmount
+
"' , '"
+
paydate
+
"' , '"
+
PayChannel
+
"' "
;
...
@@ -1155,7 +1156,25 @@ public class OrderServiceImpl implements OrderService {
...
@@ -1155,7 +1156,25 @@ public class OrderServiceImpl implements OrderService {
String
sql
=
"exec up_CreateSettlePayCallBack '"
+
OutTradeNO
+
"' ,'"
+
TransactionID
+
"' , '"
+
PayCardNO
+
"' , '"
+
PayAmount
+
"' , '"
+
paydate
+
"' , '"
+
PayChannel
+
"' "
;
String
sql
=
"exec up_CreateSettlePayCallBack '"
+
OutTradeNO
+
"' ,'"
+
TransactionID
+
"' , '"
+
PayCardNO
+
"' , '"
+
PayAmount
+
"' , '"
+
paydate
+
"' , '"
+
PayChannel
+
"' "
;
returnMap
=
jdbcTemplate
.
executeMutil
(
sql
).
getDatas
().
get
(
0
);
returnMap
=
jdbcTemplate
.
executeMutil
(
sql
).
getDatas
().
get
(
0
);
}
else
{
}
else
{
logger
.
info
(
"订单号不满足条件(补款后缀是_D,结算单后缀是_S )回调失败 ,{} "
,
OutTradeNO
);
try
{
String
[]
ary
=
OutTradeNO
.
split
(
"_"
,
2
);
this
.
paySuccess
(
ary
[
0
],
new
BigDecimal
(
PayAmount
),
OpenID
,
TransactionID
,
OutTradeNO
,
new
Date
());
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"Status"
,
"00"
);
map
.
put
(
"ErrorMsg"
,
"回调成功"
);
map
.
put
(
"OutTradeNO"
,
OutTradeNO
);
map
.
put
(
"TransactionID"
,
TransactionID
);
returnMap
.
add
(
map
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"Status"
,
"01"
);
map
.
put
(
"ErrorMsg"
,
"回调异常"
);
returnMap
.
add
(
map
);
}
//logger.info("订单号不满足条件(补款后缀是_D,结算单后缀是_S )回调失败 ,{} ",OutTradeNO);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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