记得上下班打卡 | 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
9701224c
Commit
9701224c
authored
Jun 20, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nft:order查询订单状态 services调用
parent
eed02880
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
pom.xml
liquidnet-bus-api/liquidnet-service-goblin-api/pom.xml
+5
-0
GoblinNftOrderPayCallbackParam.java
.../service/goblin/param/GoblinNftOrderPayCallbackParam.java
+15
-0
GoblinNftOrderServiceImpl.java
...service/order/service/impl/GoblinNftOrderServiceImpl.java
+13
-7
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/pom.xml
View file @
9701224c
...
@@ -27,6 +27,11 @@
...
@@ -27,6 +27,11 @@
<artifactId>
easyexcel
</artifactId>
<artifactId>
easyexcel
</artifactId>
<version>
3.0.5
</version>
<version>
3.0.5
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.liquidnet
</groupId>
<artifactId>
liquidnet-service-dragon-api
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/param/GoblinNftOrderPayCallbackParam.java
View file @
9701224c
package
com
.
liquidnet
.
service
.
goblin
.
param
;
package
com
.
liquidnet
.
service
.
goblin
.
param
;
import
com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -46,4 +47,18 @@ public class GoblinNftOrderPayCallbackParam implements Cloneable {
...
@@ -46,4 +47,18 @@ public class GoblinNftOrderPayCallbackParam implements Cloneable {
return
new
GoblinNftOrderPayCallbackParam
();
return
new
GoblinNftOrderPayCallbackParam
();
}
}
}
}
public
GoblinNftOrderPayCallbackParam
copy
(
DragonPayOrderQueryRespDto
source
)
{
if
(
null
==
source
)
return
this
;
this
.
setStatus
(
source
.
getStatus
());
// this.setOrderId(source.getOrderCodeId());
this
.
setOrderCode
(
source
.
getOrderCode
());
this
.
setCode
(
source
.
getCode
());
this
.
setPrice
(
source
.
getPrice
());
this
.
setType
(
source
.
getType
());
this
.
setPaymentId
(
source
.
getPaymentId
());
this
.
setPaymentType
(
source
.
getPaymentType
());
this
.
setPaymentAt
(
source
.
getPaymentAt
());
return
this
;
}
}
}
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinNftOrderServiceImpl.java
View file @
9701224c
...
@@ -7,6 +7,8 @@ import com.liquidnet.service.base.ResponseDto;
...
@@ -7,6 +7,8 @@ import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.base.UserPathDto
;
import
com.liquidnet.service.base.UserPathDto
;
import
com.liquidnet.service.base.constant.MQConst
;
import
com.liquidnet.service.base.constant.MQConst
;
import
com.liquidnet.service.dragon.dto.DragonPayOrderQueryRespDto
;
import
com.liquidnet.service.dragon.service.IDragonOrdersService
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.constant.GoblinStatusConst
;
import
com.liquidnet.service.goblin.constant.GoblinStatusConst
;
import
com.liquidnet.service.goblin.constant.NftAccStatusEnum
;
import
com.liquidnet.service.goblin.constant.NftAccStatusEnum
;
...
@@ -51,11 +53,13 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
...
@@ -51,11 +53,13 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
GoblinOrderUtils
goblinOrderUtils
;
GoblinOrderUtils
goblinOrderUtils
;
@Autowired
@Autowired
GoblinNftOrderUtils
nftOrderUtils
;
GoblinNftOrderUtils
nftOrderUtils
;
@Autowired
private
IDragonOrdersService
dragonOrdersService
;
@Value
(
"${liquidnet.service.order.url-pay.pay}"
)
@Value
(
"${liquidnet.service.order.url-pay.pay}"
)
private
String
payUrl
;
private
String
payUrl
;
@Value
(
"${liquidnet.service.order.url-pay.check}"
)
/*
@Value("${liquidnet.service.order.url-pay.check}")
private
String
checkUrl
;
private String checkUrl;
*/
@Value
(
"${liquidnet.service.order.url-pay.nftPayNotify}"
)
@Value
(
"${liquidnet.service.order.url-pay.nftPayNotify}"
)
private
String
synUrl
;
private
String
synUrl
;
...
@@ -502,7 +506,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
...
@@ -502,7 +506,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
orderVo
.
setCreatedAt
(
nftOrder
.
getCreatedAt
());
orderVo
.
setCreatedAt
(
nftOrder
.
getCreatedAt
());
// 待支付发送队列
// 待支付发送队列
queueUtils
.
sendMsgByRedisGoblinStock
(
orderVo
.
getOrderId
(),
nftOrder
.
getCreatedAt
(),
"NFT"
,
5
);
queueUtils
.
sendMsgByRedisGoblinStock
(
orderVo
.
getOrderId
(),
nftOrder
.
getCreatedAt
(),
"NFT"
,
5
);
// redis 订单详情
// redis 订单详情
nftOrderUtils
.
setNftOrder
(
orderVo
);
nftOrderUtils
.
setNftOrder
(
orderVo
);
...
@@ -624,12 +628,14 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
...
@@ -624,12 +628,14 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
if
(
null
==
nftOrder
||
!
nftOrder
.
getUserId
().
equals
(
uid
))
{
if
(
null
==
nftOrder
||
!
nftOrder
.
getUserId
().
equals
(
uid
))
{
return
ResponseDto
.
failure
(
"订单不存在"
);
return
ResponseDto
.
failure
(
"订单不存在"
);
}
else
{
}
else
{
String
returnCheckData
=
HttpUtil
.
get
(
checkUrl
+
"?code="
+
nftOrder
.
getPayCode
(),
null
);
/*
String returnCheckData = HttpUtil.get(checkUrl + "?code=" + nftOrder.getPayCode(), null);
ResponseDto<GoblinNftOrderPayCallbackParam> syncOrderDtoParam = JsonUtils.fromJson(returnCheckData, new TypeReference<ResponseDto<GoblinNftOrderPayCallbackParam>>() {
ResponseDto<GoblinNftOrderPayCallbackParam> syncOrderDtoParam = JsonUtils.fromJson(returnCheckData, new TypeReference<ResponseDto<GoblinNftOrderPayCallbackParam>>() {
});
});*/
if
(
syncOrderDtoParam
.
getData
().
getStatus
()
==
1
)
{
DragonPayOrderQueryRespDto
respDto
=
dragonOrdersService
.
checkOrderStatusByCode
(
nftOrder
.
getPayCode
());
if
(
respDto
.
getStatus
()
==
1
)
{
//处理订单
//处理订单
syncOrder
(
syncOrderDtoParam
.
getData
());
GoblinNftOrderPayCallbackParam
goblinNftOrderPayCallbackParam
=
GoblinNftOrderPayCallbackParam
.
getNew
().
copy
(
respDto
);
syncOrder
(
goblinNftOrderPayCallbackParam
);
return
ResponseDto
.
success
(
1
);
return
ResponseDto
.
success
(
1
);
}
else
{
}
else
{
return
ResponseDto
.
success
(
0
);
return
ResponseDto
.
success
(
0
);
...
...
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