Commit 2b7f1725 authored by liqin's avatar liqin 💬

bug fixed

parent 5e817da3
......@@ -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, "");
}
/**
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment