Compare commits
4 Commits
2f7456ae62
...
081f34f883
| Author | SHA1 | Date |
|---|---|---|
|
|
081f34f883 | |
|
|
b3eecb0f50 | |
|
|
eef87b6e81 | |
|
|
5f855dc6b0 |
|
|
@ -11,13 +11,13 @@ function CheckBox({name, grpCd, selectedValue}){
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(selectedValue){
|
if(checkBox&&selectedValue){
|
||||||
const itemCdAry = selectedValue.split(',');
|
const itemCdAry = selectedValue.split(',');
|
||||||
itemCdAry.forEach(function(itemCd){
|
itemCdAry.forEach(function(itemCd){
|
||||||
document.querySelector(`#chkBox_${itemCd}`).checked = true;
|
document.querySelector(`#chkBox_${itemCd}`).checked = true;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, [selectedValue]);
|
}, [checkBox]);
|
||||||
|
|
||||||
function getCodeItemList() {
|
function getCodeItemList() {
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ function SelectOption({name, grpCd, selectedValue}){
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCodeItemList()
|
getCodeItemList()
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setValue(selectedValue)
|
setValue(selectedValue)
|
||||||
}, [selectedValue]);
|
}, [selectedValue]);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ function List({}) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const [listTag, setListTag] = useState([]);
|
const [listTag, setListTag] = useState([]);
|
||||||
const [userSeOption, setUserSeOption] = useState([]);
|
|
||||||
|
|
||||||
const [paginationInfo, setPaginationInfo] = useState({});
|
const [paginationInfo, setPaginationInfo] = useState({});
|
||||||
|
|
||||||
|
|
@ -40,32 +39,24 @@ function List({}) {
|
||||||
(resp) => {
|
(resp) => {
|
||||||
setPaginationInfo(resp.result.paginationInfo);
|
setPaginationInfo(resp.result.paginationInfo);
|
||||||
let mutListTag = [];
|
let mutListTag = [];
|
||||||
let userSeTag = [];
|
|
||||||
|
|
||||||
setListTag([]);
|
setListTag([]);
|
||||||
setUserSeOption([]);
|
|
||||||
// 리스트 항목 구성
|
// 리스트 항목 구성
|
||||||
resp.result.userList.forEach(function (item, index) {
|
resp.result.userList.forEach(function (item, index) {
|
||||||
mutListTag.push(
|
mutListTag.push(
|
||||||
<div className={"list_item"} key={"userListDiv_"+index}>
|
<div className={"list_item"} key={"userListDiv_"+index}>
|
||||||
<div>{item.userSe}</div>
|
<div><a href={"#"} onClick={()=>{userInfoModal(item)}}>{item.userId}</a></div>
|
||||||
<div><a href={"#"} onClick={()=>{userInfoModal(item.userSeq)}}>{item.userId}</a></div>
|
|
||||||
<div>{item.userNm}</div>
|
<div>{item.userNm}</div>
|
||||||
<div>{item.email}</div>
|
<div>{item.email}</div>
|
||||||
<div>{item.phoneNum}</div>
|
<div>{item.phoneNum}</div>
|
||||||
<div>{item.status}</div>
|
<div>{item.statusValue}</div>
|
||||||
<div><button className={"btn btn_red_h31 px-1"} onClick={()=>{removeUserInfo(item.userSeq)}}>삭제</button></div>
|
<div><button className={"btn btn_red_h31 px-1"} onClick={()=>{removeUserInfo(item.userSeq)}}>삭제</button></div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
if(!mutListTag.length) mutListTag.push(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); // 게시판 목록 초기값
|
if(!mutListTag.length) mutListTag.push(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); // 게시판 목록 초기값
|
||||||
|
|
||||||
resp.result.userSeOption.forEach(function (item, index){
|
|
||||||
userSeTag.push(<option value={item.itemCd}>{item.itemNm}</option>)
|
|
||||||
})
|
|
||||||
|
|
||||||
setListTag(mutListTag);
|
setListTag(mutListTag);
|
||||||
setUserSeOption(userSeTag);
|
|
||||||
},
|
},
|
||||||
function (resp) {
|
function (resp) {
|
||||||
console.log("err response : ", resp);
|
console.log("err response : ", resp);
|
||||||
|
|
@ -85,9 +76,9 @@ function List({}) {
|
||||||
setSearchCondition({...searchCondition, pageIndex: passedPage})
|
setSearchCondition({...searchCondition, pageIndex: passedPage})
|
||||||
});
|
});
|
||||||
|
|
||||||
function userInfoModal(userSeq){
|
function userInfoModal(userInfo){
|
||||||
handleShow()
|
handleShow()
|
||||||
setModalBody(<UserInfoModal userSeq={userSeq} reloadFunction={retrieveList}></UserInfoModal>)
|
setModalBody(<UserInfoModal savedInfo={userInfo} reloadFunction={retrieveList}></UserInfoModal>)
|
||||||
}
|
}
|
||||||
|
|
||||||
const removeUserInfo = useCallback((seq)=>{
|
const removeUserInfo = useCallback((seq)=>{
|
||||||
|
|
@ -137,16 +128,6 @@ function List({}) {
|
||||||
{/* <!-- 검색조건 --> */}
|
{/* <!-- 검색조건 --> */}
|
||||||
<div className="condition">
|
<div className="condition">
|
||||||
<ul>
|
<ul>
|
||||||
<li className="third_1 L">
|
|
||||||
<label className="f_select" htmlFor="sel1">
|
|
||||||
|
|
||||||
<select id="sel1" title="구분" defaultValue={searchCondition.userSe}
|
|
||||||
onChange={(e) => {setSearchCondition({...searchCondition, userSe: e.target.value})}}>
|
|
||||||
<option value="">전체</option>
|
|
||||||
{userSeOption}
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</li>
|
|
||||||
<li className="third_1 L">
|
<li className="third_1 L">
|
||||||
<label className="f_select" htmlFor="sel1">
|
<label className="f_select" htmlFor="sel1">
|
||||||
<select id="sel1" title="조건" defaultValue={searchCondition.searchCondition}
|
<select id="sel1" title="조건" defaultValue={searchCondition.searchCondition}
|
||||||
|
|
@ -170,7 +151,6 @@ function List({}) {
|
||||||
|
|
||||||
<div className="board_list userList">
|
<div className="board_list userList">
|
||||||
<div className="head">
|
<div className="head">
|
||||||
<span>구분</span>
|
|
||||||
<span>아이디</span>
|
<span>아이디</span>
|
||||||
<span>이름</span>
|
<span>이름</span>
|
||||||
<span>이메일</span>
|
<span>이메일</span>
|
||||||
|
|
|
||||||
|
|
@ -9,37 +9,7 @@ import SelectOption from "components/commonCode/SelectOption";
|
||||||
import CheckBox from "components/commonCode/CheckBox";
|
import CheckBox from "components/commonCode/CheckBox";
|
||||||
import CODE from "../../../constants/code";
|
import CODE from "../../../constants/code";
|
||||||
|
|
||||||
function UserInfoModal({userSeq, reloadFunction}){
|
function UserInfoModal({savedInfo, reloadFunction}){
|
||||||
|
|
||||||
const [userInfo, setUserInfo] = useState({ userSeq: '', userId: '', password: '', passwordChk: '', userNm: '', email: '', phoneNum: '', userSe:'', userRole:'', status:''});
|
|
||||||
|
|
||||||
function getModalContent(){
|
|
||||||
EgovNet.requestFetch(
|
|
||||||
'/admin/users/info?userSeq='+userSeq,
|
|
||||||
{
|
|
||||||
method: "GET"
|
|
||||||
},
|
|
||||||
(resp) => {
|
|
||||||
const respInfo = resp.result.userInfo;
|
|
||||||
const info = {
|
|
||||||
userSeq: respInfo.userSeq,
|
|
||||||
userId: respInfo.userId,
|
|
||||||
userNm: respInfo.userNm,
|
|
||||||
email: respInfo.email,
|
|
||||||
phoneNum: respInfo.phoneNum,
|
|
||||||
password: "",
|
|
||||||
passwordChk: "",
|
|
||||||
userSe: respInfo.userSe,
|
|
||||||
userRole: respInfo.userRole,
|
|
||||||
status: respInfo.status
|
|
||||||
}
|
|
||||||
setUserInfo(info);
|
|
||||||
},
|
|
||||||
(resp) => {
|
|
||||||
console.log("err response : ", resp);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function userInfoChange(e){
|
function userInfoChange(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
@ -53,7 +23,6 @@ function UserInfoModal({userSeq, reloadFunction}){
|
||||||
userNm: form.userNm.value,
|
userNm: form.userNm.value,
|
||||||
email: form.email.value,
|
email: form.email.value,
|
||||||
phoneNum: form.phoneNum.value,
|
phoneNum: form.phoneNum.value,
|
||||||
userSe: form.userSe.value,
|
|
||||||
userRole: '',
|
userRole: '',
|
||||||
status: form.status.value,
|
status: form.status.value,
|
||||||
}
|
}
|
||||||
|
|
@ -88,26 +57,22 @@ function UserInfoModal({userSeq, reloadFunction}){
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getModalContent();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Modal.Header closeButton>
|
<Modal.Header closeButton>
|
||||||
<Modal.Title>
|
<Modal.Title>
|
||||||
{userInfo.userNm} 상세정보
|
{savedInfo?.userNm} 상세정보
|
||||||
</Modal.Title>
|
</Modal.Title>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
<Form onSubmit={(e) =>{userInfoChange(e)}} noValidate>
|
<Form onSubmit={(e) =>{userInfoChange(e)}} noValidate>
|
||||||
<input type={"hidden"} name={"userSeq"} defaultValue={userInfo.userSeq} />
|
<input type={"hidden"} name={"userSeq"} defaultValue={savedInfo?.userSeq} />
|
||||||
<Form.Group as={Row} className="mb-3">
|
<Form.Group as={Row} className="mb-3">
|
||||||
<Form.Label column sm={3}>
|
<Form.Label column sm={3}>
|
||||||
아이디
|
아이디
|
||||||
</Form.Label>
|
</Form.Label>
|
||||||
<Col sm={9}>
|
<Col sm={9}>
|
||||||
<Form.Control type="text" name="userId" placeholder="아이디" required defaultValue={userInfo?.userId} readOnly/>
|
<Form.Control type="text" name="userId" placeholder="아이디" required defaultValue={savedInfo?.userId} readOnly/>
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Form.Group as={Row} className="mb-3">
|
<Form.Group as={Row} className="mb-3">
|
||||||
|
|
@ -131,7 +96,7 @@ function UserInfoModal({userSeq, reloadFunction}){
|
||||||
이름
|
이름
|
||||||
</Form.Label>
|
</Form.Label>
|
||||||
<Col sm={9}>
|
<Col sm={9}>
|
||||||
<Form.Control type="text" name="userNm" placeholder="이름" required defaultValue={userInfo?.userNm} />
|
<Form.Control type="text" name="userNm" placeholder="이름" required defaultValue={savedInfo?.userNm} />
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Form.Group as={Row} className="mb-3">
|
<Form.Group as={Row} className="mb-3">
|
||||||
|
|
@ -139,7 +104,7 @@ function UserInfoModal({userSeq, reloadFunction}){
|
||||||
이메일
|
이메일
|
||||||
</Form.Label>
|
</Form.Label>
|
||||||
<Col sm={9}>
|
<Col sm={9}>
|
||||||
<Form.Control type="email" name="email" placeholder="email" required defaultValue={userInfo?.email} />
|
<Form.Control type="email" name="email" placeholder="email" required defaultValue={savedInfo?.email} />
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Form.Group as={Row} className="mb-3">
|
<Form.Group as={Row} className="mb-3">
|
||||||
|
|
@ -147,15 +112,7 @@ function UserInfoModal({userSeq, reloadFunction}){
|
||||||
연락처
|
연락처
|
||||||
</Form.Label>
|
</Form.Label>
|
||||||
<Col sm={9}>
|
<Col sm={9}>
|
||||||
<Form.Control type="text" name="phoneNum" placeholder="연락처" required defaultValue={userInfo?.phoneNum} />
|
<Form.Control type="text" name="phoneNum" placeholder="연락처" required defaultValue={savedInfo?.phoneNum} />
|
||||||
</Col>
|
|
||||||
</Form.Group>
|
|
||||||
<Form.Group as={Row} className="mb-3">
|
|
||||||
<Form.Label column sm={3}>
|
|
||||||
사용자 유형
|
|
||||||
</Form.Label>
|
|
||||||
<Col sm={9}>
|
|
||||||
<SelectOption name={"userSe"} grpCd={"ACC_TYPE"} selectedValue={userInfo?.userSe} />
|
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Form.Group as={Row} className="mb-3">
|
<Form.Group as={Row} className="mb-3">
|
||||||
|
|
@ -163,7 +120,7 @@ function UserInfoModal({userSeq, reloadFunction}){
|
||||||
사용자 권한
|
사용자 권한
|
||||||
</Form.Label>
|
</Form.Label>
|
||||||
<Col sm={9}>
|
<Col sm={9}>
|
||||||
<CheckBox name={"userRole"} grpCd={"ROLE"} selectedValue={userInfo?.userRole} />
|
<CheckBox name={"userRole"} grpCd={"ROLE"} selectedValue={savedInfo?.userRole} />
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Form.Group as={Row} className="mb-3">
|
<Form.Group as={Row} className="mb-3">
|
||||||
|
|
@ -171,7 +128,7 @@ function UserInfoModal({userSeq, reloadFunction}){
|
||||||
상태
|
상태
|
||||||
</Form.Label>
|
</Form.Label>
|
||||||
<Col sm={9}>
|
<Col sm={9}>
|
||||||
<SelectOption name={"status"} grpCd={"ACC_STUS"} selectedValue={userInfo?.status} />
|
<SelectOption name={"status"} grpCd={"ACC_STUS"} selectedValue={savedInfo?.status} />
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Row className="mb-3">
|
<Row className="mb-3">
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
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;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
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;
|
||||||
|
|
@ -161,6 +162,7 @@ public class PopUpApiController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "팝업 비활성화 API",
|
summary = "팝업 비활성화 API",
|
||||||
description = "관리자 단에서 '컨텐츠 관리' > '팝업 관리' 페이지에서 팝업을 비활성화 API. 삭제가 아닌 비활성화 임. 삭제는 없음.",
|
description = "관리자 단에서 '컨텐츠 관리' > '팝업 관리' 페이지에서 팝업을 비활성화 API. 삭제가 아닌 비활성화 임. 삭제는 없음.",
|
||||||
|
|
@ -199,6 +201,47 @@ public class PopUpApiController {
|
||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(
|
||||||
|
summary = "팝업 활성화 또는 비활성화 설정하는 API",
|
||||||
|
description = "관리자 단에서 '컨텐츠 관리' > '팝업 관리' 페이지에서 '사용여부'를 활성화 또는 비활성화 설정해주는 API.",
|
||||||
|
tags = {"PopUpApiController"}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
||||||
|
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
|
||||||
|
})
|
||||||
|
@PutMapping(value = "/contents/api/popup-manage/activation-switch/{popupId}")
|
||||||
|
public ResultVO contentsApiPopUpManageUpdateActivationSwitch(
|
||||||
|
HttpServletRequest request,
|
||||||
|
@AuthenticationPrincipal LoginVO loginVO,
|
||||||
|
@ApiParam(value="활성화 여부") @RequestParam(required=true) String checked,
|
||||||
|
@PathVariable("popupId") Long popupId
|
||||||
|
) throws Exception {
|
||||||
|
|
||||||
|
ResultVO resultVO = new ResultVO();
|
||||||
|
|
||||||
|
try {
|
||||||
|
resultVO = popUpApiService.contentsApiPopUpManageUpdateActivationSwitch(resultVO, request, loginVO, checked, 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(
|
@Operation(
|
||||||
summary = "팝업 내용 불러오기 API",
|
summary = "팝업 내용 불러오기 API",
|
||||||
description = "관리자 단에서 '컨텐츠 관리' > '팝업 관리' 페이지에서 저장된 팝업을 불러오는 API",
|
description = "관리자 단에서 '컨텐츠 관리' > '팝업 관리' 페이지에서 저장된 팝업을 불러오는 API",
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@ import com.dbnt.kcscbackend.admin.contents.popUp.model.CreatePopupVO;
|
||||||
import com.dbnt.kcscbackend.admin.contents.popUp.model.UpdatePopupVO;
|
import com.dbnt.kcscbackend.admin.contents.popUp.model.UpdatePopupVO;
|
||||||
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
import com.dbnt.kcscbackend.auth.entity.LoginVO;
|
||||||
import com.dbnt.kcscbackend.config.common.ResultVO;
|
import com.dbnt.kcscbackend.config.common.ResultVO;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
@ -14,6 +18,7 @@ public interface PopUpApiService {
|
||||||
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 contentsApiPopUpManageRead(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception;
|
||||||
public ResultVO contentsApiPopUpManageUpdate(ResultVO resultVO, HttpServletRequest request, LoginVO user, UpdatePopupVO updatePopupVO, Long popupId) throws Exception;
|
public ResultVO contentsApiPopUpManageUpdate(ResultVO resultVO, HttpServletRequest request, LoginVO user, UpdatePopupVO updatePopupVO, Long popupId) throws Exception;
|
||||||
|
|
||||||
public ResultVO contentsApiPopUpManageDelete(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception;
|
public ResultVO contentsApiPopUpManageDelete(ResultVO resultVO, HttpServletRequest request, LoginVO user, Long popupId) throws Exception;
|
||||||
|
public ResultVO contentsApiPopUpManageUpdateActivationSwitch(ResultVO resultVO, HttpServletRequest request, LoginVO user, String checked, Long popupId) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -236,6 +236,13 @@ public class PopUpApiServiceImpl extends EgovAbstractServiceImpl implements PopU
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, Object> dto = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
if( false ) {
|
||||||
|
// 삭제 procedure가 삭제가 아닌 비활성화만 시키므로 해당 프로시저 사용 안 함.
|
||||||
Map<String, Object> response = tnPopupMngRepository.spDeleteTnPopupMng(
|
Map<String, Object> response = tnPopupMngRepository.spDeleteTnPopupMng(
|
||||||
popupId.intValue(),
|
popupId.intValue(),
|
||||||
"admin",
|
"admin",
|
||||||
|
|
@ -243,10 +250,55 @@ public class PopUpApiServiceImpl extends EgovAbstractServiceImpl implements PopU
|
||||||
null,
|
null,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
dto.put("errorMessage", response.get("_error_message") );
|
||||||
|
} else {
|
||||||
|
tnPopupMngRepository.deleteById(popupId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dto.put("popupId", popupId );
|
||||||
|
|
||||||
|
resultVO.setResult(dto);
|
||||||
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
|
||||||
|
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultVO contentsApiPopUpManageUpdateActivationSwitch(ResultVO resultVO, HttpServletRequest request, LoginVO user, String checked, Long popupId) throws Exception {
|
||||||
|
System.out.println(
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
request.getRequestURI() + " IN:" +
|
||||||
|
"\n--------------------------------------------------------------\n" +
|
||||||
|
"checked:" + "\n" +
|
||||||
|
checked + "\n" +
|
||||||
|
"popupId:" + "\n" +
|
||||||
|
popupId + "\n" +
|
||||||
|
"\n--------------------------------------------------------------\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 유효성 검사 실시
|
||||||
|
int isValid = tnPopupMngRepository.spIsValidTnPopupMngId( popupId.intValue() );
|
||||||
|
|
||||||
|
if( isValid == 0 ) {
|
||||||
|
throw new Exception("대상이 존재하지 않습니다.");
|
||||||
|
}
|
||||||
|
|
||||||
|
TnPopupMng tnPopupMng = tnPopupMngRepository.findByPopupSeq(popupId);
|
||||||
|
if( Boolean.parseBoolean(checked) ) {
|
||||||
|
tnPopupMng.setUseYn("Y");
|
||||||
|
} else {
|
||||||
|
tnPopupMng.setUseYn("N");
|
||||||
|
}
|
||||||
|
|
||||||
|
tnPopupMngRepository.saveAndFlush(tnPopupMng);
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> dto = new HashMap<String, Object>();
|
Map<String, Object> dto = new HashMap<String, Object>();
|
||||||
dto.put("errorMessage", response.get("_error_message") );
|
dto.put("popupId", popupId);
|
||||||
dto.put("popupId", popupId );
|
|
||||||
|
|
||||||
resultVO.setResult(dto);
|
resultVO.setResult(dto);
|
||||||
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@ public class AdminUsersService extends EgovAbstractServiceImpl {
|
||||||
}
|
}
|
||||||
savedInfo.setEmail(info.getEmail());
|
savedInfo.setEmail(info.getEmail());
|
||||||
savedInfo.setPhoneNum(info.getPhoneNum());
|
savedInfo.setPhoneNum(info.getPhoneNum());
|
||||||
savedInfo.setUserSe(info.getUserSe());
|
|
||||||
savedInfo.setUserRole(info.getUserRole());
|
savedInfo.setUserRole(info.getUserRole());
|
||||||
savedInfo.setStatus(info.getStatus());
|
savedInfo.setStatus(info.getStatus());
|
||||||
savedInfo.setLastChgId(updateUser);
|
savedInfo.setLastChgId(updateUser);
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ public class UserInfo extends BoardParams implements UserDetails{
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private String passwordChk;
|
private String passwordChk;
|
||||||
|
@Transient
|
||||||
|
private String statusValue;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ public class TnPopupMng {
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class TnPopupMngId implements Serializable {
|
public static class TnPopupMngId implements Serializable {
|
||||||
|
private static final long serialVersionUID = -6558812991140219351L;
|
||||||
private String popupSeq;
|
private String popupSeq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
public interface TnPopupMngRepository extends JpaRepository<TnPopupMng, TnPopupMng.TnPopupMngId> {
|
public interface TnPopupMngRepository extends JpaRepository<TnPopupMng, Long> {
|
||||||
|
|
||||||
@Query(value = "CALL sp_add_tn_popup_mng (" +
|
@Query(value = "CALL sp_add_tn_popup_mng (" +
|
||||||
":_popup_title, " +
|
":_popup_title, " +
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
a.user_nm,
|
a.user_nm,
|
||||||
a.phone_num,
|
a.phone_num,
|
||||||
a.user_role,
|
a.user_role,
|
||||||
c.item_nm as status
|
a.status,
|
||||||
|
c.item_nm as status_value
|
||||||
from user_info a
|
from user_info a
|
||||||
inner join tc_code_item b on a.user_se = b.item_cd
|
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
|
inner join tc_code_item c on a.status = c.item_cd
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue