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
2b7f1725
Commit
2b7f1725
authored
Apr 14, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
5e817da3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
GlobalExceptionAdvisor.java
...gy/chnmuseum/party/common/mvc/GlobalExceptionAdvisor.java
+4
-4
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+4
-1
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/mvc/GlobalExceptionAdvisor.java
View file @
2b7f1725
...
...
@@ -138,7 +138,7 @@ public class GlobalExceptionAdvisor {
String
message
=
Splitter
.
on
(
System
.
lineSeparator
()).
trimResults
().
splitToList
(
localizedMessage
).
get
(
1
);
String
substring
=
message
.
substring
(
message
.
indexOf
(
"Exception:"
));
if
(
substring
.
toUpperCase
().
contains
(
"NAME"
))
{
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
"名称已存在"
,
""
);
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
"名称已存在
,请修改名称
"
,
""
);
}
else
if
(
substring
.
toUpperCase
().
contains
(
"CODE"
))
{
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
"编码已存在"
,
""
);
}
...
...
@@ -152,11 +152,11 @@ public class GlobalExceptionAdvisor {
String
message
=
Splitter
.
on
(
System
.
lineSeparator
()).
trimResults
().
splitToList
(
localizedMessage
).
get
(
1
);
String
substring
=
message
.
substring
(
message
.
indexOf
(
"Exception:"
));
if
(
substring
.
toUpperCase
().
contains
(
"NAME"
))
{
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
"名称已存在"
);
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
"名称已存在
,请修改名称"
,
"
"
);
}
else
if
(
substring
.
toUpperCase
().
contains
(
"CODE"
))
{
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
"编码已存在"
);
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
"编码已存在"
,
""
);
}
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
message
);
return
new
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
validator
.
HttpResult
(
"400"
,
message
,
""
);
}
/**
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
2b7f1725
...
...
@@ -341,7 +341,10 @@ public class LearningContentController extends BaseController {
}
String
boardCopyrightOwnerId
=
exhibitionBoard
.
getBoardCopyrightOwnerId
();
if
(
boardCopyrightOwnerId
!=
null
)
{
exhibitionBoard
.
setBoardCopyrightOwnerName
(
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
).
getName
());
final
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
boardCopyrightOwnerId
);
if
(
copyrightOwner
!=
null
)
{
exhibitionBoard
.
setBoardCopyrightOwnerName
(
copyrightOwner
.
getName
());
}
}
if
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()
!=
null
)
{
String
name
=
this
.
copyrightOwnerService
.
getById
(
exhibitionBoard
.
getVideoContentCopyrightOwnerId
()).
getName
();
...
...
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