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
be44504f
Commit
be44504f
authored
Apr 17, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
32c7bdbd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
113 deletions
+43
-113
ExhibitionBoardTmp.java
...n/wisenergy/chnmuseum/party/model/ExhibitionBoardTmp.java
+2
-9
LearningContentTmp.java
...n/wisenergy/chnmuseum/party/model/LearningContentTmp.java
+2
-9
VideoContentTmp.java
...a/cn/wisenergy/chnmuseum/party/model/VideoContentTmp.java
+2
-9
AuditServiceImpl.java
...energy/chnmuseum/party/service/impl/AuditServiceImpl.java
+4
-29
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+6
-5
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+21
-47
VideoContentController.java
...hnmuseum/party/web/controller/VideoContentController.java
+6
-5
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoardTmp.java
View file @
be44504f
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
...
@@ -30,18 +25,16 @@ import java.io.Serializable;
...
@@ -30,18 +25,16 @@ import java.io.Serializable;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"exhibition_board_tmp"
)
@TableName
(
"exhibition_board_tmp"
)
@ApiModel
(
value
=
"展板临时"
,
description
=
"展板临时"
)
public
class
ExhibitionBoardTmp
implements
Serializable
{
public
class
ExhibitionBoardTmp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"展板内容ID"
)
@ApiModelProperty
(
hidden
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
@NotNull
(
message
=
"展板内容ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
hidden
=
true
)
@TableField
(
"data"
)
@TableField
(
"data"
)
@NotBlank
(
message
=
"不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
data
;
private
String
data
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/model/LearningContentTmp.java
View file @
be44504f
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
...
@@ -30,18 +25,16 @@ import java.io.Serializable;
...
@@ -30,18 +25,16 @@ import java.io.Serializable;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"learning_content_tmp"
)
@TableName
(
"learning_content_tmp"
)
@ApiModel
(
value
=
"学习内容临时"
,
description
=
"学习内容临时"
)
public
class
LearningContentTmp
implements
Serializable
{
public
class
LearningContentTmp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"学习内容ID"
)
@ApiModelProperty
(
hidden
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
@NotNull
(
message
=
"学习内容ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
hidden
=
true
)
@TableField
(
"data"
)
@TableField
(
"data"
)
@NotBlank
(
message
=
"不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
data
;
private
String
data
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/model/VideoContentTmp.java
View file @
be44504f
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
...
@@ -30,18 +25,16 @@ import java.io.Serializable;
...
@@ -30,18 +25,16 @@ import java.io.Serializable;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"video_content_tmp"
)
@TableName
(
"video_content_tmp"
)
@ApiModel
(
value
=
"视频内容临时"
,
description
=
"视频内容临时"
)
public
class
VideoContentTmp
implements
Serializable
{
public
class
VideoContentTmp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"视频内容ID"
)
@ApiModelProperty
(
hidden
=
true
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
INPUT
)
@NotNull
(
message
=
"视频内容ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
hidden
=
true
)
@TableField
(
"data"
)
@TableField
(
"data"
)
@NotBlank
(
message
=
"不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
data
;
private
String
data
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/AuditServiceImpl.java
View file @
be44504f
...
@@ -79,11 +79,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -79,11 +79,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
/**
/**
* 分页查询
* 分页查询
*
* @param name
* @param status
* @param type
* @return
*/
*/
@Override
@Override
public
Page
<
Audit
>
pageList
(
String
name
,
AuditStatusEnum
status
,
AuditStatusEnum
auditStatusLevel
,
AuditTypeEnum
type
,
Page
<
Object
>
page
)
{
public
Page
<
Audit
>
pageList
(
String
name
,
AuditStatusEnum
status
,
AuditStatusEnum
auditStatusLevel
,
AuditTypeEnum
type
,
Page
<
Object
>
page
)
{
...
@@ -104,17 +99,11 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -104,17 +99,11 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
if
(
status
!=
null
)
{
if
(
status
!=
null
)
{
ew
.
eq
(
status
!=
null
,
"a.status"
,
status
.
name
());
ew
.
eq
(
status
!=
null
,
"a.status"
,
status
.
name
());
}
}
Page
<
Audit
>
pageList
=
pageByType
(
ew
,
name
,
type
,
auditPage
);
return
pageByType
(
ew
,
name
,
type
,
auditPage
);
return
pageList
;
}
}
/**
/**
* 分别查询
* 分别查询
*
* @param name
* @param type
* @param auditPage
* @return
*/
*/
private
Page
<
Audit
>
pageByType
(
QueryWrapper
<
Audit
>
ew
,
String
name
,
private
Page
<
Audit
>
pageByType
(
QueryWrapper
<
Audit
>
ew
,
String
name
,
AuditTypeEnum
type
,
Page
<
Audit
>
auditPage
)
{
AuditTypeEnum
type
,
Page
<
Audit
>
auditPage
)
{
...
@@ -141,9 +130,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -141,9 +130,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
/**
/**
* 根据id更新审核信息
* 根据id更新审核信息
*
* @param audit
* @return
*/
*/
@Override
@Override
public
boolean
updateAuditAllById
(
Audit
audit
)
{
public
boolean
updateAuditAllById
(
Audit
audit
)
{
...
@@ -177,8 +163,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -177,8 +163,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
/**
/**
* 初审级别的修改情况
* 初审级别的修改情况
*
* @return
*/
*/
private
boolean
updateOnTBC
(
Audit
audit
)
{
private
boolean
updateOnTBC
(
Audit
audit
)
{
audit
.
setFirstTime
(
LocalDateTime
.
now
());
audit
.
setFirstTime
(
LocalDateTime
.
now
());
...
@@ -204,8 +188,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -204,8 +188,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
/**
/**
* 复审级别的修改情况
* 复审级别的修改情况
*
* @return
*/
*/
private
boolean
updateOnTBCA
(
Audit
audit
)
{
private
boolean
updateOnTBCA
(
Audit
audit
)
{
audit
.
setSecondTime
(
LocalDateTime
.
now
());
audit
.
setSecondTime
(
LocalDateTime
.
now
());
...
@@ -255,9 +237,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -255,9 +237,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
/**
/**
* 根据审核操作 填充VideoContent属性用于更改
* 根据审核操作 填充VideoContent属性用于更改
*
* @param audit
* @return
*/
*/
public
boolean
fillVideoContentByAudit
(
Audit
audit
)
{
public
boolean
fillVideoContentByAudit
(
Audit
audit
)
{
final
String
videoContentId
=
audit
.
getRefItemId
();
final
String
videoContentId
=
audit
.
getRefItemId
();
...
@@ -317,6 +296,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -317,6 +296,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setPublished
(
true
);
//todo
one
.
setPublished
(
true
);
//todo
update
=
this
.
videoContentService
.
updateById
(
one
);
update
=
this
.
videoContentService
.
updateById
(
one
);
this
.
videoContentTmpService
.
removeById
(
videoContentId
);
break
;
break
;
default
:
default
:
}
}
...
@@ -325,9 +305,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -325,9 +305,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
/**
/**
* 根据审核操作 填充ExhibitionBoard属性用于更改
* 根据审核操作 填充ExhibitionBoard属性用于更改
*
* @param audit
* @return
*/
*/
public
boolean
fillExhibitionBoardByAudit
(
Audit
audit
)
{
public
boolean
fillExhibitionBoardByAudit
(
Audit
audit
)
{
final
String
exhibitionBoardId
=
audit
.
getRefItemId
();
final
String
exhibitionBoardId
=
audit
.
getRefItemId
();
...
@@ -396,6 +373,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -396,6 +373,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setPublished
(
true
);
//todo
one
.
setPublished
(
true
);
//todo
update
=
this
.
exhibitionBoardService
.
updateById
(
one
);
update
=
this
.
exhibitionBoardService
.
updateById
(
one
);
this
.
exhibitionBoardTmpService
.
removeById
(
exhibitionBoardId
);
break
;
break
;
default
:
default
:
}
}
...
@@ -404,9 +382,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -404,9 +382,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
/**
/**
* 根据审核操作 填充LearningContent属性用于更改
* 根据审核操作 填充LearningContent属性用于更改
*
* @param audit
* @return
*/
*/
public
boolean
fillLearningContentByAudit
(
Audit
audit
)
{
public
boolean
fillLearningContentByAudit
(
Audit
audit
)
{
final
String
learningContentId
=
audit
.
getRefItemId
();
final
String
learningContentId
=
audit
.
getRefItemId
();
...
@@ -477,6 +452,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -477,6 +452,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setAuditStatus
(
audit
.
getStatus
());
one
.
setPublished
(
true
);
//todo
one
.
setPublished
(
true
);
//todo
update
=
this
.
learningContentService
.
updateById
(
one
);
update
=
this
.
learningContentService
.
updateById
(
one
);
this
.
learningContentTmpService
.
removeById
(
learningContentId
);
break
;
break
;
default
:
default
:
}
}
...
@@ -490,7 +466,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -490,7 +466,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
* @param content 审核内容
* @param content 审核内容
* @param typeEnum 审核类型
* @param typeEnum 审核类型
* @param operationEnum 操作类型
* @param operationEnum 操作类型
* @return
*/
*/
@Override
@Override
public
boolean
saveByRefItemInfo
(
String
refItemId
,
String
content
,
AuditTypeEnum
typeEnum
,
AuditOperationEnum
operationEnum
)
{
public
boolean
saveByRefItemInfo
(
String
refItemId
,
String
content
,
AuditTypeEnum
typeEnum
,
AuditOperationEnum
operationEnum
)
{
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
be44504f
...
@@ -119,13 +119,14 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -119,13 +119,14 @@ public class ExhibitionBoardController extends BaseController {
public
Map
<
String
,
Object
>
updateExhibitionBoard
(
@Validated
(
value
=
{
Update
.
class
})
ExhibitionBoard
exhibitionBoard
)
{
public
Map
<
String
,
Object
>
updateExhibitionBoard
(
@Validated
(
value
=
{
Update
.
class
})
ExhibitionBoard
exhibitionBoard
)
{
final
boolean
flag
=
this
.
exhibitionBoardTmpService
.
save
(
ExhibitionBoardTmp
.
builder
().
id
(
exhibitionBoard
.
getId
()).
data
(
JSONObject
.
toJSONString
(
exhibitionBoard
)).
build
());
final
boolean
flag
=
this
.
exhibitionBoardTmpService
.
save
(
ExhibitionBoardTmp
.
builder
().
id
(
exhibitionBoard
.
getId
()).
data
(
JSONObject
.
toJSONString
(
exhibitionBoard
)).
build
());
if
(
flag
)
{
if
(
flag
)
{
TUser
user
=
getcurUser
();
final
ExhibitionBoard
one
=
this
.
exhibitionBoardService
.
getById
(
exhibitionBoard
.
getId
());
exhibitionBoard
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
one
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
exhibitionBoardService
.
updateById
(
exhibitionBoard
);
this
.
exhibitionBoardService
.
updateById
(
one
);
final
Audit
audit
=
Audit
.
builder
()
final
Audit
audit
=
Audit
.
builder
()
.
content
(
exhibitionBoard
.
getName
())
.
content
(
exhibitionBoard
.
getName
())
.
refItemId
(
exhibitionBoard
.
getId
())
.
refItemId
(
exhibitionBoard
.
getId
())
.
userId
(
user
.
getId
())
.
userId
(
getcurUser
()
.
getId
())
.
type
(
AuditTypeEnum
.
EXHIBITION_BOARD
.
name
())
.
type
(
AuditTypeEnum
.
EXHIBITION_BOARD
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
status
(
AuditStatusEnum
.
TBC
.
name
())
.
status
(
AuditStatusEnum
.
TBC
.
name
())
...
@@ -135,7 +136,7 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -135,7 +136,7 @@ public class ExhibitionBoardController extends BaseController {
this
.
auditService
.
save
(
audit
);
this
.
auditService
.
save
(
audit
);
return
getSuccessResult
();
return
getSuccessResult
();
}
}
return
getFailResult
();
return
getFailResult
(
"提交失败!上次提交的修改申请已经在审核中"
);
}
}
@PostMapping
(
"/getList"
)
@PostMapping
(
"/getList"
)
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
be44504f
...
@@ -13,9 +13,9 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
...
@@ -13,9 +13,9 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
import
cn.wisenergy.chnmuseum.party.model.*
;
import
cn.wisenergy.chnmuseum.party.model.*
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.service.*
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -49,24 +49,37 @@ public class LearningContentController extends BaseController {
...
@@ -49,24 +49,37 @@ public class LearningContentController extends BaseController {
@Resource
@Resource
private
ExhibitionBoardCatService
exhibitionBoardCatService
;
private
ExhibitionBoardCatService
exhibitionBoardCatService
;
@Resource
@Resource
private
VideoContentService
videoContentService
;
private
VideoContentService
videoContentService
;
@Resource
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
private
CopyrightOwnerService
copyrightOwnerService
;
@Resource
@Resource
private
LearningContentService
learningContentService
;
private
LearningContentService
learningContentService
;
@Resource
private
LearningContentTmpService
learningContentTmpService
;
@Resource
@Resource
private
LearningContentBoardCatService
learningContentBoardCatService
;
private
LearningContentBoardCatService
learningContentBoardCatService
;
@Resource
@Resource
private
LearningContentBoardService
learningContentBoardService
;
private
LearningContentBoardService
learningContentBoardService
;
@Resource
@Resource
private
ExhibitionBoardService
exhibitionBoardService
;
private
ExhibitionBoardService
exhibitionBoardService
;
@Resource
@Resource
private
LearningContentCopyrightOwnerService
learningContentCopyrightOwnerService
;
private
LearningContentCopyrightOwnerService
learningContentCopyrightOwnerService
;
@Resource
@Resource
private
LearningProjectService
learningProjectService
;
private
LearningProjectService
learningProjectService
;
@Resource
@Resource
private
AuditService
auditService
;
private
AuditService
auditService
;
@Resource
@Resource
private
AssetService
assetService
;
private
AssetService
assetService
;
...
@@ -148,53 +161,15 @@ public class LearningContentController extends BaseController {
...
@@ -148,53 +161,15 @@ public class LearningContentController extends BaseController {
@ApiOperation
(
value
=
"修改学习内容信息"
,
notes
=
"修改学习内容信息"
)
@ApiOperation
(
value
=
"修改学习内容信息"
,
notes
=
"修改学习内容信息"
)
@MethodLog
(
operModule
=
OperModule
.
LEARNCONTENT
,
operType
=
OperType
.
UPDATE
)
@MethodLog
(
operModule
=
OperModule
.
LEARNCONTENT
,
operType
=
OperType
.
UPDATE
)
public
Map
<
String
,
Object
>
updateLearningContent
(
@Validated
(
value
=
{
Update
.
class
})
LearningContent
learningContent
)
{
public
Map
<
String
,
Object
>
updateLearningContent
(
@Validated
(
value
=
{
Update
.
class
})
LearningContent
learningContent
)
{
TUser
user
=
getcurUser
();
final
boolean
flag
=
this
.
learningContentTmpService
.
save
(
LearningContentTmp
.
builder
().
id
(
learningContent
.
getId
()).
data
(
JSONObject
.
toJSONString
(
learningContent
)).
build
());
learningContent
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
// 保存业务节点信息
final
String
learningContentId
=
learningContent
.
getId
();
final
List
<
String
>
exhibitionBoardCatIdList
=
learningContent
.
getExhibitionBoardCatIdList
();
if
(
exhibitionBoardCatIdList
!=
null
&&
!
exhibitionBoardCatIdList
.
isEmpty
())
{
LambdaUpdateWrapper
<
LearningContentBoardCat
>
lambdaUpdateWrapper
=
Wrappers
.<
LearningContentBoardCat
>
lambdaUpdate
().
eq
(
LearningContentBoardCat:
:
getLearningContentId
,
learningContentId
);
this
.
learningContentBoardCatService
.
remove
(
lambdaUpdateWrapper
);
for
(
String
exhibitionBoardCatId
:
exhibitionBoardCatIdList
)
{
LearningContentBoardCat
learningContentBoardCat
=
LearningContentBoardCat
.
builder
().
exhibitionBoardCatId
(
exhibitionBoardCatId
).
learningContentId
(
learningContentId
).
build
();
this
.
learningContentBoardCatService
.
save
(
learningContentBoardCat
);
}
}
final
List
<
String
>
copyrightOwnerIdList
=
learningContent
.
getCopyrightOwnerIdList
();
if
(
copyrightOwnerIdList
!=
null
&&
!
copyrightOwnerIdList
.
isEmpty
())
{
LambdaUpdateWrapper
<
LearningContentCopyrightOwner
>
lambdaUpdateWrapper
=
Wrappers
.<
LearningContentCopyrightOwner
>
lambdaUpdate
().
eq
(
LearningContentCopyrightOwner:
:
getLearningContentId
,
learningContentId
);
this
.
learningContentCopyrightOwnerService
.
remove
(
lambdaUpdateWrapper
);
for
(
String
copyrightOwnerId
:
copyrightOwnerIdList
)
{
LearningContentCopyrightOwner
contentCopyrightOwner
=
LearningContentCopyrightOwner
.
builder
().
copyrightOwnerId
(
copyrightOwnerId
).
learningContentId
(
learningContentId
).
build
();
this
.
learningContentCopyrightOwnerService
.
save
(
contentCopyrightOwner
);
}
}
final
List
<
String
>
exhibitionBoardIdList
=
learningContent
.
getExhibitionBoardIdList
();
if
(
exhibitionBoardIdList
!=
null
&&
!
exhibitionBoardIdList
.
isEmpty
())
{
LambdaUpdateWrapper
<
LearningContentBoard
>
lambdaUpdateWrapper
=
Wrappers
.<
LearningContentBoard
>
lambdaUpdate
().
eq
(
LearningContentBoard:
:
getLearningContentId
,
learningContentId
);
this
.
learningContentBoardService
.
remove
(
lambdaUpdateWrapper
);
for
(
String
exhibitionBoardId
:
exhibitionBoardIdList
)
{
LearningContentBoard
learningContentBoard
=
LearningContentBoard
.
builder
()
.
learningContentId
(
learningContentId
)
.
exhibitionBoardCatId
(
this
.
exhibitionBoardService
.
getById
(
exhibitionBoardId
).
getExhibitionBoardCatId
())
.
exhibitionBoardId
(
exhibitionBoardId
)
.
build
();
this
.
learningContentBoardService
.
save
(
learningContentBoard
);
}
}
boolean
flag
=
learningContentService
.
updateById
(
learningContent
);
if
(
flag
)
{
if
(
flag
)
{
final
LearningContent
one
=
this
.
learningContentService
.
getById
(
learningContent
.
getId
());
one
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
this
.
learningContentService
.
updateById
(
one
);
final
Audit
audit
=
Audit
.
builder
()
final
Audit
audit
=
Audit
.
builder
()
.
content
(
learningContent
.
getName
())
.
content
(
learningContent
.
getName
())
.
userId
(
user
.
getId
())
.
userId
(
getcurUser
()
.
getId
())
.
refItemId
(
learningContent
.
getId
())
.
refItemId
(
learningContent
.
getId
())
.
type
(
AuditTypeEnum
.
LEARNING_CONTENT
.
name
())
.
type
(
AuditTypeEnum
.
LEARNING_CONTENT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
...
@@ -203,10 +178,9 @@ public class LearningContentController extends BaseController {
...
@@ -203,10 +178,9 @@ public class LearningContentController extends BaseController {
.
level
(
AuditStatusEnum
.
TBC
.
name
())
.
level
(
AuditStatusEnum
.
TBC
.
name
())
.
build
();
.
build
();
this
.
auditService
.
save
(
audit
);
this
.
auditService
.
save
(
audit
);
return
getSuccessResult
();
return
getSuccessResult
();
}
}
return
getFailResult
();
return
getFailResult
(
"提交失败!上次提交的修改申请已经在审核中"
);
}
}
@GetMapping
(
"/getList"
)
@GetMapping
(
"/getList"
)
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/VideoContentController.java
View file @
be44504f
...
@@ -112,12 +112,13 @@ public class VideoContentController extends BaseController {
...
@@ -112,12 +112,13 @@ public class VideoContentController extends BaseController {
public
Map
<
String
,
Object
>
updateVideoContent
(
@Validated
(
value
=
{
Update
.
class
})
VideoContent
videoContent
)
{
public
Map
<
String
,
Object
>
updateVideoContent
(
@Validated
(
value
=
{
Update
.
class
})
VideoContent
videoContent
)
{
final
boolean
flag
=
this
.
videoContentTmpService
.
save
(
VideoContentTmp
.
builder
().
id
(
videoContent
.
getId
()).
data
(
JSONObject
.
toJSONString
(
videoContent
)).
build
());
final
boolean
flag
=
this
.
videoContentTmpService
.
save
(
VideoContentTmp
.
builder
().
id
(
videoContent
.
getId
()).
data
(
JSONObject
.
toJSONString
(
videoContent
)).
build
());
if
(
flag
)
{
if
(
flag
)
{
TUser
user
=
getcurUser
();
final
VideoContent
one
=
this
.
videoContentService
.
getById
(
videoContent
.
getId
());
videoContent
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
one
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
videoContentService
.
updateById
(
videoContent
);
this
.
videoContentService
.
updateById
(
one
);
final
Audit
audit
=
Audit
.
builder
()
final
Audit
audit
=
Audit
.
builder
()
.
content
(
videoContent
.
getName
())
.
content
(
videoContent
.
getName
())
.
userId
(
user
.
getId
())
.
userId
(
getcurUser
()
.
getId
())
.
refItemId
(
videoContent
.
getId
())
.
refItemId
(
videoContent
.
getId
())
.
type
(
AuditTypeEnum
.
VIDEO_CONTENT
.
name
())
.
type
(
AuditTypeEnum
.
VIDEO_CONTENT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
.
operation
(
AuditOperationEnum
.
EDIT
.
name
())
...
@@ -128,7 +129,7 @@ public class VideoContentController extends BaseController {
...
@@ -128,7 +129,7 @@ public class VideoContentController extends BaseController {
this
.
auditService
.
save
(
audit
);
this
.
auditService
.
save
(
audit
);
return
getSuccessResult
();
return
getSuccessResult
();
}
}
return
getFailResult
();
return
getFailResult
(
"提交失败!上次提交的修改申请已经在审核中"
);
}
}
@GetMapping
(
"/getExhibitionBoardById/{id}"
)
@GetMapping
(
"/getExhibitionBoardById/{id}"
)
...
...
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