Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
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
liqin
chnmuseum-party
Commits
fda6db7d
Commit
fda6db7d
authored
4 years ago
by
liqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
e15c442f
master
1.0
dev
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
20 deletions
+24
-20
AuditServiceImpl.java
...energy/chnmuseum/party/service/impl/AuditServiceImpl.java
+24
-20
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/AuditServiceImpl.java
View file @
fda6db7d
...
...
@@ -209,25 +209,20 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
* 根据审核项ID 修改 审核项表中的信息
*/
private
boolean
updateRefItemByRefItemId
(
Audit
audit
)
{
//
String
type
=
audit
.
getType
();
AuditTypeEnum
auditTypeEnum
=
AuditTypeEnum
.
valueOf
(
type
);
//
boolean
update
;
switch
(
auditTypeEnum
)
{
case
VIDEO_CONTENT:
VideoContent
videoContent
=
fillVideoContentByAudit
(
audit
);
update
=
videoContentService
.
updateById
(
videoContent
);
update
=
fillVideoContentByAudit
(
audit
);
break
;
// case ACCOUNT:
// break;
case
EXHIBITION_BOARD:
ExhibitionBoard
exhibitionBoard
=
fillVideoContentByExhibitionBoard
(
audit
);
update
=
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
update
=
fillVideoContentByExhibitionBoard
(
audit
);
break
;
case
LEARNING_CONTENT:
LearningContent
learningContent
=
fillVideoContentByLearningContent
(
audit
);
update
=
learningContentService
.
updateById
(
learningContent
);
update
=
fillVideoContentByLearningContent
(
audit
);
break
;
default
:
throw
new
InterfaceException
(
"type参数不正确"
);
...
...
@@ -241,30 +236,33 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
* @param audit
* @return
*/
public
VideoContent
fillVideoContentByAudit
(
Audit
audit
)
{
public
boolean
fillVideoContentByAudit
(
Audit
audit
)
{
VideoContent
videoContent
=
new
VideoContent
();
videoContent
.
setId
(
audit
.
getRefItemId
());
videoContent
.
setAuditStatus
(
audit
.
getStatus
());
//当审核级别为复审,审核状态为通过是,会修改审核项其它表中的 发布与删除字段,不是此情况下是直接修改审核状态
boolean
continueFill
=
AuditStatusEnum
.
APPROVED_FINAL
.
name
().
equals
(
audit
.
getStatus
())
&&
AuditStatusEnum
.
TBCA
.
name
().
equals
(
audit
.
getLevel
());
if
(!
continueFill
)
{
return
videoContent
;
return
this
.
videoContentService
.
updateById
(
videoContent
)
;
}
String
operation
=
audit
.
getOperation
();
AuditOperationEnum
auditOperationEnum
=
AuditOperationEnum
.
valueOf
(
operation
);
boolean
update
=
false
;
switch
(
auditOperationEnum
)
{
case
ENABLE:
videoContent
.
setPublished
(
true
);
update
=
this
.
videoContentService
.
updateById
(
videoContent
);
break
;
case
DISABLE:
videoContent
.
setPublished
(
false
);
update
=
this
.
videoContentService
.
updateById
(
videoContent
);
break
;
case
REMOVE:
videoContent
.
setDeleted
(
true
);
update
=
this
.
videoContentService
.
removeById
(
videoContent
);
break
;
default
:
}
return
videoContent
;
return
update
;
}
/**
...
...
@@ -273,30 +271,33 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
* @param audit
* @return
*/
public
ExhibitionBoard
fillVideoContentByExhibitionBoard
(
Audit
audit
)
{
public
boolean
fillVideoContentByExhibitionBoard
(
Audit
audit
)
{
ExhibitionBoard
exhibitionBoard
=
new
ExhibitionBoard
();
exhibitionBoard
.
setId
(
audit
.
getRefItemId
());
exhibitionBoard
.
setAuditStatus
(
audit
.
getStatus
());
//当审核级别为复审,审核状态为通过是,会修改审核项其它表中的 发布与删除字段,不是此情况下是直接修改审核状态
boolean
continueFill
=
AuditStatusEnum
.
APPROVED_FINAL
.
name
().
equals
(
audit
.
getStatus
())
&&
AuditStatusEnum
.
TBCA
.
name
().
equals
(
audit
.
getLevel
());
if
(!
continueFill
)
{
return
exhibitionBoard
;
return
this
.
exhibitionBoardService
.
updateById
(
exhibitionBoard
)
;
}
String
operation
=
audit
.
getOperation
();
AuditOperationEnum
auditOperationEnum
=
AuditOperationEnum
.
valueOf
(
operation
);
boolean
update
=
false
;
switch
(
auditOperationEnum
)
{
case
UPPER:
exhibitionBoard
.
setPublished
(
true
);
update
=
this
.
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
break
;
case
LOWER:
exhibitionBoard
.
setPublished
(
false
);
update
=
this
.
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
break
;
case
REMOVE:
exhibitionBoard
.
setDeleted
(
true
);
update
=
this
.
exhibitionBoardService
.
removeById
(
exhibitionBoard
);
break
;
default
:
}
return
exhibitionBoard
;
return
update
;
}
/**
...
...
@@ -305,30 +306,33 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
* @param audit
* @return
*/
public
LearningContent
fillVideoContentByLearningContent
(
Audit
audit
)
{
public
boolean
fillVideoContentByLearningContent
(
Audit
audit
)
{
LearningContent
learningContent
=
new
LearningContent
();
learningContent
.
setAuditStatus
(
audit
.
getStatus
());
learningContent
.
setId
(
audit
.
getRefItemId
());
//当审核级别为复审,审核状态为通过是,会修改审核项其它表中的 发布与删除字段,不是此情况下是直接修改审核状态
boolean
continueFill
=
AuditStatusEnum
.
APPROVED_FINAL
.
name
().
equals
(
audit
.
getStatus
())
&&
AuditStatusEnum
.
TBCA
.
name
().
equals
(
audit
.
getLevel
());
if
(!
continueFill
)
{
return
learningContent
;
return
this
.
learningContentService
.
updateById
(
learningContent
)
;
}
String
operation
=
audit
.
getOperation
();
AuditOperationEnum
auditOperationEnum
=
AuditOperationEnum
.
valueOf
(
operation
);
boolean
update
=
false
;
switch
(
auditOperationEnum
)
{
case
ENABLE:
learningContent
.
setPublished
(
true
);
update
=
this
.
learningContentService
.
updateById
(
learningContent
);
break
;
case
DISABLE:
learningContent
.
setPublished
(
false
);
update
=
this
.
learningContentService
.
updateById
(
learningContent
);
break
;
case
REMOVE:
learningContent
.
setDeleted
(
true
);
update
=
this
.
learningContentService
.
removeById
(
learningContent
);
break
;
default
:
}
return
learningContent
;
return
update
;
}
/**
...
...
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