fix: Add QcastException

This commit is contained in:
yoosangwook 2024-09-30 17:15:01 +09:00
parent ebf2e4592a
commit 2a64f15231

View File

@ -29,6 +29,7 @@ public class BoardService {
private final InterfaceQsp interfaceQsp;
@Autowired Messages message;
@Value("${qsp.url}")
private String QSP_API_URL;
@ -47,13 +48,13 @@ public class BoardService {
if ("".equals(boardRequest.getSchNoticeClsCd())) {
// [msg] {0} is required input value.
throw new QcastException(
ErrorCode.NOT_FOUND,
ErrorCode.INVALID_INPUT_VALUE,
message.getMessage("common.message.required.data", "Notice Cls Code"));
}
if ("".equals(boardRequest.getSchNoticeTpCd())) {
// [msg] {0} is required input value.
throw new QcastException(
ErrorCode.NOT_FOUND,
ErrorCode.INVALID_INPUT_VALUE,
message.getMessage("common.message.required.data", "Notice Type Code"));
}
@ -103,7 +104,8 @@ public class BoardService {
if (boardRequest.getNoticeNo() == null) {
// [msg] {0} is required input value.
throw new QcastException(
ErrorCode.NOT_FOUND, message.getMessage("common.message.required.data", "Notice No"));
ErrorCode.INVALID_INPUT_VALUE,
message.getMessage("common.message.required.data", "Notice No"));
}
/* [1]. QSP API (url + param) Setting */
@ -143,7 +145,8 @@ public class BoardService {
if ("".equals(encodeFileNo)) {
// [msg] {0} is required input value.
throw new QcastException(
ErrorCode.NOT_FOUND, message.getMessage("common.message.required.data", "File No"));
ErrorCode.INVALID_INPUT_VALUE,
message.getMessage("common.message.required.data", "File No"));
}
/* [1]. QSP API (url + fileNo) Setting */