Compare commits
5 Commits
788c6787d3
...
c3258630dc
| Author | SHA1 | Date |
|---|---|---|
|
|
c3258630dc | |
|
|
d00696c73e | |
|
|
cdaaebd6d8 | |
|
|
e79432a0e1 | |
|
|
babd8ac3e9 |
|
|
@ -111,7 +111,8 @@ function SchedulesDetail(props) {
|
|||
<ul>
|
||||
<li><Link to={URL.MAIN} className="home">Home</Link></li>
|
||||
<li><Link to={URL.ADMIN}>사이트관리</Link></li>
|
||||
<li>일정관리</li>
|
||||
<li>위원회관리</li>
|
||||
<li>일정관리 상세보기</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/* <!--// Location --> */}
|
||||
|
|
@ -125,11 +126,9 @@ function SchedulesDetail(props) {
|
|||
{/* <!-- 본문 --> */}
|
||||
|
||||
<div className="top_tit">
|
||||
<h1 className="tit_1">사이트관리</h1>
|
||||
<h1 className="tit_1">일정관리 상세보기</h1>
|
||||
</div>
|
||||
|
||||
<h2 className="tit_2">일정관리 상세보기</h2>
|
||||
|
||||
{/* <!-- 게시판 상세보기 --> */}
|
||||
<div className="board_view2">
|
||||
<dl>
|
||||
|
|
|
|||
|
|
@ -187,8 +187,9 @@ function SchedulesEdit(props) {
|
|||
EgovNet.requestFetch(modeInfo.editURL,
|
||||
requestOptions,
|
||||
(resp) => {
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
navigate({ pathname: URL.ADMIN_SCHEDULE });
|
||||
if (Number(resp.resultCode) === Number(CODE.RCV_SUCCESS)) {
|
||||
alert('일정이 등록되었습니다.');
|
||||
navigate({ pathname: URL.ADMIN__COMMITTEE__SCHEDULES__DETAIL }, {state: {schdulId : resp.result?.schdulId}});
|
||||
} else {
|
||||
navigate({pathname: URL.ERROR}, {state: {msg : resp.resultMessage}});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin';
|
|||
import EgovPaging from "components/EgovPaging";
|
||||
import * as EgovNet from "api/egovFetch";
|
||||
import {itemIdxByPage} from "utils/calc";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
import UserInfoModal from "./UserInfoModal";
|
||||
|
||||
|
||||
function List(props) {
|
||||
|
|
@ -19,6 +21,12 @@ function List(props) {
|
|||
const cndRef = useRef();
|
||||
const wrdRef = useRef();
|
||||
|
||||
const [show, setShow] = useState(false);
|
||||
const [modalBody, setModalBody] = useState();
|
||||
|
||||
const handleClose = () => setShow(false);
|
||||
const handleShow = () => setShow(true);
|
||||
|
||||
const retrieveList = useCallback((searchCondition) => {
|
||||
const params = "?";
|
||||
EgovNet.requestFetch(
|
||||
|
|
@ -44,11 +52,11 @@ function List(props) {
|
|||
mutListTag.push(
|
||||
<div className={"list_item"}>
|
||||
<div>{item.userSe}</div>
|
||||
<div>{item.userId}</div>
|
||||
<div><a href={"#"} onClick={()=>{userInfoModal(item.userSeq)}}>{item.userId}</a></div>
|
||||
<div>{item.userNm}</div>
|
||||
<div>{item.email}</div>
|
||||
<div>{item.phoneNum}</div>
|
||||
<div>{item.useYn}</div>
|
||||
<div>{item.status}</div>
|
||||
<div><button className={"btn btn_red_h31 px-1"}>삭제</button></div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -66,6 +74,11 @@ function List(props) {
|
|||
retrieveList(searchCondition);
|
||||
}, []);
|
||||
|
||||
function userInfoModal(userSeq){
|
||||
handleShow()
|
||||
setModalBody(<UserInfoModal userSeq={userSeq}></UserInfoModal>)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container">
|
||||
<div className="c_wrap">
|
||||
|
|
@ -124,11 +137,6 @@ function List(props) {
|
|||
}}>조회</button>
|
||||
</span>
|
||||
</li>
|
||||
{/*{masterBoard.bbsUseFlag === 'Y' &&
|
||||
<li>
|
||||
<Link to={URL.ADMIN_NOTICE_CREATE} state={{bbsId: bbsId}} className="btn btn_blue_h46 pd35">등록</Link>
|
||||
</li>
|
||||
}*/}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
@ -161,6 +169,9 @@ function List(props) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Modal show={show} onHide={handleClose} keyboard={false}>
|
||||
{modalBody}
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,143 @@
|
|||
import React, {useEffect, useState} from "react"
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
import * as EgovNet from "../../../api/egovFetch";
|
||||
import Form from "react-bootstrap/Form";
|
||||
import Row from "react-bootstrap/Row";
|
||||
import Col from "react-bootstrap/Col";
|
||||
import Button from "react-bootstrap/Button";
|
||||
|
||||
function UserInfoModal({userSeq}){
|
||||
|
||||
const [userInfo, setUserInfo] = useState({ userId: '', password: '', passwordChk: '', userNm: '', email: '', phoneNum: ''});
|
||||
|
||||
function getModalContent(){
|
||||
EgovNet.requestFetch(
|
||||
'/admin/users/info?userSeq='+userSeq,
|
||||
{
|
||||
method: "GET"
|
||||
},
|
||||
(resp) => {
|
||||
const respInfo = {
|
||||
userId: resp.result.userInfo.userId,
|
||||
userNm: resp.result.userInfo.userNm,
|
||||
email: resp.result.userInfo.email,
|
||||
phoneNum: resp.result.userInfo.phoneNum,
|
||||
password: "",
|
||||
passwordChk: "",
|
||||
}
|
||||
setUserInfo(respInfo);
|
||||
},
|
||||
(resp) => {
|
||||
console.log("err response : ", resp);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function userInfoChange(){
|
||||
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
getModalContent();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal.Header className="bookmarkModalHeader" closeButton>
|
||||
<Modal.Title>
|
||||
{userInfo.userNm} 상세정보
|
||||
</Modal.Title>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<Form onSubmit={userInfoChange} noValidate>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
아이디
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
<Form.Control type="text" name="userId" placeholder="아이디" required value={userInfo?.userId}
|
||||
onChange={e => setUserInfo({ ...userInfo, userId: e.target.value })}/>
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
이름
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
<Form.Control type="text" name="userNm" placeholder="이름" required value={userInfo?.userNm}
|
||||
onChange={e => setUserInfo({ ...userInfo, userNm: e.target.value })}/>
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
이메일
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
<Form.Control type="email" name="email" placeholder="email" required value={userInfo?.email}
|
||||
onChange={e => setUserInfo({ ...userInfo, email: e.target.value })}/>
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
연락처
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
<Form.Control type="text" name="phoneNum" placeholder="연락처" required value={userInfo?.phoneNum}
|
||||
onChange={e => setUserInfo({ ...userInfo, phoneNum: e.target.value })}/>
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
비밀번호
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
<Form.Control type="password" name="password" placeholder="비밀번호 변경 시 입력"
|
||||
onChange={e => setUserInfo({ ...userInfo, password: e.target.value })}/>
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
비밀번호 확인
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
<Form.Control type="password" name="passwordChk" placeholder="비밀번호 변경 시 입력"
|
||||
onChange={e => setUserInfo({ ...userInfo, passwordChk: e.target.value })}/>
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
사용자 유형
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
사용자 권한
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Form.Group as={Row} className="mb-3" controlId="formHorizontalEmail">
|
||||
<Form.Label column sm={3}>
|
||||
상태
|
||||
</Form.Label>
|
||||
<Col sm={9}>
|
||||
|
||||
</Col>
|
||||
</Form.Group>
|
||||
<Row className="mb-3">
|
||||
<Form.Label column xs={{span:8, offset:2}} id="findResultLabel"></Form.Label>
|
||||
<Col xs={2}>
|
||||
<Button type="submit">저장</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
</Form>
|
||||
</Modal.Body>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default UserInfoModal;
|
||||
|
|
@ -4,6 +4,8 @@ package com.dbnt.kcscbackend.admin.committee.schedules.controller;
|
|||
|
||||
import com.dbnt.kcscbackend.admin.committee.schedules.model.CreateScheduleVO;
|
||||
import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulManageService;
|
||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
|
@ -11,6 +13,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
|||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -93,6 +96,45 @@ public class SchedulesApiController {
|
|||
}
|
||||
|
||||
|
||||
@Operation(
|
||||
summary = "일정 상세조회",
|
||||
description = "일정 목록을 상세조회",
|
||||
tags = {"SchedulesApiController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공")
|
||||
})
|
||||
@GetMapping(value = "/schedule/{scheduleId}")
|
||||
public ResultVO scheduleDetail(
|
||||
HttpServletRequest request,
|
||||
@AuthenticationPrincipal LoginVO user,
|
||||
@PathVariable("scheduleId") Long scheduleId
|
||||
)
|
||||
throws Exception {
|
||||
|
||||
ResultVO resultVO = new ResultVO();
|
||||
|
||||
try {
|
||||
resultVO = egovIndvdlSchdulManageService.scheduleDetail(resultVO, request, user, scheduleId);
|
||||
} catch (Exception e) {
|
||||
resultVO.setResultCode(-1);
|
||||
resultVO.setResultMessage(e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"resultVO.toString():" + "\n" +
|
||||
resultVO.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -2,7 +2,9 @@ package com.dbnt.kcscbackend.admin.committee.schedules.service;
|
|||
|
||||
|
||||
import com.dbnt.kcscbackend.admin.committee.schedules.model.CreateScheduleVO;
|
||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
|
|
@ -26,11 +28,13 @@ import javax.servlet.http.HttpServletRequest;
|
|||
public interface EgovIndvdlSchdulManageService {
|
||||
|
||||
|
||||
|
||||
public ResultVO scheduleInit(ResultVO resultVO) throws Exception;
|
||||
|
||||
public ResultVO scheduleApiOrgApiDepthList(ResultVO resultVO, Long paramCodeGroup) throws Exception;
|
||||
|
||||
public ResultVO createSchedule(ResultVO resultVO, HttpServletRequest request, CreateScheduleVO createScheduleVO) throws Exception;
|
||||
|
||||
public ResultVO scheduleDetail(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long scheduleId) throws Exception;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -6,6 +6,8 @@ import com.dbnt.kcscbackend.admin.committee.schedules.service.EgovIndvdlSchdulMa
|
|||
import com.dbnt.kcscbackend.admin.config.repository.TcCodeItemRepository;
|
||||
import com.dbnt.kcscbackend.admin.config.repository.TnCmtEventRepository;
|
||||
import com.dbnt.kcscbackend.admin.config.repository.TnCmtOrgRepository;
|
||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||
import com.dbnt.kcscbackend.config.common.ResponseCode;
|
||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.tomcat.util.json.JSONParser;
|
||||
|
|
@ -86,6 +88,8 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
|||
resultMap.put("listSubOrg", listSubOrg);
|
||||
resultMap.put("listTopOrg", listTopOrg);
|
||||
resultVO.setResult(resultMap);
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||
|
||||
return resultVO;
|
||||
}
|
||||
|
|
@ -112,7 +116,6 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public ResultVO createSchedule(ResultVO resultVO, HttpServletRequest request, CreateScheduleVO createScheduleVO) throws Exception {
|
||||
|
||||
System.out.println(
|
||||
|
|
@ -124,29 +127,16 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
|||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
Locale currentLocale = new Locale("KOREAN", "KOREA");
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", currentLocale);
|
||||
Date date = formatter.parse(createScheduleVO.getStartDate());
|
||||
|
||||
LocalDate startDate = date.toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDate();
|
||||
|
||||
LocalDateTime endDate = Instant.ofEpochMilli(date.getTime())
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDateTime();
|
||||
|
||||
Timestamp ts=new Timestamp(date.getTime());
|
||||
|
||||
tnCmtEventRepository.sp_add_tn_cmt_event(
|
||||
Map<String, Object> response = tnCmtEventRepository.spAddTnCmtEvent(
|
||||
createScheduleVO.getDivMeet(),
|
||||
createScheduleVO.getUpCommittee(),
|
||||
createScheduleVO.getCommittee(),
|
||||
createScheduleVO.getTitle(),
|
||||
createScheduleVO.getLocation(),
|
||||
createScheduleVO.getContents(),
|
||||
date,
|
||||
date,
|
||||
createScheduleVO.getStartDate(),
|
||||
createScheduleVO.getEndDate(),
|
||||
"admin",
|
||||
null,
|
||||
null,
|
||||
|
|
@ -154,12 +144,45 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
|
|||
null
|
||||
);
|
||||
|
||||
//resultVO.setResult();
|
||||
resultVO.setResultMessage("OK");
|
||||
resultVO.setResultCode(0);
|
||||
Map<String, Object> dto = new HashMap<String, Object>();
|
||||
dto.put("schdulId", response.get("_evt_seq") );
|
||||
|
||||
resultVO.setResult(dto);
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResultVO scheduleDetail(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long scheduleId) throws Exception {
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"scheduleId:" + "\n" +
|
||||
scheduleId + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
|
||||
int isValid = tnCmtEventRepository.sp_is_valid_tn_cmt_event_id( scheduleId );
|
||||
|
||||
Map<String, Object> dto = new HashMap<String, Object>();
|
||||
//dto.put("schdulId", response.get("_evt_seq") );
|
||||
|
||||
resultVO.setResult(dto);
|
||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,46 +2,98 @@ package com.dbnt.kcscbackend.admin.config.repository;
|
|||
|
||||
import com.dbnt.kcscbackend.admin.config.entity.TnCmtEvent;
|
||||
import com.dbnt.kcscbackend.admin.config.entity.TnCmtOrg;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
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.format.annotation.DateTimeFormat;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface TnCmtEventRepository extends JpaRepository<TnCmtEvent, TnCmtEvent.TnCmtEventId> {
|
||||
|
||||
@Transactional
|
||||
@Modifying
|
||||
@Query(value = "SET datestyle TO ISO, MDY", nativeQuery = true)
|
||||
int setDateStyle();
|
||||
|
||||
@Procedure
|
||||
int sp_add_tn_cmt_event(
|
||||
String evtType,
|
||||
Integer upCmtSeq,
|
||||
Integer cmtSeq,
|
||||
String evtTitle,
|
||||
String evtLocation,
|
||||
String evtContents,
|
||||
Date evtStartDt,
|
||||
Date evtEndDt,
|
||||
String modiId,
|
||||
Integer _evt_seq,
|
||||
Integer _result_count,
|
||||
String _result_code,
|
||||
String _error_message
|
||||
@Param("_evt_type") String evtType,
|
||||
@Param("_up_cmt_seq") Integer upCmtSeq,
|
||||
@Param("_cmt_seq") Integer cmtSeq,
|
||||
@Param("_evt_title") String evtTitle,
|
||||
@Param("_evt_location") String evtLocation,
|
||||
@Param("_evt_contents") String evtContents,
|
||||
@Param("_evt_start_dt") Date evtStartDt,
|
||||
@Param("_evt_end_dt") Date evtEndDt,
|
||||
@Param("_modi_id") String modiId,
|
||||
@Param("_evt_seq") Integer _evt_seq,
|
||||
@Param("_result_count") Integer _result_count,
|
||||
@Param("_result_code") String _result_code,
|
||||
@Param("_error_message") String _error_message
|
||||
);
|
||||
|
||||
/*
|
||||
@Query(value = "CALL sp_add_tn_cmt_event (" +
|
||||
":_evt_type, " +
|
||||
":_up_cmt_seq, " +
|
||||
":_cmt_seq, " +
|
||||
":_evt_title, " +
|
||||
":_evt_location, " +
|
||||
":_evt_contents, " +
|
||||
"TO_TIMESTAMP(" +
|
||||
" :_evt_start_dt," +
|
||||
" 'YYYY-MM-DD HH24:MI:SS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
"TO_TIMESTAMP(" +
|
||||
" :_evt_end_dt," +
|
||||
" 'YYYY-MM-DD HH24:MI:SS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
":_modi_id, " +
|
||||
":_evt_seq, " +
|
||||
":_result_count, " +
|
||||
":_result_code, " +
|
||||
":_error_message)",
|
||||
nativeQuery = true)
|
||||
Map<String, Object> spAddTnCmtEvent(
|
||||
@Param("_evt_type") String evtType,
|
||||
@Param("_up_cmt_seq") Integer upCmtSeq,
|
||||
@Param("_cmt_seq") Integer cmtSeq,
|
||||
@Param("_evt_title") String evtTitle,
|
||||
@Param("_evt_location") String evtLocation,
|
||||
@Param("_evt_contents") String evtContents,
|
||||
@Param("_evt_start_dt") String evtStartDt,
|
||||
@Param("_evt_end_dt") String evtEndDt,
|
||||
@Param("_modi_id") String modiId,
|
||||
@Param("_evt_seq") Integer evtSeq,
|
||||
@Param("_result_count") Integer resultCount,
|
||||
@Param("_result_code") String resultCode,
|
||||
@Param("_error_message") String errorMessage
|
||||
);
|
||||
|
||||
|
||||
//@Procedure
|
||||
//Map<String, Object> sp_is_valid_tn_cmt_event_id( @Param("_evt_seq") Long evtSeq );
|
||||
|
||||
@Procedure
|
||||
int sp_add_tn_cmt_event(
|
||||
String _evt_type,
|
||||
Integer _up_cmt_seq,
|
||||
Integer _cmt_seq,
|
||||
String _evt_title,
|
||||
String _evt_location,
|
||||
String _evt_contents,
|
||||
String _evt_start_dt,
|
||||
String _evt_end_dt,
|
||||
String _modi_id
|
||||
int sp_is_valid_tn_cmt_event_id( Long evtSeq );
|
||||
|
||||
@Query(value = "CALL sp_is_valid_tn_cmt_event_id ( :_evt_seq )",
|
||||
nativeQuery = true)
|
||||
int spIsValidTnCmtEventId(
|
||||
@Param("_evt_seq") Long evtSeq
|
||||
);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,4 +47,22 @@ public class AdminUsersController extends BaseController {
|
|||
return resultVO;
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "사용자 정보 조회",
|
||||
description = "사용자 정보 조회",
|
||||
tags = {"AdminUsersController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@RequestMapping(method = RequestMethod.GET, value = "/info")
|
||||
public ResultVO getUserInfo(UserInfo params) throws Exception{
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("userInfo", adminUsersService.selectUserInfo(params.getUserSeq()));
|
||||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,4 +22,10 @@ public class AdminUsersService {
|
|||
public Integer selectUserListCnt(UserInfo params) {
|
||||
return usersMapper.selectUserListCnt(params);
|
||||
}
|
||||
|
||||
public UserInfo selectUserInfo(Integer userSeq) {
|
||||
UserInfo info = userInfoRepository.findById(userSeq).orElse(new UserInfo());
|
||||
info.setPassword(null);
|
||||
return info;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,14 @@ import lombok.NoArgsConstructor;
|
|||
import lombok.Setter;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
|
@ -42,8 +45,16 @@ public class UserInfo extends BoardParams implements UserDetails{
|
|||
private String phoneNum;
|
||||
@Column(name = "user_role")
|
||||
private String userRole;
|
||||
@Column(name = "use_yn")
|
||||
private String useYn;
|
||||
@Column(name = "status")
|
||||
private String status;
|
||||
@Column(name = "frst_crt_dt")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime frstCrtDt;
|
||||
@Column(name = "last_chg_id")
|
||||
private String lastChgId;
|
||||
@Column(name = "last_chg_dt")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime lastChgDt;
|
||||
|
||||
@Override
|
||||
@JsonIgnore
|
||||
|
|
@ -76,8 +87,9 @@ public class UserInfo extends BoardParams implements UserDetails{
|
|||
}
|
||||
|
||||
@Override
|
||||
@JsonIgnore
|
||||
public boolean isEnabled() {
|
||||
return true;
|
||||
return getStatus().equals("USE_ST");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
|
|
@ -63,6 +64,8 @@ public class EgovLoginServiceImpl extends EgovAbstractServiceImpl implements Ego
|
|||
info.setEmail(loginVO.getEmail());
|
||||
info.setPhoneNum(loginVO.getPhoneNum());
|
||||
info.setUserSe("ACC_TP02");
|
||||
info.setStatus("USE_ST");
|
||||
info.setFrstCrtDt(LocalDateTime.now());
|
||||
userInfoRepository.save(info);
|
||||
return info.getUserSeq();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.dbnt.kcscbackend.config.common;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
|
@ -39,9 +40,11 @@ public class BoardParams implements Serializable {
|
|||
@Schema(description = "정렬순서(DESC,ASC)")
|
||||
private long sortOrdr = 0L;
|
||||
|
||||
@JsonIgnore
|
||||
public void setQueryInfo(){
|
||||
setFirstIndex((getPageIndex()-1)*getRowCnt());
|
||||
}
|
||||
@JsonIgnore
|
||||
public void setPaginationInfo(){
|
||||
int contentCnt = getContentCnt();
|
||||
int rowCnt = getRowCnt();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ spring.datasource.url=jdbc:log4jdbc:postgresql://127.0.0.1:5432/kcsc
|
|||
spring.datasource.username=dbnt0031
|
||||
spring.datasource.password=dbnt0928!
|
||||
|
||||
|
||||
#jpa
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.generate-ddl=false
|
||||
|
|
@ -25,6 +26,7 @@ spring.jpa.hibernate.naming.physical-strategy = org.hibernate.boot.model.naming.
|
|||
spring.jpa.properties.hibernate.proc.param_null_passing=true
|
||||
|
||||
|
||||
|
||||
# MyBatis
|
||||
mybatis.mapper-locations: mybatisMapper/*.xml
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@
|
|||
|
||||
<select id="selectUserList" parameterType="UserInfo" resultType="UserInfo">
|
||||
select user_seq,
|
||||
user_id,
|
||||
email,
|
||||
user_se,
|
||||
user_nm,
|
||||
phone_num,
|
||||
user_role,
|
||||
use_yn
|
||||
from user_info
|
||||
a.user_id,
|
||||
a.email,
|
||||
b.item_nm as user_se,
|
||||
a.user_nm,
|
||||
a.phone_num,
|
||||
a.user_role,
|
||||
c.item_nm as status
|
||||
from user_info a
|
||||
inner join tc_code_item b on a.user_se = b.item_cd
|
||||
inner join tc_code_item c on a.status = c.item_cd
|
||||
<include refid="selectUserListWhere"></include>
|
||||
order by user_seq asc
|
||||
limit #{rowCnt} offset #{firstIndex}
|
||||
|
|
|
|||
Loading…
Reference in New Issue