Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fzm-joying
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
lei
fzm-joying
Commits
d1881a4b
Commit
d1881a4b
authored
Feb 10, 2022
by
tangtuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增查询发行中的nft的接口
parent
a628a19d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
0 deletions
+33
-0
NftService.java
...mmon/src/main/java/com/fzm/common/service/NftService.java
+8
-0
NftServiceImpl.java
...main/java/com/fzm/common/service/impl/NftServiceImpl.java
+11
-0
NftController.java
...rc/main/java/com/fzm/portal/controller/NftController.java
+5
-0
OrderListener.java
.../src/main/java/com/fzm/portal/listener/OrderListener.java
+9
-0
logback.2022-02-10.0.log
logs/logback.2022-02-10.0.log
+0
-0
No files found.
joying-common/src/main/java/com/fzm/common/service/NftService.java
View file @
d1881a4b
...
@@ -183,6 +183,14 @@ public interface NftService extends IService<Nft> {
...
@@ -183,6 +183,14 @@ public interface NftService extends IService<Nft> {
*/
*/
void
delete
(
Integer
id
);
void
delete
(
Integer
id
);
/**
* 获取当前用户正在发行中的nft列表
* @return
*/
List
<
Nft
>
getPublishingList
();
// void republish();
// void republish();
}
}
joying-common/src/main/java/com/fzm/common/service/impl/NftServiceImpl.java
View file @
d1881a4b
...
@@ -258,6 +258,17 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
...
@@ -258,6 +258,17 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
this
.
removeById
(
id
);
this
.
removeById
(
id
);
}
}
@Override
public
List
<
Nft
>
getPublishingList
()
{
String
token
=
request
.
getHeader
(
"Authorization"
);
Integer
userId
=
JwtUtil
.
getUserIdFromToken
(
token
);
QueryWrapper
<
Nft
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"user_id"
,
userId
).
eq
(
"publish_status"
,
PublishStatus
.
PUBLISHING
.
getCode
()).
orderByDesc
(
"publish_time"
);
return
this
.
list
(
queryWrapper
);
}
// @Override
// @Override
// public void republish() {
// public void republish() {
// List<Nft> nfts = nftMapper.get();
// List<Nft> nfts = nftMapper.get();
...
...
joying-portal/src/main/java/com/fzm/portal/controller/NftController.java
View file @
d1881a4b
...
@@ -195,4 +195,9 @@ public class NftController {
...
@@ -195,4 +195,9 @@ public class NftController {
return
ResponseModel
.
success
(
nftService
.
getById
(
id
));
return
ResponseModel
.
success
(
nftService
.
getById
(
id
));
}
}
@GetMapping
(
"/publishing-list"
)
@ApiOperation
(
value
=
"获取当前用户正在发行中的nft列表"
)
public
ResponseModel
<
List
<
Nft
>>
getPublishingList
()
{
return
ResponseModel
.
success
(
nftService
.
getPublishingList
());
}
}
}
joying-portal/src/main/java/com/fzm/portal/listener/OrderListener.java
View file @
d1881a4b
package
com
.
fzm
.
portal
.
listener
;
package
com
.
fzm
.
portal
.
listener
;
import
com.fzm.common.entity.Nft
;
import
com.fzm.common.entity.dto.OrderProcessMsg
;
import
com.fzm.common.entity.dto.OrderProcessMsg
;
import
com.fzm.common.enums.CopyrightApplyState
;
import
com.fzm.common.enums.CopyrightApplyState
;
import
com.fzm.common.enums.PayScene
;
import
com.fzm.common.enums.PayScene
;
import
com.fzm.common.enums.PublishStatus
;
import
com.fzm.common.enums.RefundLaunchChannel
;
import
com.fzm.common.enums.RefundLaunchChannel
;
import
com.fzm.common.service.CopyrightApplyService
;
import
com.fzm.common.service.CopyrightApplyService
;
import
com.fzm.common.service.NftService
;
import
com.fzm.common.service.NftService
;
...
@@ -45,6 +47,13 @@ public class OrderListener {
...
@@ -45,6 +47,13 @@ public class OrderListener {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
// 处理失败,需要主动发起退款
// 处理失败,需要主动发起退款
wxPayService
.
refund
(
msg
.
getOrderId
(),
RefundLaunchChannel
.
USER
.
getCode
());
wxPayService
.
refund
(
msg
.
getOrderId
(),
RefundLaunchChannel
.
USER
.
getCode
());
// nft发行时发生异常,则需要把nft的状态改成发行失败
if
(
msg
.
getPayScene
().
equals
(
PayScene
.
NFT
.
getCode
()))
{
Nft
nft
=
new
Nft
();
nft
.
setId
(
msg
.
getProductId
());
nft
.
setPublishStatus
(
PublishStatus
.
FAILED
.
getCode
());
nftService
.
updateById
(
nft
);
}
}
}
}
}
...
...
logs/logback.2022-02-10.0.log
0 → 100644
View file @
d1881a4b
This diff is collapsed.
Click to expand it.
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