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
775a6789
Commit
775a6789
authored
Jun 26, 2021
by
nie'hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改-修改展板报错
parent
2d207f8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+22
-22
No files found.
src/main/java/cn/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
775a6789
...
@@ -167,45 +167,45 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -167,45 +167,45 @@ public class ExhibitionBoardController extends BaseController {
return
getFailResult
(
"400"
,
"名称已存在,请修改名称"
);
return
getFailResult
(
"400"
,
"名称已存在,请修改名称"
);
}
}
List
<
String
>
audioIdList
=
exhibitionBoard
.
getAudioIdList
();
List
<
String
>
audioIdList
=
exhibitionBoard
.
getAudioIdList
();
if
(
CollectionUtil
.
isEmpty
(
audioIdList
))
{
audioIdList
=
new
ArrayList
<>();
}
// if (audioIdList == null || audioIdList.isEmpty()) {
// if (audioIdList == null || audioIdList.isEmpty()) {
// return getFailResult("400", "导览音频文件必须上传");
// return getFailResult("400", "导览音频文件必须上传");
// }
// }
List
<
String
>
datumIdList
=
exhibitionBoard
.
getDatumIdList
();
List
<
String
>
datumIdList
=
exhibitionBoard
.
getDatumIdList
();
if
(
CollectionUtil
.
isEmpty
(
datumIdList
))
{
audioIdList
=
new
ArrayList
<>();
}
// if (datumIdList == null || datumIdList.isEmpty()) {
// if (datumIdList == null || datumIdList.isEmpty()) {
// return getFailResult("400", "参考资料文件必须上传");
// return getFailResult("400", "参考资料文件必须上传");
// }
// }
// 2021-05-31修改前
// 2021-05-31修改前
// removeNotInIds(audioIdList,exhibitionBoard.getId());
// removeNotInIds(audioIdList,exhibitionBoard.getId());
for
(
String
audioId
:
audioIdList
)
{
if
(
CollectionUtil
.
isNotEmpty
(
audioIdList
))
{
final
Asset
asset
=
this
.
assetService
.
getById
(
audioId
);
for
(
String
audioId
:
audioIdList
)
{
if
(
asset
.
getPublished
())
{
final
Asset
asset
=
this
.
assetService
.
getById
(
audioId
);
asset
.
setFileType
(
FileTypeEnum
.
AUDIO
.
name
());
if
(
asset
.
getPublished
())
{
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
asset
.
setFileType
(
FileTypeEnum
.
AUDIO
.
name
());
asset
.
setRefItemId
(
exhibitionBoard
.
getId
());
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_AUDIO
.
name
());
this
.
assetService
.
updateById
(
asset
);
asset
.
setRefItemId
(
exhibitionBoard
.
getId
());
this
.
assetService
.
updateById
(
asset
);
}
}
}
}
}
// 2021-05-31修改前
// 2021-05-31修改前
// removeNotInIds(audioIdList,exhibitionBoard.getId());
// removeNotInIds(audioIdList,exhibitionBoard.getId());
for
(
String
datumId
:
datumIdList
)
{
if
(
CollectionUtil
.
isNotEmpty
(
datumIdList
))
{
final
Asset
asset
=
this
.
assetService
.
getById
(
datumId
);
for
(
String
datumId
:
datumIdList
)
{
if
(
asset
==
null
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
datumId
);
continue
;
if
(
asset
==
null
)
{
}
continue
;
if
(
asset
.
getPublished
())
{
}
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
if
(
asset
.
getPublished
())
{
asset
.
setRefItemId
(
exhibitionBoard
.
getId
());
asset
.
setFileCat
(
FileCatEnum
.
EXHIBITION_BOARD_DATUM
.
name
());
this
.
assetService
.
updateById
(
asset
);
asset
.
setRefItemId
(
exhibitionBoard
.
getId
());
this
.
assetService
.
updateById
(
asset
);
}
}
}
}
}
// 2021-05-31修改后
// 2021-05-31修改后
audioIdList
.
addAll
(
datumIdList
);
audioIdList
.
addAll
(
datumIdList
);
if
(
CollectionUtil
.
isNotEmpty
(
audioIdList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
audioIdList
))
{
...
...
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