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
6a17fb4c
Commit
6a17fb4c
authored
Mar 15, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
643decc2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
30 deletions
+13
-30
OrderController.java
src/main/java/com/egolm/shop/api/OrderController.java
+2
-2
OrderService.java
src/main/java/com/egolm/shop/api/service/OrderService.java
+1
-1
OrderServiceImpl.java
...ava/com/egolm/shop/api/service/impl/OrderServiceImpl.java
+10
-27
No files found.
src/main/java/com/egolm/shop/api/OrderController.java
View file @
6a17fb4c
...
...
@@ -187,8 +187,8 @@ public class OrderController {
public
String
paySuccess
(
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
)
{
try
{
String
[]
ary
=
sOutTradeNO
.
split
(
"_"
,
2
);
orderService
.
paySuccess
(
ary
[
0
],
nPayAmount
,
sOpenID
,
sTransTraceNO
,
sOutTradeNO
,
new
Date
());
return
Rjx
.
jsonOk
().
toJson
();
List
<
Map
<
String
,
Object
>>
result
=
orderService
.
paySuccess
(
ary
[
0
],
nPayAmount
,
sOpenID
,
sTransTraceNO
,
sOutTradeNO
,
new
Date
());
return
Rjx
.
jsonOk
().
set
(
"list"
,
result
).
toJson
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
Rjx
.
jsonErr
().
setMessage
(
e
.
getMessage
()).
toJson
();
...
...
src/main/java/com/egolm/shop/api/service/OrderService.java
View file @
6a17fb4c
...
...
@@ -22,7 +22,7 @@ public interface OrderService {
public
String
getOrderDetail
(
String
salesOrderId
);
public
void
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
Date
dPayDateTime
);
public
List
<
Map
<
String
,
Object
>>
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
Date
dPayDateTime
);
public
String
getSubOrderDetail
(
String
subOrderID
);
...
...
src/main/java/com/egolm/shop/api/service/impl/OrderServiceImpl.java
View file @
6a17fb4c
...
...
@@ -334,7 +334,9 @@ public class OrderServiceImpl implements OrderService {
}
@Transactional
public
void
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
Date
dPayDateTime
)
{
public
List
<
Map
<
String
,
Object
>>
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
Date
dPayDateTime
)
{
List
<
Map
<
String
,
Object
>>
returnMap
=
new
ArrayList
<
Map
<
String
,
Object
>>();
Integer
nIdx
=
jdbcTemplate
.
queryForInt
(
"select ISNULL(MAX(nIdx),0) from tSalesOrderPay where sSalesOrderID = ?"
,
sSalesOrderID
);
nPayAmount
=
nPayAmount
.
multiply
(
new
BigDecimal
(
0.01
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
...
...
@@ -357,13 +359,11 @@ public class OrderServiceImpl implements OrderService {
jdbcTemplate
.
update
(
sql
,
sqlDesc
.
getArgs
());
jdbcTemplate
.
update
(
"update tSalesOrder set nOrderStatus = nOrderStatus|32 where sSalesOrderID = ?"
,
sSalesOrderID
);
try
{
jdbcTemplate
.
executeMutil
(
"exec Up_Ego_SplitOrderPrd '"
+
sSalesOrderID
+
"'"
);
}
catch
(
UncategorizedSQLException
e
)
{
if
(
e
.
getMessage
().
contains
(
"已拆单"
))
{
return
;
}
throw
e
;
returnMap
=
jdbcTemplate
.
executeMutil
(
"exec Up_Ego_SplitOrderPrd '"
+
sSalesOrderID
+
"'"
).
getDatas
().
get
(
0
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
returnMap
;
}
@Override
...
...
@@ -1155,26 +1155,9 @@ public class OrderServiceImpl implements OrderService {
}
else
if
(
OutTradeNO
.
contains
(
"_S"
))
{
String
sql
=
"exec up_CreateSettlePayCallBack '"
+
OutTradeNO
+
"' ,'"
+
TransactionID
+
"' , '"
+
PayCardNO
+
"' , '"
+
PayAmount
+
"' , '"
+
paydate
+
"' , '"
+
PayChannel
+
"' "
;
returnMap
=
jdbcTemplate
.
executeMutil
(
sql
).
getDatas
().
get
(
0
);
}
else
{
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);
}
else
{
//普通订单
String
[]
ary
=
OutTradeNO
.
split
(
"_"
,
2
);
returnMap
=
this
.
paySuccess
(
ary
[
0
],
new
BigDecimal
(
PayAmount
),
OpenID
,
TransactionID
,
OutTradeNO
,
DateUtil
.
parse
(
paydate
,
DateUtil
.
FMT_DATE_SECOND
));
}
}
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