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
aa5a62be
Commit
aa5a62be
authored
Dec 22, 2021
by
tangtuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
a6c50668
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
15 deletions
+23
-15
CopyrightApply.java
...n/src/main/java/com/fzm/common/entity/CopyrightApply.java
+3
-0
CopyrightApplyVo.java
.../main/java/com/fzm/common/entity/vo/CopyrightApplyVo.java
+1
-1
CopyrightApplyServiceImpl.java
...om/fzm/common/service/impl/CopyrightApplyServiceImpl.java
+4
-1
CopyrightApplyMapper.xml
...common/src/main/resources/mapper/CopyrightApplyMapper.xml
+5
-3
NftMapper.xml
joying-common/src/main/resources/mapper/NftMapper.xml
+8
-10
NftController.java
...rc/main/java/com/fzm/portal/controller/NftController.java
+2
-0
No files found.
joying-common/src/main/java/com/fzm/common/entity/CopyrightApply.java
View file @
aa5a62be
...
...
@@ -83,6 +83,9 @@ public class CopyrightApply {
@ApiModelProperty
(
value
=
"权力归属证明材料的文件地址"
)
private
String
authorityAscriptionProve
;
@ApiModelProperty
(
value
=
"申请时间"
)
private
Date
applyTime
;
@ApiModelProperty
(
value
=
"登记状态 0-待审核 1-登记成功 2-审核失败"
)
private
Integer
registerState
;
...
...
joying-common/src/main/java/com/fzm/common/entity/vo/CopyrightApplyVo.java
View file @
aa5a62be
...
...
@@ -43,7 +43,7 @@ public class CopyrightApplyVo {
private
Integer
registerState
;
@ApiModelProperty
(
value
=
"申请时间"
)
private
Date
createDat
e
;
private
Date
applyTim
e
;
}
joying-common/src/main/java/com/fzm/common/service/impl/CopyrightApplyServiceImpl.java
View file @
aa5a62be
...
...
@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ExecutionException
;
...
...
@@ -97,6 +98,7 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
// 首次提交,登记状态为待提交
copyrightApply
.
setRegisterState
(
CopyrightApplyState
.
TO_BE_REVIEWED
.
getCode
());
copyrightApply
.
setUserId
(
user
.
getId
());
copyrightApply
.
setApplyTime
(
new
Date
());
save
(
copyrightApply
);
// 保存附件
ArrayList
<
CopyrightFile
>
files
=
new
ArrayList
<>();
...
...
@@ -266,6 +268,7 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
}
copyrightApplyOwnerRelationService
.
saveBatch
(
owners
);
}
copyrightApply
.
setApplyTime
(
new
Date
());
copyrightApply
.
setRegisterState
(
CopyrightApplyState
.
TO_BE_REVIEWED
.
getCode
());
return
updateById
(
copyrightApply
);
}
...
...
@@ -315,7 +318,7 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
String
json
=
JSONUtil
.
toJsonStr
(
copyrightRequest
);
log
.
info
(
"请求版权局接口, 请求参数:{}"
,
json
);
String
response
=
HttpUtil
.
post
(
"https://p.yareiot.com/ccct/api/copyright/create"
,
json
,
10000
);
log
.
info
(
"版权局响应内容:{}"
,
response
);
log
.
info
(
"版权局响应内容:{}"
,
response
);
if
(
StringUtils
.
isBlank
(
response
))
{
throw
GlobalException
.
newException
(
ResultCode
.
COPYRIGHT_FAILED
,
"版权局接口无响应,请稍后重试"
);
}
...
...
joying-common/src/main/resources/mapper/CopyrightApplyMapper.xml
View file @
aa5a62be
...
...
@@ -22,7 +22,7 @@
c.register_state,
c.opus_name,
c.nft_hash,
c.
create_dat
e,
c.
apply_tim
e,
u.nickname,
u.telephone
FROM tb_copyright_apply c
...
...
@@ -39,11 +39,12 @@
and c.register_state = #{registerState}
</if>
<if
test=
"startDate != null"
>
and c.
create_dat
e >= #{startDate}
and c.
apply_tim
e >= #{startDate}
</if>
<if
test=
"endDate != null"
>
and c.
create_dat
e
<
= #{endDate}
and c.
apply_tim
e
<
= #{endDate}
</if>
</where>
order by c.apply_time desc
</select>
</mapper>
\ No newline at end of file
joying-common/src/main/resources/mapper/NftMapper.xml
View file @
aa5a62be
...
...
@@ -89,20 +89,17 @@
order by a.publish_time desc
</select>
<select
id=
"listCopyright"
resultType=
"com.fzm.common.entity.vo.CollectionNftVo"
>
select
a.id,
a.
name
,
SELECT
a.id,
a.
NAME
,
a.cover,
a.nft_id,
a.nft_hash,
a.file_url,
a.is_commemorate,
b.category_name as category
from tb_nft a
left join tb_category b on a.category_id = b.id
where a.user_id = #{userId}
and a.nft_hash != ''
and nft_hash not in (select nft_hash from tb_copyright_apply where user_id = #{userId}
and register_state in (2, 4))
a.is_commemorate
FROM tb_nft a
WHERE a.user_id = #{userId}
AND a.nft_hash != ''
AND nft_hash NOT IN ( SELECT nft_hash FROM tb_copyright_apply WHERE user_id = #{userId} AND register_state IN ( 0, 2, 4 ) )
</select>
</mapper>
\ No newline at end of file
joying-portal/src/main/java/com/fzm/portal/controller/NftController.java
View file @
aa5a62be
...
...
@@ -202,6 +202,8 @@ public class NftController {
return
ResponseModel
.
success
(
result
);
}
@Authentication
@ApiOperation
(
value
=
"查询用户还未成功申请版权的nft列表"
)
@GetMapping
(
value
=
"/list/copyright"
)
public
ResponseModel
<
List
<
CollectionNftVo
>>
listCopyright
(
@RequestHeader
(
value
=
"Authorization"
)
String
token
){
Integer
userId
=
JwtUtil
.
getUserIdFromToken
(
token
);
...
...
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