记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
4e0fb890
Commit
4e0fb890
authored
Jul 21, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化支付代码
parent
63d24048
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
AlipayBiz.java
...iquidnet/service/dragon/channel/alipay/biz/AlipayBiz.java
+15
-3
ObjectUtil.java
...n/java/com/liquidnet/service/dragon/utils/ObjectUtil.java
+5
-0
No files found.
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/alipay/biz/AlipayBiz.java
View file @
4e0fb890
...
@@ -66,9 +66,21 @@ public class AlipayBiz{
...
@@ -66,9 +66,21 @@ public class AlipayBiz{
// response.setSubCode("ACQ.TRADE_HAS_SUCCESS");
// response.setSubCode("ACQ.TRADE_HAS_SUCCESS");
log
.
info
(
"alipay-alipayClient.sdkExecut->耗时:{}"
,(
System
.
currentTimeMillis
()
-
startTime
)+
"毫秒"
);
log
.
info
(
"alipay-alipayClient.sdkExecut->耗时:{}"
,(
System
.
currentTimeMillis
()
-
startTime
)+
"毫秒"
);
// JSONObject responseJSON = JSONObject.parseObject(JSONObject.toJSONString(response));
// Map<String,Object> responseJSON = JsonUtils.OM().convertValue(response,Map.class);
Map
<
String
,
Object
>
responseJSON
=
JsonUtils
.
OM
().
convertValue
(
response
,
Map
.
class
);
Map
<
String
,
Object
>
responseJSON
=
ObjectUtil
.
cloneHashMapStringAndObj
();
log
.
info
(
"AlipayUtil-->tradeWapPay-->支付宝返回结果:{}"
,
JsonUtils
.
toJson
(
response
));
responseJSON
.
put
(
"code"
,
response
.
getCode
());
responseJSON
.
put
(
"msg"
,
response
.
getMsg
());
responseJSON
.
put
(
"subCode"
,
response
.
getSubCode
());
responseJSON
.
put
(
"subMsg"
,
response
.
getSubMsg
());
responseJSON
.
put
(
"body"
,
response
.
getBody
());
responseJSON
.
put
(
"merchantOrderNo"
,
response
.
getMerchantOrderNo
());
responseJSON
.
put
(
"outTradeNo"
,
response
.
getOutTradeNo
());
responseJSON
.
put
(
"sellerId"
,
response
.
getSellerId
());
responseJSON
.
put
(
"totalAmount"
,
response
.
getTotalAmount
());
responseJSON
.
put
(
"tradeNo"
,
response
.
getTradeNo
());
startTime
=
System
.
currentTimeMillis
();
// log.info("AlipayUtil-->tradeWapPay-->支付宝返回结果:{}", JsonUtils.toJson(response));
log
.
info
(
"AlipayUtil-->tradeWapPay-->支付宝返回结果 耗时:{}"
,(
System
.
currentTimeMillis
()
-
startTime
)+
"毫秒"
);
return
responseJSON
;
return
responseJSON
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"支付宝支付异常:{}"
,
e
);
log
.
error
(
"支付宝支付异常:{}"
,
e
);
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/utils/ObjectUtil.java
View file @
4e0fb890
...
@@ -20,6 +20,7 @@ public class ObjectUtil {
...
@@ -20,6 +20,7 @@ public class ObjectUtil {
private
static
final
LinkedList
<
Object
[]>
linkedListObj
=
new
LinkedList
<
Object
[]>();
private
static
final
LinkedList
<
Object
[]>
linkedListObj
=
new
LinkedList
<
Object
[]>();
private
static
final
LinkedList
<
String
>
linkedListStr
=
new
LinkedList
<
String
>();
private
static
final
LinkedList
<
String
>
linkedListStr
=
new
LinkedList
<
String
>();
private
static
final
HashMap
<
String
,
String
>
hashMapStringAndString
=
new
HashMap
<>();
private
static
final
HashMap
<
String
,
String
>
hashMapStringAndString
=
new
HashMap
<>();
private
static
final
HashMap
<
String
,
Object
>
hashMapStringAndObj
=
new
HashMap
<>();
private
static
final
AlipayTradeWapPayRequest
alipayTradeWapPayRequest
=
new
AlipayTradeWapPayRequest
();
private
static
final
AlipayTradeWapPayRequest
alipayTradeWapPayRequest
=
new
AlipayTradeWapPayRequest
();
private
static
final
JSONObject
jsonObjectObj
=
new
JSONObject
();
private
static
final
JSONObject
jsonObjectObj
=
new
JSONObject
();
...
@@ -35,6 +36,10 @@ public class ObjectUtil {
...
@@ -35,6 +36,10 @@ public class ObjectUtil {
return
(
HashMap
<
String
,
String
>)
hashMapStringAndString
.
clone
();
return
(
HashMap
<
String
,
String
>)
hashMapStringAndString
.
clone
();
}
}
public
static
HashMap
<
String
,
Object
>
cloneHashMapStringAndObj
()
{
return
(
HashMap
<
String
,
Object
>)
hashMapStringAndObj
.
clone
();
}
public
static
AlipayTradeWapPayRequest
cloneAlipayTradeWapPayRequest
()
{
public
static
AlipayTradeWapPayRequest
cloneAlipayTradeWapPayRequest
()
{
return
alipayTradeWapPayRequest
;
return
alipayTradeWapPayRequest
;
}
}
...
...
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