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
8cd9aafc
Commit
8cd9aafc
authored
Apr 17, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
87c3be8c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
41 deletions
+52
-41
ExhibitionBoardCat.java
...n/wisenergy/chnmuseum/party/model/ExhibitionBoardCat.java
+0
-5
LearningContentBoard.java
...wisenergy/chnmuseum/party/model/LearningContentBoard.java
+4
-0
ExhibitionBoardCatController.java
...um/party/web/controller/ExhibitionBoardCatController.java
+5
-1
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+26
-26
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+10
-2
ExhibitionBoardCatMapper.xml
src/main/resources/mapper/ExhibitionBoardCatMapper.xml
+1
-2
LearningContentBoardMapper.xml
src/main/resources/mapper/LearningContentBoardMapper.xml
+6
-5
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoardCat.java
View file @
8cd9aafc
...
@@ -49,11 +49,6 @@ public class ExhibitionBoardCat implements Serializable {
...
@@ -49,11 +49,6 @@ public class ExhibitionBoardCat implements Serializable {
@Length
(
min
=
0
,
max
=
100
,
message
=
"备注的字数超过最大限制100"
)
@Length
(
min
=
0
,
max
=
100
,
message
=
"备注的字数超过最大限制100"
)
private
String
remarks
;
private
String
remarks
;
@ApiModelProperty
(
"是否已删除"
)
@TableField
(
"is_deleted"
)
@TableLogic
private
Boolean
deleted
;
@ApiModelProperty
(
"创建日期"
)
@ApiModelProperty
(
"创建日期"
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/LearningContentBoard.java
View file @
8cd9aafc
...
@@ -44,6 +44,10 @@ public class LearningContentBoard implements Serializable {
...
@@ -44,6 +44,10 @@ public class LearningContentBoard implements Serializable {
@NotBlank
(
message
=
"学习内容ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"学习内容ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
learningContentId
;
private
String
learningContentId
;
@ApiModelProperty
(
"展板类别ID"
)
@TableField
(
"exhibition_board_cat_id"
)
private
String
exhibitionBoardCatId
;
@ApiModelProperty
(
"展板ID"
)
@ApiModelProperty
(
"展板ID"
)
@TableField
(
"exhibition_board_id"
)
@TableField
(
"exhibition_board_id"
)
@NotBlank
(
message
=
"展板ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"展板ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardCatController.java
View file @
8cd9aafc
...
@@ -57,6 +57,8 @@ public class ExhibitionBoardCatController extends BaseController {
...
@@ -57,6 +57,8 @@ public class ExhibitionBoardCatController extends BaseController {
private
CopyrightOwnerBoardCatService
copyrightOwnerBoardCatService
;
private
CopyrightOwnerBoardCatService
copyrightOwnerBoardCatService
;
@Resource
@Resource
private
LearningContentBoardCatService
learningContentBoardCatService
;
private
LearningContentBoardCatService
learningContentBoardCatService
;
@Resource
private
LearningContentBoardService
learningContentBoardService
;
@PostMapping
(
"/save"
)
@PostMapping
(
"/save"
)
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:cat:save")
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:cat:save")
...
@@ -200,13 +202,15 @@ public class ExhibitionBoardCatController extends BaseController {
...
@@ -200,13 +202,15 @@ public class ExhibitionBoardCatController extends BaseController {
updateWrapper
.
set
(
ExhibitionBoard:
:
getDeleted
,
true
);
updateWrapper
.
set
(
ExhibitionBoard:
:
getDeleted
,
true
);
this
.
exhibitionBoardService
.
update
(
updateWrapper
);
this
.
exhibitionBoardService
.
update
(
updateWrapper
);
//todo 删除中间关联表
LambdaUpdateWrapper
<
CopyrightOwnerBoardCat
>
deleteWrapper
=
Wrappers
.<
CopyrightOwnerBoardCat
>
lambdaUpdate
().
eq
(
CopyrightOwnerBoardCat:
:
getBoardCatId
,
id
);
LambdaUpdateWrapper
<
CopyrightOwnerBoardCat
>
deleteWrapper
=
Wrappers
.<
CopyrightOwnerBoardCat
>
lambdaUpdate
().
eq
(
CopyrightOwnerBoardCat:
:
getBoardCatId
,
id
);
this
.
copyrightOwnerBoardCatService
.
remove
(
deleteWrapper
);
this
.
copyrightOwnerBoardCatService
.
remove
(
deleteWrapper
);
LambdaUpdateWrapper
<
LearningContentBoardCat
>
deleteWrapper1
=
Wrappers
.<
LearningContentBoardCat
>
lambdaUpdate
().
eq
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
,
id
);
LambdaUpdateWrapper
<
LearningContentBoardCat
>
deleteWrapper1
=
Wrappers
.<
LearningContentBoardCat
>
lambdaUpdate
().
eq
(
LearningContentBoardCat:
:
getExhibitionBoardCatId
,
id
);
this
.
learningContentBoardCatService
.
remove
(
deleteWrapper1
);
this
.
learningContentBoardCatService
.
remove
(
deleteWrapper1
);
LambdaUpdateWrapper
<
LearningContentBoard
>
deleteWrapper2
=
Wrappers
.<
LearningContentBoard
>
lambdaUpdate
().
eq
(
LearningContentBoard:
:
getExhibitionBoardCatId
,
id
);
this
.
learningContentBoardService
.
remove
(
deleteWrapper2
);
// final LambdaUpdateWrapper<VideoContent> updateWrapper = Wrappers.<VideoContent>lambdaUpdate().eq(VideoContent::getVideoContentCopyrightOwnerId, id);
// final LambdaUpdateWrapper<VideoContent> updateWrapper = Wrappers.<VideoContent>lambdaUpdate().eq(VideoContent::getVideoContentCopyrightOwnerId, id);
// updateWrapper.set(VideoContent::getDeleted, true);
// updateWrapper.set(VideoContent::getDeleted, true);
// this.videoContentService.update(updateWrapper);
// this.videoContentService.update(updateWrapper);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
8cd9aafc
...
@@ -170,32 +170,6 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -170,32 +170,6 @@ public class ExhibitionBoardController extends BaseController {
return
getFailResult
();
return
getFailResult
();
}
}
@DeleteMapping
(
"/delete/{id}"
)
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:delete")
@ApiOperation
(
value
=
"根据ID删除展板"
,
notes
=
"根据ID删除展板"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"path"
,
dataType
=
"String"
)
})
@MethodLog
(
operModule
=
OperModule
.
DISPLAYCONTENT
,
operType
=
OperType
.
DELETE
)
public
Map
<
String
,
Object
>
deleteExhibitionBoard
(
@PathVariable
(
"id"
)
String
id
)
{
TUser
user
=
getcurUser
();
final
Audit
audit
=
Audit
.
builder
()
.
content
(
this
.
exhibitionBoardService
.
getById
(
id
).
getName
())
.
userId
(
user
.
getId
())
.
refItemId
(
id
)
.
type
(
AuditTypeEnum
.
EXHIBITION_BOARD
.
name
())
.
operation
(
AuditOperationEnum
.
REMOVE
.
name
())
.
status
(
AuditStatusEnum
.
TBC
.
name
())
.
deleted
(
false
)
.
level
(
AuditStatusEnum
.
TBC
.
name
())
.
build
();
final
boolean
result
=
this
.
auditService
.
save
(
audit
);
if
(
result
)
{
return
getSuccessResult
();
}
return
getFailResult
();
}
@PostMapping
(
"/getList"
)
@PostMapping
(
"/getList"
)
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:list")
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:list")
@ApiOperation
(
value
=
"获取展板全部列表(无分页)"
,
notes
=
"获取展板全部列表(无分页)"
)
@ApiOperation
(
value
=
"获取展板全部列表(无分页)"
,
notes
=
"获取展板全部列表(无分页)"
)
...
@@ -428,5 +402,31 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -428,5 +402,31 @@ public class ExhibitionBoardController extends BaseController {
return
getSuccessResult
();
return
getSuccessResult
();
}
}
@DeleteMapping
(
"/delete/{id}"
)
@RequiresAuthentication
//@RequiresPermissions("exhibition:board:delete")
@ApiOperation
(
value
=
"根据ID删除展板"
,
notes
=
"根据ID删除展板"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"path"
,
dataType
=
"String"
)
})
@MethodLog
(
operModule
=
OperModule
.
DISPLAYCONTENT
,
operType
=
OperType
.
DELETE
)
public
Map
<
String
,
Object
>
deleteExhibitionBoard
(
@PathVariable
(
"id"
)
String
id
)
{
TUser
user
=
getcurUser
();
final
Audit
audit
=
Audit
.
builder
()
.
content
(
this
.
exhibitionBoardService
.
getById
(
id
).
getName
())
.
userId
(
user
.
getId
())
.
refItemId
(
id
)
.
type
(
AuditTypeEnum
.
EXHIBITION_BOARD
.
name
())
.
operation
(
AuditOperationEnum
.
REMOVE
.
name
())
.
status
(
AuditStatusEnum
.
TBC
.
name
())
.
deleted
(
false
)
.
level
(
AuditStatusEnum
.
TBC
.
name
())
.
build
();
final
boolean
result
=
this
.
auditService
.
save
(
audit
);
if
(
result
)
{
return
getSuccessResult
();
}
return
getFailResult
();
}
}
}
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
8cd9aafc
...
@@ -107,7 +107,11 @@ public class LearningContentController extends BaseController {
...
@@ -107,7 +107,11 @@ public class LearningContentController extends BaseController {
final
List
<
String
>
exhibitionBoardIdList
=
learningContent
.
getExhibitionBoardIdList
();
final
List
<
String
>
exhibitionBoardIdList
=
learningContent
.
getExhibitionBoardIdList
();
for
(
String
exhibitionBoardId
:
exhibitionBoardIdList
)
{
for
(
String
exhibitionBoardId
:
exhibitionBoardIdList
)
{
LearningContentBoard
learningContentBoard
=
LearningContentBoard
.
builder
().
exhibitionBoardId
(
exhibitionBoardId
).
learningContentId
(
learningContentId
).
build
();
LearningContentBoard
learningContentBoard
=
LearningContentBoard
.
builder
()
.
learningContentId
(
learningContentId
)
.
exhibitionBoardCatId
(
this
.
exhibitionBoardService
.
getById
(
exhibitionBoardId
).
getExhibitionBoardCatId
())
.
exhibitionBoardId
(
exhibitionBoardId
)
.
build
();
QueryWrapper
<
LearningContentBoard
>
learningContentBoardQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
LearningContentBoard
>
learningContentBoardQueryWrapper
=
new
QueryWrapper
<>();
learningContentBoardQueryWrapper
.
select
(
"max(sortorder) as sortorder"
);
learningContentBoardQueryWrapper
.
select
(
"max(sortorder) as sortorder"
);
LearningContentBoard
one
=
this
.
learningContentBoardService
.
getOne
(
learningContentBoardQueryWrapper
);
LearningContentBoard
one
=
this
.
learningContentBoardService
.
getOne
(
learningContentBoardQueryWrapper
);
...
@@ -178,7 +182,11 @@ public class LearningContentController extends BaseController {
...
@@ -178,7 +182,11 @@ public class LearningContentController extends BaseController {
this
.
learningContentBoardService
.
remove
(
lambdaUpdateWrapper
);
this
.
learningContentBoardService
.
remove
(
lambdaUpdateWrapper
);
for
(
String
exhibitionBoardId
:
exhibitionBoardIdList
)
{
for
(
String
exhibitionBoardId
:
exhibitionBoardIdList
)
{
LearningContentBoard
learningContentBoard
=
LearningContentBoard
.
builder
().
exhibitionBoardId
(
exhibitionBoardId
).
learningContentId
(
learningContentId
).
build
();
LearningContentBoard
learningContentBoard
=
LearningContentBoard
.
builder
()
.
learningContentId
(
learningContentId
)
.
exhibitionBoardCatId
(
this
.
exhibitionBoardService
.
getById
(
exhibitionBoardId
).
getExhibitionBoardCatId
())
.
exhibitionBoardId
(
exhibitionBoardId
)
.
build
();
this
.
learningContentBoardService
.
save
(
learningContentBoard
);
this
.
learningContentBoardService
.
save
(
learningContentBoard
);
}
}
}
}
...
...
src/main/resources/mapper/ExhibitionBoardCatMapper.xml
View file @
8cd9aafc
...
@@ -7,14 +7,13 @@
...
@@ -7,14 +7,13 @@
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"is_deleted"
property=
"deleted"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, name, remarks,
is_deleted,
create_time, update_time
id, name, remarks, create_time, update_time
</sql>
</sql>
</mapper>
</mapper>
src/main/resources/mapper/LearningContentBoardMapper.xml
View file @
8cd9aafc
...
@@ -4,14 +4,15 @@
...
@@ -4,14 +4,15 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContentBoard"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContentBoard"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"learning_content_id"
property=
"learningContentId"
/>
<result
column=
"learning_content_id"
property=
"learningContentId"
/>
<result
column=
"exhibition_board_id"
property=
"exhibitionBoardId"
/>
<result
column=
"exhibition_board_cat_id"
property=
"exhibitionBoardCatId"
/>
</resultMap>
<result
column=
"exhibition_board_id"
property=
"exhibitionBoardId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, learning_content_id, exhibition_board_id
id, learning_content_id, exhibition_board_
cat_id, exhibition_board_
id
</sql>
</sql>
</mapper>
</mapper>
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