记得上下班打卡 | 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
b14d7ab7
Commit
b14d7ab7
authored
Jul 16, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改通知逻辑
parent
e8744462
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
DragonPayBiz.java
...net/service/dragon/channel/strategy/biz/DragonPayBiz.java
+2
-3
PayChannelStrategyAlipayImpl.java
...n/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
+4
-2
PayChannelStrategyWepayImpl.java
...on/channel/strategy/impl/PayChannelStrategyWepayImpl.java
+4
-2
sqlmap.properties
...-service-dragon-impl/src/main/resources/sqlmap.properties
+1
-1
No files found.
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/biz/DragonPayBiz.java
View file @
b14d7ab7
...
@@ -15,7 +15,6 @@ import com.liquidnet.service.dragon.utils.DataUtils;
...
@@ -15,7 +15,6 @@ import com.liquidnet.service.dragon.utils.DataUtils;
import
com.liquidnet.service.dragon.utils.MqHandleUtil
;
import
com.liquidnet.service.dragon.utils.MqHandleUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.client.ClientProtocolException
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
...
@@ -158,7 +157,7 @@ public class DragonPayBiz {
...
@@ -158,7 +157,7 @@ public class DragonPayBiz {
* @param paymentType
* @param paymentType
* @param content
* @param content
*/
*/
public
void
createDragonOrderLogs
(
String
paymentType
,
String
content
){
public
void
createDragonOrderLogs
(
String
code
,
String
paymentType
,
String
content
){
try
{
try
{
String
orderId
=
IDGenerator
.
nextTimeId
();
String
orderId
=
IDGenerator
.
nextTimeId
();
LocalDateTime
createAt
=
LocalDateTime
.
now
();
LocalDateTime
createAt
=
LocalDateTime
.
now
();
...
@@ -166,7 +165,7 @@ public class DragonPayBiz {
...
@@ -166,7 +165,7 @@ public class DragonPayBiz {
LocalDateTime
deleteAt
=
null
;
LocalDateTime
deleteAt
=
null
;
boolean
insertResult
=
mqHandleUtil
.
sendMySqlRedis
(
boolean
insertResult
=
mqHandleUtil
.
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_logs.insert"
),
SqlMapping
.
get
(
"dragon_order_logs.insert"
),
new
Object
[]{
orderId
,
paymentType
,
content
,
createAt
,
updateAt
,
deleteAt
}
new
Object
[]{
code
,
paymentType
,
content
,
createAt
,
updateAt
,
deleteAt
}
,
DragonConstant
.
MysqlRedisQueueEnum
.
DRAGON_PAY_NOTIFY_KEY
.
getCode
()
,
DragonConstant
.
MysqlRedisQueueEnum
.
DRAGON_PAY_NOTIFY_KEY
.
getCode
()
);
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
View file @
b14d7ab7
...
@@ -86,12 +86,14 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
...
@@ -86,12 +86,14 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
notifyMap
=
alipayBiz
.
parseNotifyMsg
(
requestParams
);
notifyMap
=
alipayBiz
.
parseNotifyMsg
(
requestParams
);
log
.
info
(
"dragonNotify-->alipay json : {}"
,
JSON
.
toJSONString
(
notifyMap
));
log
.
info
(
"dragonNotify-->alipay json : {}"
,
JSON
.
toJSONString
(
notifyMap
));
log
.
info
(
"接收到{}支付结果{}"
,
payType
,
notifyMap
);
log
.
info
(
"接收到{}支付结果{}"
,
payType
,
notifyMap
);
//持久化通知记录
dragonPayBiz
.
createDragonOrderLogs
(
dragonPayBiz
.
getPaymentType
(
payType
,
deviceFrom
),
JSON
.
toJSONString
(
notifyMap
));
String
returnStr
=
null
;
String
returnStr
=
null
;
String
code
=
notifyMap
.
get
(
"out_trade_no"
);
String
code
=
notifyMap
.
get
(
"out_trade_no"
);
//持久化通知记录
dragonPayBiz
.
createDragonOrderLogs
(
code
,
dragonPayBiz
.
getPaymentType
(
payType
,
deviceFrom
),
JSON
.
toJSONString
(
notifyMap
));
//退款
//退款
if
(
notifyMap
.
containsKey
(
"refund_fee"
)
||
notifyMap
.
containsKey
(
"gmt_refund"
)
||
notifyMap
.
containsKey
(
"out_biz_no"
))
{
if
(
notifyMap
.
containsKey
(
"refund_fee"
)
||
notifyMap
.
containsKey
(
"gmt_refund"
)
||
notifyMap
.
containsKey
(
"out_biz_no"
))
{
returnStr
=
dragonOrderRefundsService
.
aliPayRefundCallBack
(
JSON
.
toJSONString
(
notifyMap
));
returnStr
=
dragonOrderRefundsService
.
aliPayRefundCallBack
(
JSON
.
toJSONString
(
notifyMap
));
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyWepayImpl.java
View file @
b14d7ab7
...
@@ -73,11 +73,13 @@ public class PayChannelStrategyWepayImpl extends AbstractPayChannelStrategyImpl
...
@@ -73,11 +73,13 @@ public class PayChannelStrategyWepayImpl extends AbstractPayChannelStrategyImpl
notifyMap
=
PayWepayUtils
.
parseXml
(
inputStream
);
notifyMap
=
PayWepayUtils
.
parseXml
(
inputStream
);
log
.
info
(
"dragonNotify-->wepay json : {}"
,
JSON
.
toJSONString
(
notifyMap
));
log
.
info
(
"dragonNotify-->wepay json : {}"
,
JSON
.
toJSONString
(
notifyMap
));
//持久化通知记录
dragonPayBiz
.
createDragonOrderLogs
(
dragonPayBiz
.
getPaymentType
(
payType
,
deviceFrom
),
JSON
.
toJSONString
(
notifyMap
));
log
.
info
(
"接收到{}支付结果{}"
,
payType
,
notifyMap
);
log
.
info
(
"接收到{}支付结果{}"
,
payType
,
notifyMap
);
String
code
=
notifyMap
.
get
(
"out_trade_no"
);
String
code
=
notifyMap
.
get
(
"out_trade_no"
);
//持久化通知记录
dragonPayBiz
.
createDragonOrderLogs
(
code
,
dragonPayBiz
.
getPaymentType
(
payType
,
deviceFrom
),
JSON
.
toJSONString
(
notifyMap
));
// 根据银行订单号获取支付信息
// 根据银行订单号获取支付信息
DragonOrdersDto
dragonOrdersDto
=
dataUtils
.
getPayOrderByCode
(
code
);
DragonOrdersDto
dragonOrdersDto
=
dataUtils
.
getPayOrderByCode
(
code
);
if
(
dragonOrdersDto
==
null
)
{
if
(
dragonOrdersDto
==
null
)
{
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/resources/sqlmap.properties
View file @
b14d7ab7
...
@@ -9,7 +9,7 @@ dragon_order_refund_log.insert=INSERT INTO `dragon_order_refund_logs`(`order_ref
...
@@ -9,7 +9,7 @@ dragon_order_refund_log.insert=INSERT INTO `dragon_order_refund_logs`(`order_ref
dragon_orders.insert
=
insert into dragon_orders(order_id, status, code, type, price, name, detail, order_code, client_ip, notify_url, payment_type, payment_id, payment_at, finished_at, created_at, updated_at, deleted_at) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
dragon_orders.insert
=
insert into dragon_orders(order_id, status, code, type, price, name, detail, order_code, client_ip, notify_url, payment_type, payment_id, payment_at, finished_at, created_at, updated_at, deleted_at) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
dragon_order_logs.insert
=
insert into dragon_order_logs(
order_id
, payment_type, content, created_at, updated_at, deleted_at) values(?,?,?,?,?,?)
dragon_order_logs.insert
=
insert into dragon_order_logs(
code
, payment_type, content, created_at, updated_at, deleted_at) values(?,?,?,?,?,?)
dragon_pay_notify.insert
=
insert into dragon_pay_notify (code, order_code, notify_url, notify_data, created_at, updated_at) values(?,?,?,?,?,?)
dragon_pay_notify.insert
=
insert into dragon_pay_notify (code, order_code, notify_url, notify_data, created_at, updated_at) values(?,?,?,?,?,?)
dragon_pay_notify_fail.insert
=
insert into dragon_pay_notify_fail (code, order_code, notify_url, notify_data, fail_desc, created_at, updated_at) values(?,?,?,?,?,?,?)
dragon_pay_notify_fail.insert
=
insert into dragon_pay_notify_fail (code, order_code, notify_url, notify_data, fail_desc, created_at, updated_at) values(?,?,?,?,?,?,?)
...
...
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