记得上下班打卡 | 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
79ce155f
Commit
79ce155f
authored
Apr 11, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重复效验问题
parent
e3b59772
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
DragonConstant.java
...com/liquidnet/service/dragon/constant/DragonConstant.java
+1
-0
DragonOrdersServiceImpl.java
.../service/dragon/service/impl/DragonOrdersServiceImpl.java
+6
-0
DataUtils.java
...in/java/com/liquidnet/service/dragon/utils/DataUtils.java
+8
-0
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/constant/DragonConstant.java
View file @
79ce155f
...
@@ -24,6 +24,7 @@ public class DragonConstant {
...
@@ -24,6 +24,7 @@ public class DragonConstant {
public
static
final
String
REFUND_REDIS_KET
=
"dragon:refund:refundCode:"
;
// 订单号对应回调地址
public
static
final
String
REFUND_REDIS_KET
=
"dragon:refund:refundCode:"
;
// 订单号对应回调地址
public
static
final
String
ORDERCODE_REDIS_KET
=
"dragon:refund:orderCode:"
;
// 退款订单号对应 支付订单号
public
static
final
String
ORDERCODE_REDIS_KET
=
"dragon:refund:orderCode:"
;
// 退款订单号对应 支付订单号
public
static
final
String
REDIS_KET_PAY_CODE
=
"dragon:pay:code:"
;
// 支付流水号
public
static
final
String
REDIS_KET_PAY_CODE
=
"dragon:pay:code:"
;
// 支付流水号
public
static
final
String
REDIS_KET_ORDERCODE_PAY_CODE
=
"dragon:ordercode:pay:code:"
;
// 支付流水号
public
enum
PayChannelEnum
{
public
enum
PayChannelEnum
{
ALIPAY
(
"alipay"
,
"支付宝"
),
ALIPAY
(
"alipay"
,
"支付宝"
),
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrdersServiceImpl.java
View file @
79ce155f
...
@@ -118,6 +118,11 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
...
@@ -118,6 +118,11 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
String
transaction_id
=
in_appJson
.
getString
(
"transaction_id"
);
// 订单号
String
transaction_id
=
in_appJson
.
getString
(
"transaction_id"
);
// 订单号
//如果单号一致 则开始处理逻辑
//如果单号一致 则开始处理逻辑
if
(
dragonPayBaseReqDto
.
getTransactionId
().
equals
(
transaction_id
)){
if
(
dragonPayBaseReqDto
.
getTransactionId
().
equals
(
transaction_id
)){
//判断是已经查过了。
DragonPayBaseRespDto
dragonPayBaseRespDto
=
dataUtils
.
getDragonPayBaseRespDto
(
dragonPayBaseReqDto
.
getOrderCode
());
if
(
null
!=
dragonPayBaseRespDto
){
return
dragonPayBaseRespDto
;
}
/*String[] moneys = product_id.split("\\.");//实际支付金额*/
/*String[] moneys = product_id.split("\\.");//实际支付金额*/
//此处开始业务逻辑
//此处开始业务逻辑
//2 插入支付该支付的东西(预支付的东西)//dragon_orders
//2 插入支付该支付的东西(预支付的东西)//dragon_orders
...
@@ -130,6 +135,7 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
...
@@ -130,6 +135,7 @@ public class DragonOrdersServiceImpl implements IDragonOrdersService {
//
//
DragonPayBaseRespDto
respDto
=
buildCommonRespDto
(
dragonPayBaseReqDto
);
DragonPayBaseRespDto
respDto
=
buildCommonRespDto
(
dragonPayBaseReqDto
);
respDto
.
setProductId
(
product_id
);
respDto
.
setProductId
(
product_id
);
dataUtils
.
createAPPLePayOrder
(
dragonPayBaseReqDto
.
getOrderCode
(),
respDto
);
return
respDto
;
return
respDto
;
}
}
}
else
{
}
else
{
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/utils/DataUtils.java
View file @
79ce155f
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.dragon.utils;
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.dragon.utils;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.constant.DragonConstant
;
import
com.liquidnet.service.dragon.dto.DragonOrdersDto
;
import
com.liquidnet.service.dragon.dto.DragonOrdersDto
;
import
com.liquidnet.service.dragon.dto.DragonPayBaseRespDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -16,6 +17,13 @@ public class DataUtils {
...
@@ -16,6 +17,13 @@ public class DataUtils {
public
void
createPayOrder
(
String
code
,
DragonOrdersDto
ordersDto
)
{
public
void
createPayOrder
(
String
code
,
DragonOrdersDto
ordersDto
)
{
redisUtil
.
set
(
DragonConstant
.
REDIS_KET_PAY_CODE
+
code
,
ordersDto
,
keyExpireTime
);
redisUtil
.
set
(
DragonConstant
.
REDIS_KET_PAY_CODE
+
code
,
ordersDto
,
keyExpireTime
);
}
}
public
void
createAPPLePayOrder
(
String
orderCode
,
DragonPayBaseRespDto
dragonPayBaseRespDto
)
{
redisUtil
.
set
(
DragonConstant
.
REDIS_KET_ORDERCODE_PAY_CODE
+
orderCode
,
dragonPayBaseRespDto
,
keyExpireTime
);
}
public
DragonPayBaseRespDto
getDragonPayBaseRespDto
(
String
orderCode
){
return
(
DragonPayBaseRespDto
)
redisUtil
.
get
(
DragonConstant
.
REDIS_KET_ORDERCODE_PAY_CODE
+
orderCode
);
}
public
DragonOrdersDto
getPayOrderByCode
(
String
code
)
{
public
DragonOrdersDto
getPayOrderByCode
(
String
code
)
{
Object
obj
=
redisUtil
.
get
(
DragonConstant
.
REDIS_KET_PAY_CODE
+
code
);
Object
obj
=
redisUtil
.
get
(
DragonConstant
.
REDIS_KET_PAY_CODE
+
code
);
...
...
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