Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
f7229779
Commit
f7229779
authored
Jun 25, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-新建展板除名称外可为空
parent
181cd6fc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
39 deletions
+99
-39
ExhibitionBoard.java
src/main/java/cn/chnmuseum/party/model/ExhibitionBoard.java
+2
-2
AssetController.java
...va/cn/chnmuseum/party/web/controller/AssetController.java
+1
-1
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+88
-31
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+8
-5
No files found.
src/main/java/cn/chnmuseum/party/model/ExhibitionBoard.java
View file @
f7229779
...
...
@@ -75,12 +75,12 @@ public class ExhibitionBoard implements Serializable {
@ApiModelProperty
(
"展板内容图片URL"
)
@TableField
(
"cover"
)
@NotBlank
(
message
=
"展板图片URL不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
//
@NotBlank(message = "展板图片URL不能为空", groups = {Add.class, Update.class})
private
String
cover
;
@ApiModelProperty
(
"展板内容二维码URL"
)
@TableField
(
"qrcode_url"
)
@NotBlank
(
message
=
"展板二维码URL不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
//
@NotBlank(message = "展板二维码URL不能为空", groups = {Add.class, Update.class})
private
String
qrcodeUrl
;
@ApiModelProperty
(
"展板内容简介"
)
...
...
src/main/java/cn/chnmuseum/party/web/controller/AssetController.java
View file @
f7229779
...
...
@@ -145,7 +145,7 @@ public class AssetController extends BaseController {
for
(
Asset
asset
:
assetList
)
{
ByteArrayOutputStream
byteOutputStream
=
new
ByteArrayOutputStream
();
FastDFSUtils
.
downloadFile
(
asset
.
getFileUrlCrypto
(),
byteOutputStream
);
map
.
put
(
asset
.
get
Id
(),
new
ByteArrayInputStream
(
byteOutputStream
.
toByteArray
()));
map
.
put
(
asset
.
get
FileNameCrypto
(),
new
ByteArrayInputStream
(
byteOutputStream
.
toByteArray
()));
}
ZipUtil
.
zip
(
response
.
getOutputStream
(),
map
.
keySet
().
toArray
(
new
String
[
0
]),
map
.
values
().
toArray
(
new
InputStream
[
0
]));
}
...
...
src/main/java/cn/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
f7229779
This diff is collapsed.
Click to expand it.
src/main/java/cn/chnmuseum/party/web/controller/LearningContentController.java
View file @
f7229779
...
...
@@ -520,11 +520,11 @@ public class LearningContentController extends BaseController {
for
(
ExhibitionBoard
exhibitionBoard
:
exhibitionBoardList
)
{
String
exhibitionBoardCatId
=
exhibitionBoard
.
getExhibitionBoardCatId
();
if
(
exhibitionBoardCatId
!=
null
)
{
if
(
StringUtils
.
isNotEmpty
(
exhibitionBoardCatId
)
)
{
exhibitionBoard
.
setExhibitionBoardCatName
(
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoardCatId
).
getName
());
}
String
boardCopyrightOwnerId
=
exhibitionBoard
.
getBoardCopyrightOwnerId
();
if
(
boardCopyrightOwnerId
!=
null
)
{
if
(
StringUtils
.
isNotEmpty
(
boardCopyrightOwnerId
)
)
{
final
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
);
if
(
copyrightOwner
!=
null
)
{
exhibitionBoard
.
setBoardCopyrightOwnerName
(
copyrightOwner
.
getName
());
...
...
@@ -592,6 +592,7 @@ public class LearningContentController extends BaseController {
learningContent
.
setLearningProjectName
(
learningProject
.
getName
());
}
// 学习内容的展板版权方
final
List
<
String
>
copyrightOwnerIdList
=
learningContent
.
getCopyrightOwnerIdList
();
if
(
copyrightOwnerIdList
!=
null
&&
!
copyrightOwnerIdList
.
isEmpty
())
{
final
List
<
CopyrightOwner
>
copyrightOwnerList
=
this
.
copyrightOwnerService
.
listByIds
(
copyrightOwnerIdList
);
...
...
@@ -599,6 +600,7 @@ public class LearningContentController extends BaseController {
learningContent
.
setCopyrightOwnerNameList
(
copyrightOwnerList
.
stream
().
map
(
CopyrightOwner:
:
getName
).
collect
(
Collectors
.
toList
()));
}
// 学习内容的展板分类
final
List
<
String
>
exhibitionBoardCatIdList
=
learningContent
.
getExhibitionBoardCatIdList
();
if
(
exhibitionBoardCatIdList
!=
null
&&
!
exhibitionBoardCatIdList
.
isEmpty
())
{
final
List
<
ExhibitionBoardCat
>
exhibitionBoardCats
=
this
.
exhibitionBoardCatService
.
listByIds
(
exhibitionBoardCatIdList
);
...
...
@@ -606,6 +608,7 @@ public class LearningContentController extends BaseController {
learningContent
.
setExhibitionBoardCatNameList
(
exhibitionBoardCats
.
stream
().
map
(
ExhibitionBoardCat:
:
getName
).
collect
(
Collectors
.
toList
()));
}
// 学习内容的展板列表
final
List
<
String
>
exhibitionBoardIdList
=
learningContent
.
getExhibitionBoardIdList
();
if
(
exhibitionBoardIdList
!=
null
&&
!
exhibitionBoardIdList
.
isEmpty
())
{
final
List
<
ExhibitionBoard
>
exhibitionBoardList
=
this
.
exhibitionBoardService
.
listByIds
(
exhibitionBoardIdList
);
...
...
@@ -620,13 +623,13 @@ public class LearningContentController extends BaseController {
exhibitionBoard
.
setExhibitionBoardCatName
(
this
.
exhibitionBoardCatService
.
getById
(
exhibitionBoardCatId
).
getName
());
}
String
boardCopyrightOwnerId
=
exhibitionBoard
.
getBoardCopyrightOwnerId
();
if
(
boardCopyrightOwnerId
!=
null
)
{
if
(
StringUtils
.
isNotEmpty
(
boardCopyrightOwnerId
)
)
{
final
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
);
if
(
copyrightOwner
!=
null
)
{
exhibitionBoard
.
setBoardCopyrightOwnerName
(
copyrightOwner
.
getName
());
}
}
if
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()
!=
null
)
{
if
(
StringUtils
.
isNotEmpty
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()
)
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()).
getName
();
exhibitionBoard
.
setVideoContentCopyrightOwnerName
(
name
);
}
...
...
@@ -645,7 +648,7 @@ public class LearningContentController extends BaseController {
exhibitionBoard
.
setDatumList
(
datumList
);
String
videoContentId
=
exhibitionBoard
.
getVideoContentId
();
if
(
videoContentId
!=
null
)
{
if
(
StringUtils
.
isNotEmpty
(
videoContentId
)
)
{
final
VideoContent
videoContent
=
this
.
videoContentService
.
getOne
(
Wrappers
.<
VideoContent
>
lambdaQuery
().
eq
(
VideoContent:
:
getId
,
videoContentId
));
if
(
videoContent
!=
null
)
{
assetQueryWrapper
.
clear
();
...
...
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