Compare commits
No commits in common. "4fc4240ded129d3b4290fe892ff346f1b6fed852" and "811e914666ee2afbb56ef2dbf546c83f996d3ab3" have entirely different histories.
4fc4240ded
...
811e914666
|
|
@ -316,16 +316,6 @@
|
||||||
.BRD011 .result .list_item > div:nth-child(12) {width: 60px;}
|
.BRD011 .result .list_item > div:nth-child(12) {width: 60px;}
|
||||||
.BRD011 .result .list_item > div:nth-child(13) {width: 60px;}
|
.BRD011 .result .list_item > div:nth-child(13) {width: 60px;}
|
||||||
|
|
||||||
/* 건설기준관리 - API키 관리*/
|
|
||||||
.BRD012 .head > span:nth-child(1) {width: 100px;}
|
|
||||||
.BRD012 .head > span:nth-child(2) {width: 360px;}
|
|
||||||
.BRD012 .head > span:nth-child(3) {width: 200px;}
|
|
||||||
.BRD012 .head > span:nth-child(4) {width: 150px;}
|
|
||||||
.BRD012 .result .list_item > div:nth-child(1) {width: 100px;}
|
|
||||||
.BRD012 .result .list_item > div:nth-child(2) {width: 360px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}
|
|
||||||
.BRD012 .result .list_item > div:nth-child(3) {width: 200px;}
|
|
||||||
.BRD012 .result .list_item > div:nth-child(4) {width: 150px;}
|
|
||||||
|
|
||||||
/* 게시판 사용관리 등록 */
|
/* 게시판 사용관리 등록 */
|
||||||
.BOARD_USE_LIST .board_view2 dl dt {width: 185px;}
|
.BOARD_USE_LIST .board_view2 dl dt {width: 185px;}
|
||||||
.BOARD_USE_LIST .board_view2 dl:nth-child(2) dd .f_input2 {width: 490px; margin-left: 17px;}
|
.BOARD_USE_LIST .board_view2 dl:nth-child(2) dd .f_input2 {width: 490px; margin-left: 17px;}
|
||||||
|
|
|
||||||
|
|
@ -480,18 +480,6 @@
|
||||||
.BRD011 .result .list_item > div:nth-child(6)::after {content: ""; display: inline-block; width: 1px; height: 11px; margin-left: 6px; background: #ccc; vertical-align: 0px;}
|
.BRD011 .result .list_item > div:nth-child(6)::after {content: ""; display: inline-block; width: 1px; height: 11px; margin-left: 6px; background: #ccc; vertical-align: 0px;}
|
||||||
.BRD011 .result .list_item > div:nth-child(6)::after {content: none;}
|
.BRD011 .result .list_item > div:nth-child(6)::after {content: none;}
|
||||||
|
|
||||||
/* 건설기준관리 - API키 관리*/
|
|
||||||
.BRD012 .head {display: none;}
|
|
||||||
.BRD012 .result .list_item {padding: 16px 0; border-bottom: 1px solid #dde2e5;}
|
|
||||||
.BRD012 .result .list_item > div {border-bottom: 0; font-size: 14px;}
|
|
||||||
.BRD012 .result .list_item > div:nth-child(1) {display: none;}
|
|
||||||
.BRD012 .result .list_item > div:nth-child(2) {width: 100%; padding: 0 0 2px 0; font-weight: 700; text-align: left;}
|
|
||||||
.BRD012 .result .list_item > div:nth-child(3),
|
|
||||||
.BRD012 .result .list_item > div:nth-child(4),
|
|
||||||
.BRD012 .result .list_item > div:nth-child(3)::after,
|
|
||||||
.BRD012 .result .list_item > div:nth-child(4)::after,
|
|
||||||
|
|
||||||
|
|
||||||
.BOARD_USE_LIST .board_view2 dl dt {width: 95px;}
|
.BOARD_USE_LIST .board_view2 dl dt {width: 95px;}
|
||||||
.BOARD_USE_LIST .board_view2 dl:nth-child(2) dd .f_select {width: 100%;}
|
.BOARD_USE_LIST .board_view2 dl:nth-child(2) dd .f_select {width: 100%;}
|
||||||
.BOARD_USE_LIST .board_view2 dl:nth-child(2) dd .f_input2 {width: 100%; margin: 15px 0 0 0;}
|
.BOARD_USE_LIST .board_view2 dl:nth-child(2) dd .f_input2 {width: 100%; margin: 15px 0 0 0;}
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ function Schedules(props) {
|
||||||
if (scheduleList.length > 0) {//일정 있는 경우
|
if (scheduleList.length > 0) {//일정 있는 경우
|
||||||
return (
|
return (
|
||||||
<td key={keyIdx++}>
|
<td key={keyIdx++}>
|
||||||
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__CREATE}} sss="test" state={{ iUseDate: mutsUseYearMonth + sDate + "000000"}} className="day"
|
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__CREATE}} sss="test" state={{test: "ddfdf", iUseDate: mutsUseYearMonth + sDate + "000000"}} className="day"
|
||||||
key={keyIdx++}>{day}</Link><br/>
|
key={keyIdx++}>{day}</Link><br/>
|
||||||
{
|
{
|
||||||
scheduleList.map((schedule, scheduleIdx) => {
|
scheduleList.map((schedule, scheduleIdx) => {
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ function SchedulesDetail(props) {
|
||||||
console.log("EgovAdminScheduleDetail [location] : ", location);
|
console.log("EgovAdminScheduleDetail [location] : ", location);
|
||||||
|
|
||||||
const [scheduleDetail, setScheduleDetail] = useState({});
|
const [scheduleDetail, setScheduleDetail] = useState({});
|
||||||
|
const [boardAttachFiles, setBoardAttachFiles] = useState();
|
||||||
|
const [user, setUser] = useState({});
|
||||||
|
|
||||||
const retrieveDetail = () => {
|
const retrieveDetail = () => {
|
||||||
|
|
||||||
|
|
@ -30,6 +32,17 @@ function SchedulesDetail(props) {
|
||||||
EgovNet.requestFetch(retrieveDetailURL,
|
EgovNet.requestFetch(retrieveDetailURL,
|
||||||
requestOptions,
|
requestOptions,
|
||||||
function (resp) {
|
function (resp) {
|
||||||
|
/**
|
||||||
|
* dto.put("evtSeq", tnCmtEvent.getEvtSeq()); // sequence
|
||||||
|
dto.put("divMeet", tnCmtEvent.getEvtType()); // 구분
|
||||||
|
dto.put("upCommittee", tnCmtEvent.getUpCmtSeq()); // 심의위원회 상위 코드 번호
|
||||||
|
dto.put("committee", tnCmtEvent.getCmtSeq()); // 심의위원회 하위 코드 번호
|
||||||
|
dto.put("title", tnCmtEvent.getEvtTitle()); // 제목
|
||||||
|
dto.put("location", tnCmtEvent.getEvtLocation()); // 장소
|
||||||
|
dto.put("contents", tnCmtEvent.getEvtContents()); // 내용
|
||||||
|
dto.put("startDate", tnCmtEvent.getEvtStartDt()); // 날짜/시간의 시작 일시
|
||||||
|
dto.put("endDate", tnCmtEvent.getEvtEndDt()); // 날짜/시간의 종료 일시
|
||||||
|
*/
|
||||||
setScheduleDetail(resp.result);
|
setScheduleDetail(resp.result);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -125,6 +138,7 @@ function SchedulesDetail(props) {
|
||||||
|
|
||||||
{/* <!-- 버튼영역 --> */}
|
{/* <!-- 버튼영역 --> */}
|
||||||
<div className="board_btn_area">
|
<div className="board_btn_area">
|
||||||
|
{user.id || true &&
|
||||||
<div className="left_col btn1">
|
<div className="left_col btn1">
|
||||||
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__MODIFY}}
|
<Link to={{pathname: URL.ADMIN__COMMITTEE__SCHEDULES__MODIFY}}
|
||||||
state={{
|
state={{
|
||||||
|
|
@ -136,6 +150,7 @@ function SchedulesDetail(props) {
|
||||||
onClickDeleteSchedule(location.state?.schdulId);
|
onClickDeleteSchedule(location.state?.schdulId);
|
||||||
}}>삭제</button>
|
}}>삭제</button>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
<div className="right_col btn1">
|
<div className="right_col btn1">
|
||||||
<Link to={URL.ADMIN__COMMITTEE__SCHEDULES} className="btn btn_blue_h46 w_100">목록</Link>
|
<Link to={URL.ADMIN__COMMITTEE__SCHEDULES} className="btn btn_blue_h46 w_100">목록</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ function PopUp(props) {
|
||||||
{listPopup.map((it)=>(
|
{listPopup.map((it)=>(
|
||||||
<div className='list_item'>
|
<div className='list_item'>
|
||||||
<div>{it.seq}</div>
|
<div>{it.seq}</div>
|
||||||
<div className="al"><Link to={URL.ADMIN__CONTENTS__POP_UP__MODIFY} state={{popupId: it.seq} } key={it.seq}>{it.popupTitle}</Link></div>
|
<div className="al"><Link to={URL.SUPPORT_QNA_DETAIL}>{it.popupTitle}</Link></div>
|
||||||
<div>{it.startDate} ~ {it.endDate}</div>
|
<div>{it.startDate} ~ {it.endDate}</div>
|
||||||
<div>{it.useYn === 'Y' ? <Switch {...label} defaultChecked /> : <Switch {...label} />}</div>
|
<div>{it.useYn === 'Y' ? <Switch {...label} defaultChecked /> : <Switch {...label} />}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -87,36 +87,7 @@ function PopupWriter(props) {
|
||||||
default:
|
default:
|
||||||
navigate({pathname: URL.ERROR}, {state: {msg : ""}});
|
navigate({pathname: URL.ERROR}, {state: {msg : ""}});
|
||||||
}
|
}
|
||||||
retrieveDetail();
|
//retrieveDetail();
|
||||||
}
|
|
||||||
|
|
||||||
const retrieveDetail = () => {
|
|
||||||
|
|
||||||
if (modeInfo.mode === CODE.MODE_CREATE) {// 조회/등록이면 조회 안함
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const retrieveDetailURL = `/contents/api/popup-manage/${location.state?.popupId}`;
|
|
||||||
const requestOptions = {
|
|
||||||
method: "GET",
|
|
||||||
headers: {
|
|
||||||
'Content-type': 'application/json'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EgovNet.requestFetch(retrieveDetailURL,
|
|
||||||
requestOptions,
|
|
||||||
function (resp) {
|
|
||||||
let rawDetail = resp.result;
|
|
||||||
//기본값 설정
|
|
||||||
setScheduleDetail({
|
|
||||||
...popupDetail,
|
|
||||||
...rawDetail,
|
|
||||||
startDate: convertDate(rawDetail.schdulBgnde),
|
|
||||||
endDate: convertDate(rawDetail.schdulEndde),
|
|
||||||
});
|
|
||||||
setText(rawDetail.contents);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -144,13 +115,13 @@ function PopupWriter(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modeInfo.mode === CODE.MODE_MODIFY) {
|
if (modeInfo.mode === CODE.MODE_MODIFY) {
|
||||||
modeInfo.editURL = `${modeInfo.editURL}/${location.state?.popupId}`;
|
modeInfo.editURL = `${modeInfo.editURL}/${location.state?.schdulId}`;
|
||||||
}
|
}
|
||||||
EgovNet.requestFetch(modeInfo.editURL,
|
EgovNet.requestFetch(modeInfo.editURL,
|
||||||
requestOptions,
|
requestOptions,
|
||||||
(resp) => {
|
(resp) => {
|
||||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||||
navigate({ pathname: URL.ADMIN__CONTENTS__POP_UP });
|
navigate({ pathname: URL.ADMIN_SCHEDULE });
|
||||||
} else {
|
} else {
|
||||||
navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}});
|
navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}});
|
||||||
}
|
}
|
||||||
|
|
@ -160,8 +131,8 @@ function PopupWriter(props) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onClickDelete = (popupId) => {
|
const onClickDeleteSchedule = (schdulId) => {
|
||||||
const deleteBoardURL = `/schedule/${popupId}`;
|
const deleteBoardURL = `/schedule/${schdulId}`;
|
||||||
|
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
|
|
@ -186,14 +157,6 @@ function PopupWriter(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const convertDate = (str) => {
|
|
||||||
let year = str.substring(0, 4);
|
|
||||||
let month = str.substring(4, 6);
|
|
||||||
let date = str.substring(6, 8);
|
|
||||||
let hour = str.substring(8, 10);
|
|
||||||
let minute = str.substring(10, 12);
|
|
||||||
return new Date(year, month - 1, date, hour, minute)
|
|
||||||
}
|
|
||||||
const getDateFourteenDigit = (date) => {
|
const getDateFourteenDigit = (date) => {
|
||||||
return `${getYYYYMMDD(date).toString()}${makeTwoDigit(date.getHours())}${makeTwoDigit(date.getMinutes())}${makeTwoDigit(date.getSeconds())}`;
|
return `${getYYYYMMDD(date).toString()}${makeTwoDigit(date.getHours())}${makeTwoDigit(date.getMinutes())}${makeTwoDigit(date.getSeconds())}`;
|
||||||
}
|
}
|
||||||
|
|
@ -318,7 +281,7 @@ function PopupWriter(props) {
|
||||||
{modeInfo.mode === CODE.MODE_MODIFY &&
|
{modeInfo.mode === CODE.MODE_MODIFY &&
|
||||||
<button className="btn btn_skyblue_h46 w_100"
|
<button className="btn btn_skyblue_h46 w_100"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
onClickDelete(location.state?.popupId);
|
onClickDeleteSchedule(location.state?.schdulId);
|
||||||
}}>삭제</button>
|
}}>삭제</button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -91,7 +91,7 @@ import AdminStandardsInfoDisclosure from 'pages/admin/standards/InfoDisclosure';
|
||||||
// 관리자 - 컨텐츠 관리
|
// 관리자 - 컨텐츠 관리
|
||||||
import AdminContentsSurvey from 'pages/admin/contents/Survey'; // 관리자 - 컨텐츠 관리/설문 관리
|
import AdminContentsSurvey from 'pages/admin/contents/Survey'; // 관리자 - 컨텐츠 관리/설문 관리
|
||||||
import AdminContentsPopUp from 'pages/admin/contents/PopUp'; // 관리자 - 컨텐츠 관리/팝업 관리
|
import AdminContentsPopUp from 'pages/admin/contents/PopUp'; // 관리자 - 컨텐츠 관리/팝업 관리
|
||||||
import AdminContentsPopUpWriter from 'pages/admin/contents/PopUp/PopupWriter'; // 관리자 - 컨텐츠 관리/팝업 관리/팝업 추가 또는 수정
|
import AdminContentsPopUpWriter from 'pages/admin/contents/PopUp/Writer'; // 관리자 - 컨텐츠 관리/팝업 관리/팝업 추가 또는 수정
|
||||||
import AdminContentsStandardResearch from 'pages/admin/contents/StandardResearch'; // 관리자 - 컨텐츠 관리/건설기준연구 관리
|
import AdminContentsStandardResearch from 'pages/admin/contents/StandardResearch'; // 관리자 - 컨텐츠 관리/건설기준연구 관리
|
||||||
import AdminContentsTextMessages from 'pages/admin/contents/TextMessages'; // 관리자 - 컨텐츠 관리/문자 발송
|
import AdminContentsTextMessages from 'pages/admin/contents/TextMessages'; // 관리자 - 컨텐츠 관리/문자 발송
|
||||||
|
|
||||||
|
|
@ -124,22 +124,18 @@ const RootRoutes = () => {
|
||||||
console.group("jwtAuthentication");
|
console.group("jwtAuthentication");
|
||||||
console.log("[Start] jwtAuthentication ------------------------------");
|
console.log("[Start] jwtAuthentication ------------------------------");
|
||||||
|
|
||||||
const jwtAuthURL = "/auth/token-check";
|
const jwtAuthURL = "/uat/esm/jwtAuthAPI.do";
|
||||||
let requestOptions = {
|
let requestOptions = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
};
|
};
|
||||||
|
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(jwtAuthURL, requestOptions, (resp) => {
|
||||||
jwtAuthURL,
|
|
||||||
requestOptions,
|
|
||||||
(resp) => {
|
|
||||||
if (resp === false) {
|
if (resp === false) {
|
||||||
setMounted(false);
|
setMounted(false);
|
||||||
} else {
|
} else {
|
||||||
setMounted(true); // 이 값으로 true 일 때만 페이지를 렌더링이 되는 변수 사용.
|
setMounted(true); // 이 값으로 true 일 때만 페이지를 렌더링이 되는 변수 사용.
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
console.log("------------------------------jwtAuthentication [End]");
|
console.log("------------------------------jwtAuthentication [End]");
|
||||||
console.groupEnd("jwtAuthentication");
|
console.groupEnd("jwtAuthentication");
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
);
|
);
|
||||||
|
|
||||||
// 유효성 검사 실시
|
// 유효성 검사 실시
|
||||||
int isValid = tnCmtEventRepository.spIsValidTnCmtEventId( updateScheduleVO.getEvtSeq() );
|
int isValid = tnCmtEventRepository.sp_is_valid_tn_cmt_event_id( updateScheduleVO.getEvtSeq() );
|
||||||
|
|
||||||
if( isValid == 0 ) {
|
if( isValid == 0 ) {
|
||||||
throw new Exception("대상이 존재하지 않습니다.");
|
throw new Exception("대상이 존재하지 않습니다.");
|
||||||
|
|
@ -253,7 +253,7 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
int isValid = tnCmtEventRepository.spIsValidTnCmtEventId( scheduleId.intValue() );
|
int isValid = tnCmtEventRepository.sp_is_valid_tn_cmt_event_id( scheduleId.intValue() );
|
||||||
|
|
||||||
if( isValid == 0 ) {
|
if( isValid == 0 ) {
|
||||||
throw new Exception("대상이 존재하지 않습니다.");
|
throw new Exception("대상이 존재하지 않습니다.");
|
||||||
|
|
@ -282,6 +282,9 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
||||||
dto.put("schdulBgnde", tnCmtEvent.getEvtStartDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 시작 일시 - yyyyMMddHHmmss
|
dto.put("schdulBgnde", tnCmtEvent.getEvtStartDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 시작 일시 - yyyyMMddHHmmss
|
||||||
dto.put("schdulEndde", tnCmtEvent.getEvtEndDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 종료 일시
|
dto.put("schdulEndde", tnCmtEvent.getEvtEndDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 종료 일시
|
||||||
|
|
||||||
|
// 문자열로 리턴하도록 수정해야 함.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
resultVO.setResult(dto);
|
resultVO.setResult(dto);
|
||||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
|
|
||||||
|
|
@ -120,84 +120,6 @@ public class PopUpApiController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(
|
|
||||||
summary = "팝업 수정 API",
|
|
||||||
description = "관리자 단에서 '컨텐츠 관리' > '팝업 관리' 페이지에서 팝업을 수정하는 API",
|
|
||||||
tags = {"PopUpApiController"}
|
|
||||||
)
|
|
||||||
@ApiResponses(value = {
|
|
||||||
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
|
||||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
|
|
||||||
@ApiResponse(responseCode = "900", description = "입력값 무결성 오류")
|
|
||||||
})
|
|
||||||
@PutMapping(value = "/contents/api/popup-manage/{popupId}")
|
|
||||||
public ResultVO contentsApiPopUpManageUpdate(
|
|
||||||
HttpServletRequest request,
|
|
||||||
@AuthenticationPrincipal LoginVO loginVO,
|
|
||||||
@PathVariable("popupId") Long popupId
|
|
||||||
) throws Exception {
|
|
||||||
|
|
||||||
ResultVO resultVO = new ResultVO();
|
|
||||||
|
|
||||||
try {
|
|
||||||
resultVO = popUpApiService.contentsApiPopUpManageUpdate(resultVO, request, loginVO, popupId);
|
|
||||||
} catch (Exception e) {
|
|
||||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
|
||||||
resultVO.setResultMessage(e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println(
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
request.getRequestURI() + " OUT:" +
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
"resultVO.toString():" + "\n" +
|
|
||||||
resultVO.toString() + "\n" +
|
|
||||||
"\n--------------------------------------------------------------\n"
|
|
||||||
);
|
|
||||||
|
|
||||||
return resultVO;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(
|
|
||||||
summary = "팝업 내용 불러오기 API",
|
|
||||||
description = "관리자 단에서 '컨텐츠 관리' > '팝업 관리' 페이지에서 저장된 팝업을 불러오는 API",
|
|
||||||
tags = {"PopUpApiController"}
|
|
||||||
)
|
|
||||||
@ApiResponses(value = {
|
|
||||||
@ApiResponse(responseCode = "200", description = "조회 성공")
|
|
||||||
})
|
|
||||||
@GetMapping(value = "/contents/api/popup-manage/{popupId}")
|
|
||||||
public ResultVO contentsApiPopUpManageRead(
|
|
||||||
HttpServletRequest request,
|
|
||||||
@AuthenticationPrincipal LoginVO loginVO,
|
|
||||||
@PathVariable("popupId") Long popupId
|
|
||||||
) throws Exception {
|
|
||||||
|
|
||||||
ResultVO resultVO = new ResultVO();
|
|
||||||
|
|
||||||
try {
|
|
||||||
resultVO = popUpApiService.contentsApiPopUpManageRead(resultVO, request, loginVO, popupId);
|
|
||||||
} catch (Exception e) {
|
|
||||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
|
||||||
resultVO.setResultMessage(e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println(
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
request.getRequestURI() + " OUT:" +
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
"resultVO.toString():" + "\n" +
|
|
||||||
resultVO.toString() + "\n" +
|
|
||||||
"\n--------------------------------------------------------------\n"
|
|
||||||
);
|
|
||||||
|
|
||||||
return resultVO;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -11,7 +11,4 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
public interface PopUpApiService {
|
public interface PopUpApiService {
|
||||||
public ResultVO contentsApiPopUpManageList(ResultVO resultVO, HttpServletRequest request, LoginVO user, Pageable pageable) throws Exception;
|
public ResultVO contentsApiPopUpManageList(ResultVO resultVO, HttpServletRequest request, LoginVO user, Pageable pageable) throws Exception;
|
||||||
public ResultVO contentsApiPopUpManageCreate(ResultVO resultVO, HttpServletRequest request, LoginVO user, final MultipartHttpServletRequest multiRequest, CreatePopupVO createPopupVO) throws Exception;
|
public ResultVO contentsApiPopUpManageCreate(ResultVO resultVO, HttpServletRequest request, LoginVO user, final MultipartHttpServletRequest multiRequest, CreatePopupVO createPopupVO) throws Exception;
|
||||||
public ResultVO contentsApiPopUpManageRead(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception;
|
|
||||||
public ResultVO contentsApiPopUpManageUpdate(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception;
|
|
||||||
public ResultVO contentsApiPopUpManageDelete(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception;
|
|
||||||
}
|
}
|
||||||
|
|
@ -6,10 +6,6 @@ import com.dbnt.kcscbackend.admin.contents.popUp.model.FileVO;
|
||||||
import com.dbnt.kcscbackend.admin.contents.popUp.repository.TnPopupMngRepositoryWithoutPopupContents;
|
import com.dbnt.kcscbackend.admin.contents.popUp.repository.TnPopupMngRepositoryWithoutPopupContents;
|
||||||
import com.dbnt.kcscbackend.admin.contents.popUp.service.PopUpApiService;
|
import com.dbnt.kcscbackend.admin.contents.popUp.service.PopUpApiService;
|
||||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem;
|
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TnCmtEvent;
|
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TnCmtOrg;
|
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TnPopupMng;
|
|
||||||
import com.dbnt.kcscbackend.commonCode.repository.TnPopupMngRepository;
|
import com.dbnt.kcscbackend.commonCode.repository.TnPopupMngRepository;
|
||||||
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||||
|
|
@ -116,6 +112,19 @@ public class PopUpApiServiceImpl extends EgovAbstractServiceImpl implements PopU
|
||||||
//_atchFileId = fileMngService.insertFileInfs(_result); //파일이 생성되고나면 생성된 첨부파일 ID를 리턴한다.
|
//_atchFileId = fileMngService.insertFileInfs(_result); //파일이 생성되고나면 생성된 첨부파일 ID를 리턴한다.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 리턴받은 첨부파일ID를 셋팅한다..
|
||||||
|
//createPopupVO.setAtchFileId(_atchFileId); // 첨부파일 ID
|
||||||
|
|
||||||
|
//아이디 설정
|
||||||
|
//createPopupVO.setFrstRegisterId(loginVO.getUniqId());
|
||||||
|
//createPopupVO.setLastUpdusrId(loginVO.getUniqId());
|
||||||
|
|
||||||
|
//createPopupVO.setSchdulDeptName("관리자부서");
|
||||||
|
//createPopupVO.setSchdulDeptId("ORGNZT_0000000000000");
|
||||||
|
//createPopupVO.setSchdulChargerName("관리자");
|
||||||
|
//createPopupVO.setSchdulChargerId("USRCNFRM_00000000000");
|
||||||
|
//egovIndvdlSchdulManageService.insertIndvdlSchdulManage(indvdlSchdulManageVO);
|
||||||
|
|
||||||
//call kcsc.sp_add_tn_popup_mng ('팝업제목','2023-08-17 10:00:00','2023-08-23 10:00:00',NULL,'이러저런 내용 ','kcsc_admin',NULL,NULL,NULL,NULL);
|
//call kcsc.sp_add_tn_popup_mng ('팝업제목','2023-08-17 10:00:00','2023-08-23 10:00:00',NULL,'이러저런 내용 ','kcsc_admin',NULL,NULL,NULL,NULL);
|
||||||
Map<String, Object> response = tnPopupMngRepository.spAddTnPopupMng(
|
Map<String, Object> response = tnPopupMngRepository.spAddTnPopupMng(
|
||||||
createPopupVO.getTitle(),
|
createPopupVO.getTitle(),
|
||||||
|
|
@ -142,53 +151,5 @@ public class PopUpApiServiceImpl extends EgovAbstractServiceImpl implements PopU
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResultVO contentsApiPopUpManageRead(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception {
|
|
||||||
|
|
||||||
System.out.println(
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
request.getRequestURI() + " IN:" +
|
|
||||||
"\n--------------------------------------------------------------\n" +
|
|
||||||
"user.getEmail():" + "\n" +
|
|
||||||
user.getEmail() + "\n" +
|
|
||||||
"popupId:" + "\n" +
|
|
||||||
popupId + "\n" +
|
|
||||||
"\n--------------------------------------------------------------\n"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
int isValid = tnPopupMngRepository.spIsValidTnCmtEventId( popupId.intValue() );
|
|
||||||
|
|
||||||
if( isValid == 0 ) {
|
|
||||||
throw new Exception("대상이 존재하지 않습니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
TnPopupMng tnPopupMng = tnPopupMngRepository.findByPopupSeq(popupId);
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> dto = new HashMap<String, Object>();
|
|
||||||
dto.put("title", tnPopupMng.getPopupTitle()); // 팝업 제목
|
|
||||||
dto.put("contents", tnPopupMng.getPopupContents()); // 팝업 내용
|
|
||||||
dto.put("schdulBgnde", tnPopupMng.getPopupStartDate().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 시작 일시 - yyyyMMddHHmmss
|
|
||||||
dto.put("schdulEndde", tnPopupMng.getPopupEndDate().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 종료 일시 - yyyyMMddHHmmss
|
|
||||||
|
|
||||||
|
|
||||||
resultVO.setResult(dto);
|
|
||||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
|
||||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
|
||||||
|
|
||||||
return resultVO;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResultVO contentsApiPopUpManageUpdate(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ResultVO contentsApiPopUpManageDelete(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@ import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||||
import com.dbnt.kcscbackend.config.egov.EgovMessageSource;
|
import com.dbnt.kcscbackend.config.egov.EgovMessageSource;
|
||||||
import com.dbnt.kcscbackend.config.jwt.EgovJwtTokenUtil;
|
import com.dbnt.kcscbackend.config.jwt.EgovJwtTokenUtil;
|
||||||
import com.dbnt.kcscbackend.config.jwt.redis.RefreshToken;
|
|
||||||
import com.dbnt.kcscbackend.config.jwt.redis.RefreshTokenRepository;
|
|
||||||
import io.jsonwebtoken.Claims;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||||
|
|
@ -63,7 +60,15 @@ public class EgovLoginApiController extends BaseController {
|
||||||
private EgovLoginService loginService;
|
private EgovLoginService loginService;
|
||||||
|
|
||||||
private final EgovJwtTokenUtil egovJwtTokenUtil;
|
private final EgovJwtTokenUtil egovJwtTokenUtil;
|
||||||
private final RefreshTokenRepository refreshTokenRepository;
|
|
||||||
|
/** EgovMessageSource */
|
||||||
|
@Resource(name = "egovMessageSource")
|
||||||
|
EgovMessageSource egovMessageSource;
|
||||||
|
|
||||||
|
/** JWT */
|
||||||
|
@Autowired
|
||||||
|
private EgovJwtTokenUtil jwtTokenUtil;
|
||||||
|
|
||||||
|
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "회원가입",
|
summary = "회원가입",
|
||||||
|
|
@ -172,17 +177,8 @@ public class EgovLoginApiController extends BaseController {
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/token-check")
|
@RequestMapping("/loginSuccess")
|
||||||
public boolean tokenCheck(HttpServletRequest request, HttpServletResponse response, @AuthenticationPrincipal UserInfo loginVO){
|
public HashMap<String, Object> loginSuccess(HttpServletRequest request, HttpServletResponse response){
|
||||||
String clientToken = request.getHeader("Authorization");
|
return new HashMap<>();
|
||||||
RefreshToken refreshToken = refreshTokenRepository.findById(egovJwtTokenUtil.getUserSeqFromToken(clientToken)).orElse(null);
|
|
||||||
if (refreshToken != null){
|
|
||||||
String serverToken = refreshToken.getRefreshToken();
|
|
||||||
if(egovJwtTokenUtil.getUserSeFromToken(clientToken).equals(egovJwtTokenUtil.getUserSeFromToken(serverToken))){
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -110,8 +110,12 @@ public interface TnCmtEventRepository extends JpaRepository<TnCmtEvent, TnCmtEve
|
||||||
@Param("_error_message") String errorMessage
|
@Param("_error_message") String errorMessage
|
||||||
);
|
);
|
||||||
|
|
||||||
@Procedure("sp_is_valid_tn_cmt_event_id")
|
|
||||||
int spIsValidTnCmtEventId( Integer evtSeq );
|
//@Procedure
|
||||||
|
//Map<String, Object> sp_is_valid_tn_cmt_event_id( @Param("_evt_seq") Long evtSeq );
|
||||||
|
|
||||||
|
@Procedure
|
||||||
|
int sp_is_valid_tn_cmt_event_id( Integer evtSeq );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
package com.dbnt.kcscbackend.commonCode.repository;
|
package com.dbnt.kcscbackend.commonCode.repository;
|
||||||
|
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TnCmtEvent;
|
|
||||||
import com.dbnt.kcscbackend.commonCode.entity.TnPopupMng;
|
import com.dbnt.kcscbackend.commonCode.entity.TnPopupMng;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
import org.springframework.data.jpa.repository.query.Procedure;
|
|
||||||
import org.springframework.data.repository.query.Param;
|
import org.springframework.data.repository.query.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -45,10 +43,5 @@ public interface TnPopupMngRepository extends JpaRepository<TnPopupMng, TnPopupM
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@Procedure("sp_is_valid_tn_popup_mng_id")
|
|
||||||
int spIsValidTnCmtEventId( Integer popupSeq );
|
|
||||||
|
|
||||||
TnPopupMng findByPopupSeq(Long popupSeq);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,10 +58,6 @@ public class EgovJwtTokenUtil implements Serializable{
|
||||||
|
|
||||||
|
|
||||||
//retrieve username from jwt token
|
//retrieve username from jwt token
|
||||||
public String getUserSeqFromToken(String token) {
|
|
||||||
Claims claims = getClaimFromToken(token);
|
|
||||||
return claims.get("userSeq").toString();
|
|
||||||
}
|
|
||||||
public String getUserIdFromToken(String token) {
|
public String getUserIdFromToken(String token) {
|
||||||
Claims claims = getClaimFromToken(token);
|
Claims claims = getClaimFromToken(token);
|
||||||
return claims.get("id").toString();
|
return claims.get("id").toString();
|
||||||
|
|
@ -93,7 +89,6 @@ public class EgovJwtTokenUtil implements Serializable{
|
||||||
// compaction of the JWT to a URL-safe string
|
// compaction of the JWT to a URL-safe string
|
||||||
public String generateToken(UserInfo loginVO, String remoteAddr, Long sec) {
|
public String generateToken(UserInfo loginVO, String remoteAddr, Long sec) {
|
||||||
Map<String, Object> claims = new HashMap<>();
|
Map<String, Object> claims = new HashMap<>();
|
||||||
claims.put("userSeq", loginVO.getUserSeq());
|
|
||||||
claims.put("id", loginVO.getUserId() );
|
claims.put("id", loginVO.getUserId() );
|
||||||
claims.put("remoteAddr", remoteAddr);
|
claims.put("remoteAddr", remoteAddr);
|
||||||
claims.put("userSe", loginVO.getUserSe() );
|
claims.put("userSe", loginVO.getUserSe() );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue