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
Show 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,22 +167,17 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -167,22 +167,17 @@ 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());
if
(
CollectionUtil
.
isNotEmpty
(
audioIdList
))
{
for
(
String
audioId
:
audioIdList
)
{
for
(
String
audioId
:
audioIdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
audioId
);
final
Asset
asset
=
this
.
assetService
.
getById
(
audioId
);
if
(
asset
.
getPublished
())
{
if
(
asset
.
getPublished
())
{
...
@@ -192,9 +187,12 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -192,9 +187,12 @@ public class ExhibitionBoardController extends BaseController {
this
.
assetService
.
updateById
(
asset
);
this
.
assetService
.
updateById
(
asset
);
}
}
}
}
}
// 2021-05-31修改前
// 2021-05-31修改前
// removeNotInIds(audioIdList,exhibitionBoard.getId());
// removeNotInIds(audioIdList,exhibitionBoard.getId());
if
(
CollectionUtil
.
isNotEmpty
(
datumIdList
))
{
for
(
String
datumId
:
datumIdList
)
{
for
(
String
datumId
:
datumIdList
)
{
final
Asset
asset
=
this
.
assetService
.
getById
(
datumId
);
final
Asset
asset
=
this
.
assetService
.
getById
(
datumId
);
if
(
asset
==
null
)
{
if
(
asset
==
null
)
{
...
@@ -206,6 +204,8 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -206,6 +204,8 @@ public class ExhibitionBoardController extends BaseController {
this
.
assetService
.
updateById
(
asset
);
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