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
2d5a7bd9
Commit
2d5a7bd9
authored
Jan 06, 2022
by
tangtuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
285550b0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
18 deletions
+36
-18
CopyrightLister.java
...src/main/java/com/fzm/admin/listener/CopyrightLister.java
+11
-2
CopyrightApplyState.java
...c/main/java/com/fzm/common/enums/CopyrightApplyState.java
+6
-4
CopyrightApplyServiceImpl.java
...om/fzm/common/service/impl/CopyrightApplyServiceImpl.java
+7
-6
DraftServiceImpl.java
...in/java/com/fzm/common/service/impl/DraftServiceImpl.java
+4
-4
CopyrightApplyController.java
...a/com/fzm/portal/controller/CopyrightApplyController.java
+1
-1
joying.sql
sql/joying.sql
+7
-1
No files found.
joying-admin/src/main/java/com/fzm/admin/listener/CopyrightLister.java
View file @
2d5a7bd9
...
@@ -100,12 +100,20 @@ public class CopyrightLister {
...
@@ -100,12 +100,20 @@ public class CopyrightLister {
return
;
return
;
}
}
try
{
try
{
CopyrightApply
copyrightApply
=
copyrightApplyService
.
getBySerialNum
(
serial_code
);
//审核状态(0:未提交,1:待审核,2:同意,3:驳回,4:已提交,5:待终审,6:审核通过)
//审核状态(0:未提交,1:待审核,2:同意,3:驳回,4:已提交,5:待终审,6:审核通过)
if
(!
copyrightResponse
.
getAudit_status
().
equals
(
3
)
&&
!
copyrightResponse
.
getAudit_status
().
equals
(
6
))
{
if
(!
copyrightResponse
.
getAudit_status
().
equals
(
3
)
&&
!
copyrightResponse
.
getAudit_status
().
equals
(
6
))
{
// 审核中, 需要把当前流水号丢进死信队列, 6小时后再去查询
if
(
copyrightResponse
.
getAudit_status
().
equals
(
1
))
{
// 待审核
copyrightApply
.
setRegisterState
(
CopyrightApplyState
.
EXAMINE
.
getCode
());
}
else
if
(
copyrightResponse
.
getAudit_status
().
equals
(
5
))
{
// 待终审
copyrightApply
.
setRegisterState
(
CopyrightApplyState
.
FINAL_JUDGMENT
.
getCode
());
}
// 审核还未完成, 需要把当前流水号丢进死信队列, 6小时后再去查询
rabbitTemplate
.
convertAndSend
(
RabbitMQConfig
.
COPYRIGHT_DIRECT
,
"copyright.apply"
,
serial_code
);
rabbitTemplate
.
convertAndSend
(
RabbitMQConfig
.
COPYRIGHT_DIRECT
,
"copyright.apply"
,
serial_code
);
}
else
{
}
else
{
CopyrightApply
copyrightApply
=
copyrightApplyService
.
getBySerialNum
(
serial_code
);
if
(
copyrightResponse
.
getAudit_status
().
equals
(
6
))
{
if
(
copyrightResponse
.
getAudit_status
().
equals
(
6
))
{
// 审核成功
// 审核成功
String
nftHash
=
copyrightApply
.
getNftHash
();
String
nftHash
=
copyrightApply
.
getNftHash
();
...
@@ -131,6 +139,7 @@ public class CopyrightLister {
...
@@ -131,6 +139,7 @@ public class CopyrightLister {
// copyrightApply.setEvidenceHash(realTxHash);
// copyrightApply.setEvidenceHash(realTxHash);
}
else
{
}
else
{
// 审核失败
// 审核失败
copyrightApply
.
setRejectReason
(
copyrightResponse
.
getRemark
());
copyrightApply
.
setRegisterState
(
CopyrightApplyState
.
FAILED
.
getCode
());
copyrightApply
.
setRegisterState
(
CopyrightApplyState
.
FAILED
.
getCode
());
}
}
copyrightApplyService
.
updateById
(
copyrightApply
);
copyrightApplyService
.
updateById
(
copyrightApply
);
...
...
joying-common/src/main/java/com/fzm/common/enums/CopyrightApplyState.java
View file @
2d5a7bd9
...
@@ -14,11 +14,13 @@ import lombok.ToString;
...
@@ -14,11 +14,13 @@ import lombok.ToString;
public
enum
CopyrightApplyState
{
public
enum
CopyrightApplyState
{
WITHDRAW
(-
1
,
"已撤回"
,
""
),
WITHDRAW
(-
1
,
"已撤回"
,
""
),
TO_BE_REVIEWED
(
0
,
"待
审核
"
,
""
),
TO_BE_REVIEWED
(
0
,
"待
核验
"
,
""
),
SUBMITTED
(
2
,
"
已提交
"
,
"请耐心等待湖北版权局审核受理,受理成功后将在15个工作日内完成登记"
),
SUBMITTED
(
2
,
"
提交审核
"
,
"请耐心等待湖北版权局审核受理,受理成功后将在15个工作日内完成登记"
),
REJECTED
(
3
,
"已驳回"
,
""
),
REJECTED
(
3
,
"已驳回"
,
""
),
SUCCEEDED
(
4
,
"登记成功"
,
""
),
SUCCEEDED
(
4
,
"审核通过"
,
""
),
FAILED
(
5
,
"审核失败"
,
""
),
FAILED
(
5
,
"驳回"
,
""
),
EXAMINE
(
6
,
"待审核"
,
""
),
FINAL_JUDGMENT
(
7
,
"待终审"
,
""
),
;
;
private
int
code
;
private
int
code
;
...
...
joying-common/src/main/java/com/fzm/common/service/impl/CopyrightApplyServiceImpl.java
View file @
2d5a7bd9
...
@@ -182,12 +182,12 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
...
@@ -182,12 +182,12 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
throw
GlobalException
.
newException
(
ResultCode
.
OPERATION_FAILED
,
"当前版权记录不能被删除"
);
throw
GlobalException
.
newException
(
ResultCode
.
OPERATION_FAILED
,
"当前版权记录不能被删除"
);
}
}
// 删除权力取得方式的附件
// 删除权力取得方式的附件
if
(
StringUtils
.
isNotBlank
(
copyright
.
getAuthorityAcquire
Mod
e
()))
{
if
(
StringUtils
.
isNotBlank
(
copyright
.
getAuthorityAcquire
Prov
e
()))
{
obsUtil
.
delete
(
copyright
.
getAuthorityAcquire
Mod
e
());
obsUtil
.
delete
(
copyright
.
getAuthorityAcquire
Prov
e
());
}
}
// 删除权力归属证明附件
// 删除权力归属证明附件
if
(
StringUtils
.
isNotBlank
(
copyright
.
getAuthorityAscription
Mod
e
()))
{
if
(
StringUtils
.
isNotBlank
(
copyright
.
getAuthorityAscription
Prov
e
()))
{
obsUtil
.
delete
(
copyright
.
getAuthorityA
cquireMod
e
());
obsUtil
.
delete
(
copyright
.
getAuthorityA
scriptionProv
e
());
}
}
// 删除附件列表
// 删除附件列表
copyrightFileService
.
delByCopyrightId
(
id
);
copyrightFileService
.
delByCopyrightId
(
id
);
...
@@ -239,11 +239,12 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
...
@@ -239,11 +239,12 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
@Override
@Override
public
Boolean
update
(
CopyrightDTO
copyrightDTO
)
{
public
Boolean
update
(
CopyrightDTO
copyrightDTO
)
{
// 只有驳回和登记失败的才能编辑
// 只有
撤回
驳回和登记失败的才能编辑
CopyrightApply
copyright
=
this
.
getById
(
copyrightDTO
.
getId
());
CopyrightApply
copyright
=
this
.
getById
(
copyrightDTO
.
getId
());
if
(
CopyrightApplyState
.
REJECTED
.
getCode
()
!=
copyright
.
getRegisterState
()
&&
if
(
CopyrightApplyState
.
REJECTED
.
getCode
()
!=
copyright
.
getRegisterState
()
&&
CopyrightApplyState
.
WITHDRAW
.
getCode
()
!=
copyright
.
getRegisterState
()
&&
CopyrightApplyState
.
FAILED
.
getCode
()
!=
copyright
.
getRegisterState
())
{
CopyrightApplyState
.
FAILED
.
getCode
()
!=
copyright
.
getRegisterState
())
{
throw
GlobalException
.
newException
(
ResultCode
.
OPERATION_FAILED
,
"只有驳回或登记失败的版权记录才能编辑"
);
throw
GlobalException
.
newException
(
ResultCode
.
OPERATION_FAILED
,
"只有
撤销、
驳回或登记失败的版权记录才能编辑"
);
}
}
CopyrightApply
copyrightApply
=
new
CopyrightApply
(
copyrightDTO
);
CopyrightApply
copyrightApply
=
new
CopyrightApply
(
copyrightDTO
);
if
(
CollectionUtil
.
isNotEmpty
(
copyrightDTO
.
getFiles
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
copyrightDTO
.
getFiles
()))
{
...
...
joying-common/src/main/java/com/fzm/common/service/impl/DraftServiceImpl.java
View file @
2d5a7bd9
...
@@ -62,12 +62,12 @@ public class DraftServiceImpl extends ServiceImpl<DraftMapper, Draft> implements
...
@@ -62,12 +62,12 @@ public class DraftServiceImpl extends ServiceImpl<DraftMapper, Draft> implements
CopyrightDTO
copyrightDTO
=
JSONUtil
.
toBean
(
draft
.
getJson
(),
CopyrightDTO
.
class
);
CopyrightDTO
copyrightDTO
=
JSONUtil
.
toBean
(
draft
.
getJson
(),
CopyrightDTO
.
class
);
if
(
copyrightDTO
!=
null
)
{
if
(
copyrightDTO
!=
null
)
{
// 删除权力取得方式的附件权力
// 删除权力取得方式的附件权力
if
(
StringUtils
.
isNotBlank
(
copyrightDTO
.
getAuthorityAcquire
Mod
e
()))
{
if
(
StringUtils
.
isNotBlank
(
copyrightDTO
.
getAuthorityAcquire
Prov
e
()))
{
obsUtil
.
delete
(
copyrightDTO
.
getAuthorityAcquire
Mod
e
());
obsUtil
.
delete
(
copyrightDTO
.
getAuthorityAcquire
Prov
e
());
}
}
// 删除权力归属证明附件
// 删除权力归属证明附件
if
(
StringUtils
.
isNotBlank
(
copyrightDTO
.
getAuthorityAscription
Mod
e
()))
{
if
(
StringUtils
.
isNotBlank
(
copyrightDTO
.
getAuthorityAscription
Prov
e
()))
{
obsUtil
.
delete
(
copyrightDTO
.
getAuthorityA
cquireMod
e
());
obsUtil
.
delete
(
copyrightDTO
.
getAuthorityA
scriptionProv
e
());
}
}
// 删除文件列表
// 删除文件列表
if
(
CollectionUtil
.
isNotEmpty
(
copyrightDTO
.
getFiles
()))
{
if
(
CollectionUtil
.
isNotEmpty
(
copyrightDTO
.
getFiles
()))
{
...
...
joying-portal/src/main/java/com/fzm/portal/controller/CopyrightApplyController.java
View file @
2d5a7bd9
...
@@ -60,7 +60,7 @@ public class CopyrightApplyController {
...
@@ -60,7 +60,7 @@ public class CopyrightApplyController {
return
ResponseModel
.
success
(
result
);
return
ResponseModel
.
success
(
result
);
}
}
@Authentication
//
@Authentication
@PostMapping
(
value
=
"/delete"
)
@PostMapping
(
value
=
"/delete"
)
@ApiOperation
(
value
=
"删除"
)
@ApiOperation
(
value
=
"删除"
)
public
ResponseModel
<
Boolean
>
delete
(
@RequestParam
Integer
id
)
{
public
ResponseModel
<
Boolean
>
delete
(
@RequestParam
Integer
id
)
{
...
...
sql/joying.sql
View file @
2d5a7bd9
...
@@ -424,7 +424,7 @@ INSERT INTO `tb_file_template` VALUES (5, '权利归属证明材料《职务作
...
@@ -424,7 +424,7 @@ INSERT INTO `tb_file_template` VALUES (5, '权利归属证明材料《职务作
INSERT
INTO
`tb_file_template`
VALUES
(
6
,
'权利归属证明材料《委托创作协议书(甲方享有全部权利)》附件.docx'
,
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/6536706db4354a1fb953245c63d0d7c8/权利归属证明材料《委托创作协议书(甲方享有全部权利)》附件.docx'
,
5
);
INSERT
INTO
`tb_file_template`
VALUES
(
6
,
'权利归属证明材料《委托创作协议书(甲方享有全部权利)》附件.docx'
,
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/6536706db4354a1fb953245c63d0d7c8/权利归属证明材料《委托创作协议书(甲方享有全部权利)》附件.docx'
,
5
);
INSERT
INTO
`tb_file_template`
VALUES
(
7
,
'权利归属证明材料《委托创作协议书(作者保留署名权)》附件.docx'
,
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/85a41572552b418894db27a320cc5084/权利归属证明材料《委托创作协议书(作者保留署名权)》附件.docx'
,
5
);
INSERT
INTO
`tb_file_template`
VALUES
(
7
,
'权利归属证明材料《委托创作协议书(作者保留署名权)》附件.docx'
,
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/85a41572552b418894db27a320cc5084/权利归属证明材料《委托创作协议书(作者保留署名权)》附件.docx'
,
5
);
INSERT
INTO
`tb_file_template`
VALUES
(
8
,
'作品登记委托书.docx'
,
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/d43a44b990354b17899517b1b5fb91c0/作品登记委托书.docx'
,
6
);
INSERT
INTO
`tb_file_template`
VALUES
(
8
,
'作品登记委托书.docx'
,
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/d43a44b990354b17899517b1b5fb91c0/作品登记委托书.docx'
,
6
);
INSERT
INTO
`tb_file_template`
VALUES
(
9
,
'权利保证书(作品)附件.docx'
,
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/9283eb13f3724676a7113c2cde002a57/权利保证书(作品)附件.docx'
,
NULL
);
INSERT
INTO
`tb_file_template`
VALUES
(
9
,
'权利保证书(作品)附件.docx'
,
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/9283eb13f3724676a7113c2cde002a57/权利保证书(作品)附件.docx'
,
7
);
-- ----------------------------
-- ----------------------------
-- Table structure for tb_nft
-- Table structure for tb_nft
...
@@ -541,3 +541,9 @@ CREATE TABLE `tb_user` (
...
@@ -541,3 +541,9 @@ CREATE TABLE `tb_user` (
-- Records of tb_user
-- Records of tb_user
-- ----------------------------
-- ----------------------------
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
-- v2.0.0
alter
table
tb_copyright_apply
modify
column
create_process
varchar
(
1000
)
NOT
NULL
DEFAULT
''
COMMENT
'创作过程'
;
UPDATE
`tb_file_template`
SET
`file_name`
=
'业务代理委托书.docx'
,
`file_url`
=
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/5444e0358d6b4038806b5a63d60284e5/业务代理委托书.docx'
,
`type`
=
1
WHERE
`id`
=
2
;
UPDATE
`tb_file_template`
SET
`file_name`
=
'作品登记委托书.docx'
,
`file_url`
=
'https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/88c2f750cabd44e4b75f3cb054b3326a/作品登记委托书.docx'
,
`type`
=
6
WHERE
`id`
=
8
;
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