记得上下班打卡 | 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
c925b957
Commit
c925b957
authored
Jul 19, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单创建逻辑
parent
1985b78f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
DragonPayOrderQueryRespDto.java
...uidnet/service/dragon/dto/DragonPayOrderQueryRespDto.java
+1
-0
PayNotifyDto.java
...n/java/com/liquidnet/service/dragon/dto/PayNotifyDto.java
+1
-0
DragonPayBiz.java
...net/service/dragon/channel/strategy/biz/DragonPayBiz.java
+13
-3
DragonOrdersServiceImpl.java
.../service/dragon/service/impl/DragonOrdersServiceImpl.java
+6
-0
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/dto/DragonPayOrderQueryRespDto.java
View file @
c925b957
...
...
@@ -22,4 +22,5 @@ public class DragonPayOrderQueryRespDto {
private
String
orderCode
;
private
BigDecimal
price
;
private
String
paymentType
;
private
String
paymentAt
;
}
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/dto/PayNotifyDto.java
View file @
c925b957
...
...
@@ -13,4 +13,5 @@ public class PayNotifyDto {
private
String
orderCode
;
private
BigDecimal
price
;
private
String
paymentType
;
private
String
paymentAt
;
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/biz/DragonPayBiz.java
View file @
c925b957
...
...
@@ -2,7 +2,9 @@ package com.liquidnet.service.dragon.channel.strategy.biz;
import
com.alibaba.fastjson.JSON
;
import
com.liquidnet.commons.lang.util.BeanUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.dragon.bo.PayNotifyReqBo
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
...
...
@@ -148,6 +150,11 @@ public class DragonPayBiz {
payNotifyDto
.
setOrderCode
(
dragonOrdersDto
.
getOrderCode
());
payNotifyDto
.
setPrice
(
dragonOrdersDto
.
getPrice
());
payNotifyDto
.
setPaymentType
(
dragonOrdersDto
.
getPaymentType
());
if
(
StringUtil
.
isNotNull
(
dragonOrdersDto
.
getPaymentAt
())){
payNotifyDto
.
setPaymentAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
dragonOrdersDto
.
getPaymentAt
()));
}
else
{
payNotifyDto
.
setPaymentAt
(
""
);
}
payNotifyReqBo
.
setPayNotifyDto
(
payNotifyDto
);
return
payNotifyReqBo
;
}
...
...
@@ -265,7 +272,7 @@ public class DragonPayBiz {
// e.printStackTrace();
// }
// }
public
void
sendNotify
(
PayNotifyReqBo
payNotifyReqBo
){
public
boolean
sendNotify
(
PayNotifyReqBo
payNotifyReqBo
){
PayNotifyDto
payNotifyDto
=
payNotifyReqBo
.
getPayNotifyDto
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
CloseableHttpClient
httpclient
=
HttpClients
.
createDefault
();
...
...
@@ -287,6 +294,7 @@ public class DragonPayBiz {
nvps
.
add
(
new
BasicNameValuePair
(
"orderCode"
,
payNotifyDto
.
getOrderCode
()));
nvps
.
add
(
new
BasicNameValuePair
(
"price"
,
payNotifyDto
.
getPrice
().
toString
()));
nvps
.
add
(
new
BasicNameValuePair
(
"paymentType"
,
payNotifyDto
.
getPaymentType
()));
nvps
.
add
(
new
BasicNameValuePair
(
"paymentAt"
,
payNotifyDto
.
getPaymentAt
()));
jsonData
=
JSON
.
toJSONString
(
nvps
);
log
.
info
(
"dragon:notify:post url:{}"
,
payNotifyReqBo
.
getNotifyUrl
());
log
.
info
(
"dragon:notify:post data:{}"
,
jsonData
);
...
...
@@ -300,10 +308,12 @@ public class DragonPayBiz {
this
.
createDragonPayNotify
(
payNotifyReqBo
,
jsonData
);
//更新通知状态-通知成功
this
.
updateNotifyStatus
(
payNotifyDto
.
getCode
(),
Integer
.
valueOf
(
DragonConstant
.
PayNotifyStatusEnum
.
NOTIFY_SUCCESS
.
getCode
()));
return
true
;
}
else
{
this
.
createDragonPayNotifyFail
(
payNotifyReqBo
,
jsonData
);
//更新通知状态-通知失败
this
.
updateNotifyStatus
(
payNotifyDto
.
getCode
(),
Integer
.
valueOf
(
DragonConstant
.
PayNotifyStatusEnum
.
NOTIFY_FAIL
.
getCode
()));
return
false
;
}
}
catch
(
ConnectTimeoutException
e
)
{
...
...
@@ -311,13 +321,13 @@ public class DragonPayBiz {
this
.
createDragonPayNotifyFail
(
payNotifyReqBo
,
jsonData
);
//更新通知状态-通知失败
this
.
updateNotifyStatus
(
payNotifyDto
.
getCode
(),
Integer
.
valueOf
(
DragonConstant
.
PayNotifyStatusEnum
.
NOTIFY_EXPIRE
.
getCode
()));
return
false
;
}
catch
(
Exception
e
)
{
log
.
error
(
"dragon:sendNotify 请求失败"
,
e
);
this
.
createDragonPayNotifyFail
(
payNotifyReqBo
,
jsonData
);
//更新通知状态-通知失败
this
.
updateNotifyStatus
(
payNotifyDto
.
getCode
(),
Integer
.
valueOf
(
DragonConstant
.
PayNotifyStatusEnum
.
NOTIFY_FAIL
.
getCode
()));
return
false
;
}
finally
{
//释放连接
try
{
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrdersServiceImpl.java
View file @
c925b957
package
com
.
liquidnet
.
service
.
dragon
.
service
.
impl
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.ResponseDto
;
...
...
@@ -65,6 +66,11 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
queryRespDto
.
setOrderCode
(
ordersDto
.
getOrderCode
());
queryRespDto
.
setPrice
(
ordersDto
.
getPrice
());
queryRespDto
.
setPaymentType
(
ordersDto
.
getPaymentType
());
if
(
StringUtil
.
isNotNull
(
ordersDto
.
getPaymentAt
())){
queryRespDto
.
setPaymentAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
ordersDto
.
getPaymentAt
()));
}
else
{
queryRespDto
.
setPaymentAt
(
""
);
}
return
queryRespDto
;
}
//如果未支付进行三方查询
...
...
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