记得上下班打卡 | 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
b491603e
Commit
b491603e
authored
Jul 19, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
aed17656
8bb6aaa3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
27 deletions
+29
-27
DragonErrorCodeEnum.java
...iquidnet/service/dragon/constant/DragonErrorCodeEnum.java
+2
-0
DragonPayBiz.java
...net/service/dragon/channel/strategy/biz/DragonPayBiz.java
+18
-0
PayChannelStrategyAlipayImpl.java
...n/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
+8
-5
WepayBiz.java
.../liquidnet/service/dragon/channel/wepay/biz/WepayBiz.java
+0
-3
AbstractWepayStrategy.java
...on/channel/wepay/strategy/impl/AbstractWepayStrategy.java
+0
-4
DragonOrdersServiceImpl.java
.../service/dragon/service/impl/DragonOrdersServiceImpl.java
+1
-15
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/constant/DragonErrorCodeEnum.java
View file @
b491603e
...
...
@@ -25,6 +25,8 @@ public enum DragonErrorCodeEnum {
TRADE_ALIPAY_SIGN_ERROR
(
"PAY0010009"
,
"支付宝签名异常!"
),
TRADE_ALIPAY_QUERY_ERROR
(
"PAY0010010"
,
"支付宝订单查询失败!"
),
TRADE_WEPAY_SIGN_ERROR
(
"PAY0020001"
,
"微信签名异常!"
);
private
String
code
;
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/biz/DragonPayBiz.java
View file @
b491603e
...
...
@@ -7,6 +7,7 @@ import com.liquidnet.service.dragon.biz.DragonServiceCommonBiz;
import
com.liquidnet.service.dragon.bo.PayNotifyReqBo
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.dto.DragonOrdersDto
;
import
com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.dto.PayNotifyDto
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.NameValuePair
;
...
...
@@ -63,6 +64,23 @@ public class DragonPayBiz {
return
payNotifyReqBo
;
}
public
DragonPayOrderQueryRespDto
buildPayOrderQueryRespDto
(
DragonOrdersDto
ordersDto
){
DragonPayOrderQueryRespDto
queryRespDto
=
new
DragonPayOrderQueryRespDto
();
queryRespDto
.
setStatus
(
ordersDto
.
getStatus
());
queryRespDto
.
setType
(
ordersDto
.
getType
());
queryRespDto
.
setCode
(
ordersDto
.
getCode
());
queryRespDto
.
setPaymentId
(
ordersDto
.
getPaymentId
());
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
;
}
// public void sendNotifyBackup(PayNotifyReqBo payNotifyReqBo){
// PayNotifyDto payNotifyDto = payNotifyReqBo.getPayNotifyDto();
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/strategy/impl/PayChannelStrategyAlipayImpl.java
View file @
b491603e
...
...
@@ -145,12 +145,15 @@ public class PayChannelStrategyAlipayImpl extends AbstractPayChannelStrategyImpl
@Override
public
DragonPayOrderQueryRespDto
checkOrderStatus
(
String
code
)
{
DragonOrdersDto
ordersDto
=
dataUtils
.
getPayOrderByCode
(
code
);
Map
<
String
,
Object
>
resultMap
=
alipayBiz
.
tradeQuery
(
code
);
DragonPayOrderQueryRespDto
respDto
=
new
DragonPayOrderQueryRespDto
();
if
(
"10000"
.
equals
(
resultMap
.
get
(
"code"
)))
{
}
else
{
DragonPayOrderQueryRespDto
respDto
=
dragonPayBiz
.
buildPayOrderQueryRespDto
(
ordersDto
);
if
(!
"10000"
.
equals
(
resultMap
.
get
(
"code"
)))
{
throw
new
LiquidnetServiceException
(
DragonErrorCodeEnum
.
TRADE_ALIPAY_QUERY_ERROR
.
getCode
(),
DragonErrorCodeEnum
.
TRADE_ALIPAY_QUERY_ERROR
.
getMessage
());
}
// 当返回状态为“TRADE_FINISHED”交易成功结束和“TRADE_SUCCESS”支付成功时更新交易状态
if
(
"TRADE_SUCCESS"
.
equals
(
resultMap
.
get
(
"tradeStatus"
))
||
"TRADE_FINISHED"
.
equals
(
resultMap
.
get
(
"tradeStatus"
)))
{
respDto
.
setStatus
(
Integer
.
valueOf
(
DragonConstant
.
PayStatusEnum
.
STATUS_PAID
.
getCode
()));
}
return
respDto
;
}
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/biz/WepayBiz.java
View file @
b491603e
...
...
@@ -9,7 +9,6 @@ import org.apache.http.client.methods.CloseableHttpResponse;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.util.EntityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
...
...
@@ -31,8 +30,6 @@ public class WepayBiz{
@Value
(
"${liquidnet.dragon.wepay.merchantId}"
)
private
String
merchantId
;
@Autowired
private
WepayBiz
wepayBiz
;
/**
* 订单查询
*
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/channel/wepay/strategy/impl/AbstractWepayStrategy.java
View file @
b491603e
...
...
@@ -4,7 +4,6 @@ import com.liquidnet.common.exception.LiquidnetServiceException;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.dragon.biz.DragonServiceCommonBiz
;
import
com.liquidnet.service.dragon.channel.strategy.biz.DragonPayBiz
;
import
com.liquidnet.service.dragon.channel.wepay.biz.WepayBiz
;
import
com.liquidnet.service.dragon.channel.wepay.constant.WepayConstant
;
import
com.liquidnet.service.dragon.channel.wepay.resp.WepayOrderQueryRespDto
;
...
...
@@ -44,9 +43,6 @@ public abstract class AbstractWepayStrategy implements IWepayStrategy {
@Autowired
private
WepayBiz
wepayBiz
;
@Autowired
private
DragonPayBiz
dragonPayBiz
;
@Autowired
private
DragonServiceCommonBiz
dragonServiceCommonBiz
;
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrdersServiceImpl.java
View file @
b491603e
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
;
...
...
@@ -58,20 +57,7 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
}
//如果已支付 直接返回结果
if
(!
ordersDto
.
getStatus
().
toString
().
equals
(
DragonConstant
.
PayStatusEnum
.
STATUS_UNPAID
.
getCode
())){
DragonPayOrderQueryRespDto
queryRespDto
=
new
DragonPayOrderQueryRespDto
();
queryRespDto
.
setStatus
(
ordersDto
.
getStatus
());
queryRespDto
.
setType
(
ordersDto
.
getType
());
queryRespDto
.
setCode
(
ordersDto
.
getCode
());
queryRespDto
.
setPaymentId
(
ordersDto
.
getPaymentId
());
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
;
return
dragonPayBiz
.
buildPayOrderQueryRespDto
(
ordersDto
);
}
//如果未支付进行三方查询
String
payType
=
DragonConstant
.
PayTypeEnum
.
getEnumByCode
(
ordersDto
.
getPaymentType
()).
getPayType
();
...
...
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