Merge branch 'master' of http://docs.nculture.org:30000/nculture/iams.nlib
This commit is contained in:
commit
cf5aee0d62
@ -86,24 +86,21 @@ public class InterestController extends NlibCommonController
|
|||||||
@RequestParam Map<String, String> paramMap,
|
@RequestParam Map<String, String> paramMap,
|
||||||
CollectionVO searchCollectionVO, ModelMap model) throws Exception {
|
CollectionVO searchCollectionVO, ModelMap model) throws Exception {
|
||||||
String message = "";
|
String message = "";
|
||||||
String mbInfoId = getMbInfoId(request);
|
|
||||||
|
|
||||||
if(StringUtil.isEmpty(mbInfoId)) {
|
//사용자 정보를 가져온다.
|
||||||
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
|
||||||
|
if(loginVO == null) {
|
||||||
message = "로그인하신 후, 이용바랍니다.";
|
message = "로그인하신 후, 이용바랍니다.";
|
||||||
model.addAttribute("message", message);
|
model.addAttribute("message", message);
|
||||||
model.addAttribute("url", "/login/loginForm.do");
|
model.addAttribute("url", "/login/loginForm.do");
|
||||||
return "nlib/cmm/alert";
|
return "nlib/cmm/alert";
|
||||||
}
|
}
|
||||||
List<DeptVO> vo = new ArrayList();
|
|
||||||
|
|
||||||
//사용자 정보를 가져온다.
|
|
||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
|
||||||
|
|
||||||
searchCollectionVO.setMbInfoId(loginVO.getMbInfoId());
|
searchCollectionVO.setMbInfoId(loginVO.getMbInfoId());
|
||||||
|
|
||||||
//문화원 목록 조회
|
//문화원 목록 조회
|
||||||
vo = interestService.selectOrgList(searchCollectionVO);
|
List<DeptVO> vo = interestService.selectOrgList(searchCollectionVO);
|
||||||
model.addAttribute("pdfUri",NlibProperty.getProperty("pdf.uri"));
|
|
||||||
model.addAttribute("deptList",vo);
|
model.addAttribute("deptList",vo);
|
||||||
model.addAttribute("searchCollection", searchCollectionVO);
|
model.addAttribute("searchCollection", searchCollectionVO);
|
||||||
return "nlib/collection/listInterests";
|
return "nlib/collection/listInterests";
|
||||||
@ -136,7 +133,7 @@ public class InterestController extends NlibCommonController
|
|||||||
List<CollectionVO> interestList = interestService.listInterests(searchCollectionVO);
|
List<CollectionVO> interestList = interestService.listInterests(searchCollectionVO);
|
||||||
totalCount = interestService.countListInterests(searchCollectionVO);
|
totalCount = interestService.countListInterests(searchCollectionVO);
|
||||||
|
|
||||||
String mbInfoId = getMbInfoId(request);
|
|
||||||
operList = collectionService.setDetailInfoForList(interestList, getMbInfoId(request));
|
operList = collectionService.setDetailInfoForList(interestList, getMbInfoId(request));
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
// JSON변환 응답 처리
|
// JSON변환 응답 처리
|
||||||
@ -166,17 +163,16 @@ public class InterestController extends NlibCommonController
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="/interest/deleteInterests.ajax")
|
@RequestMapping(value="/interest/deleteInterests.ajax")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public String deleteInterests(@RequestParam(value="masterIdList[]") List<String> masterIdList,Authentication authentication) {
|
public String deleteInterests(HttpServletRequest request, @RequestParam(value="masterIdList[]") List<String> masterIdList,Authentication authentication) {
|
||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
String mbInfoId = getMbInfoId(request);
|
||||||
String message="";
|
String message="";
|
||||||
|
|
||||||
if(loginVO.getMbInfoId() == null)
|
if(StringUtil.isEmpty(mbInfoId)) {
|
||||||
{
|
message="로그인 후, 이용하실 수 있습니다.";
|
||||||
message="로그인 후 이용하실 수 있습니다.";
|
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
interestService.deleteInterests(masterIdList,loginVO.getMbInfoId());
|
interestService.deleteInterests(masterIdList,mbInfoId);
|
||||||
message ="선택하신 관심자료가 삭제되었습니다.";
|
message ="선택하신 관심자료가 삭제되었습니다.";
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
@ -187,19 +183,22 @@ public class InterestController extends NlibCommonController
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="/interest/insertInterest.ajax")
|
@RequestMapping(value="/interest/insertInterest.ajax")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public String insertInterest(@RequestParam(value="masterId") String masterId,HttpServletResponse response,Authentication authentication,HttpServletRequest request) {
|
public String insertInterest(@RequestParam(value="masterId") String masterId, HttpServletResponse response, Authentication authentication, HttpServletRequest request) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
String message = "";
|
String message = "";
|
||||||
|
String mbInfoId = getMbInfoId(request);
|
||||||
|
|
||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
if(StringUtil.isEmpty(mbInfoId)) {
|
||||||
|
message="로그인 후, 이용하실 수 있습니다.";
|
||||||
|
return message;
|
||||||
|
}
|
||||||
CollectionVO vo = new CollectionVO();
|
CollectionVO vo = new CollectionVO();
|
||||||
vo.setMbInfoId(loginVO.getMbInfoId());
|
vo.setMbInfoId(mbInfoId);
|
||||||
vo.setMasterId(masterId);
|
vo.setMasterId(masterId);
|
||||||
|
|
||||||
if(vo.getMbInfoId() == null)
|
if(vo.getMbInfoId() == null)
|
||||||
{
|
{
|
||||||
message="로그인 후 이용하실 수 있습니다.";
|
message="로그인 후, 이용하실 수 있습니다.";
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -318,6 +318,17 @@ public class NlibSearchController extends NlibCommonController {
|
|||||||
keywordList.add(keyword_arr[i]);
|
keywordList.add(keyword_arr[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//목차 편집
|
||||||
|
if(!(vo == null) && !StringUtil.getString(vo.getBookIndex(),"").equals(""))
|
||||||
|
{
|
||||||
|
String bookIndex = vo.getBookIndex();
|
||||||
|
bookIndex = bookIndex.replace("---","-");
|
||||||
|
|
||||||
|
if(bookIndex.indexOf("***") != -1)
|
||||||
|
bookIndex = bookIndex.substring(0, bookIndex.indexOf("***"));
|
||||||
|
|
||||||
|
vo.setBookIndex(bookIndex);
|
||||||
|
}
|
||||||
model.addAttribute("keywordList",keywordList);
|
model.addAttribute("keywordList",keywordList);
|
||||||
model.addAttribute("result", vo);
|
model.addAttribute("result", vo);
|
||||||
model.addAttribute("searchVO", searchVO);
|
model.addAttribute("searchVO", searchVO);
|
||||||
|
|||||||
@ -197,7 +197,7 @@ public class MemberController extends NlibCommonController{
|
|||||||
int count=0;
|
int count=0;
|
||||||
|
|
||||||
//기 가입계정인지 확인
|
//기 가입계정인지 확인
|
||||||
count=memberService.selectSnsIdCount(oauthUser);
|
count = memberService.selectSnsIdCount(oauthUser);
|
||||||
if(count>0)
|
if(count>0)
|
||||||
{
|
{
|
||||||
model.addAttribute("message", "이미 가입된 계정입니다. 로그인 후, 이용해 주시기 바랍니다.");
|
model.addAttribute("message", "이미 가입된 계정입니다. 로그인 후, 이용해 주시기 바랍니다.");
|
||||||
@ -219,19 +219,19 @@ public class MemberController extends NlibCommonController{
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="/member/insertMemberInfoForm.do")
|
@RequestMapping(value="/member/insertMemberInfoForm.do")
|
||||||
public String insertMemberInfoForm(HttpServletRequest request,NlibLoginVO vo,HttpSession session,ModelMap model ) throws Exception{
|
public String insertMemberInfoForm(HttpServletRequest request,NlibLoginVO vo,HttpSession session,ModelMap model ) throws Exception{
|
||||||
int siteCnt;
|
|
||||||
String jsessionId = session.getId();
|
String jsessionId = session.getId();
|
||||||
String councilCd = (String)session.getAttribute("councilCd");
|
|
||||||
//String councilReturnUrl = (String)session.getAttribute("councilReturnUrl");
|
|
||||||
|
|
||||||
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
||||||
|
|
||||||
if(!(oauthUser == null))
|
if(oauthUser == null)
|
||||||
{
|
{
|
||||||
|
model.addAttribute("msg","SNS인증이 정상적이지않습니다. 다시 회원가입을 진행해주세요.");
|
||||||
|
model.addAttribute("url","${pageContext.request.contextPath}"+NlibProperty.getString("member.new.url"));
|
||||||
|
return "nlib/cmm/alert";
|
||||||
|
}
|
||||||
// 등록된 ID가 있는 지 확인
|
// 등록된 ID가 있는 지 확인
|
||||||
if(!(StringUtil.getString(oauthUser.getSnsUserId(),"")== ""))
|
if(!(StringUtil.getString(oauthUser.getSnsUserId(),"")== ""))
|
||||||
vo = memberService.selectAlreadySignUpId(oauthUser);
|
vo = memberService.selectAlreadySignUpId(oauthUser);
|
||||||
}
|
|
||||||
/* 등록된 ID가 있을때 통합처리 */
|
/* 등록된 ID가 있을때 통합처리 */
|
||||||
if(vo != null && !StringUtil.getString(vo.getMbInfoId(), "").equals(""))
|
if(vo != null && !StringUtil.getString(vo.getMbInfoId(), "").equals(""))
|
||||||
{
|
{
|
||||||
@ -280,11 +280,21 @@ public class MemberController extends NlibCommonController{
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="/member/snsAccountLink.ajax" , method=RequestMethod.POST)
|
@RequestMapping(value="/member/snsAccountLink.ajax" , method=RequestMethod.POST)
|
||||||
public @ResponseBody String snsAccountLink(NlibLoginVO vo,HttpServletResponse response,Authentication authentication,ModelMap model,HttpServletRequest request,HttpSession session) throws Exception{
|
public @ResponseBody String snsAccountLink(NlibLoginVO vo,HttpServletResponse response,Authentication authentication,ModelMap model,HttpServletRequest request,HttpSession session) throws Exception{
|
||||||
|
String jsessionId = session.getId();
|
||||||
|
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
||||||
|
|
||||||
|
if(oauthUser == null)
|
||||||
|
{
|
||||||
|
model.addAttribute("msg","SNS인증이 정상적이지않습니다. 다시 회원가입을 진행해주세요.");
|
||||||
|
model.addAttribute("url","${pageContext.request.contextPath}"+NlibProperty.getString("member.new.url"));
|
||||||
|
return "nlib/cmm/alert";
|
||||||
|
}
|
||||||
|
|
||||||
NlibLoginVO loginVO = new NlibLoginVO();
|
NlibLoginVO loginVO = new NlibLoginVO();
|
||||||
loginVO.setMbInfoId(vo.getMbInfoId());
|
loginVO.setMbInfoId(vo.getMbInfoId());
|
||||||
|
|
||||||
//사용자 정보를 가져온다.
|
//사용자 정보를 가져온다.
|
||||||
loginVO=userInfoService.selectMyInfo(loginVO);
|
loginVO = userInfoService.selectMyInfo(loginVO);
|
||||||
|
|
||||||
String msg="";
|
String msg="";
|
||||||
|
|
||||||
@ -294,8 +304,6 @@ public class MemberController extends NlibCommonController{
|
|||||||
|
|
||||||
//암호화된 패스워드 비교
|
//암호화된 패스워드 비교
|
||||||
if(loginVO.getPassword().equals(vo.getPassword())) {
|
if(loginVO.getPassword().equals(vo.getPassword())) {
|
||||||
String jsessionId = session.getId();
|
|
||||||
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
|
||||||
oauthUser.setMbInfoId(vo.getMbInfoId());
|
oauthUser.setMbInfoId(vo.getMbInfoId());
|
||||||
memberService.insertMemberSns(oauthUser);
|
memberService.insertMemberSns(oauthUser);
|
||||||
model.addAttribute("oauthUser",oauthUser);
|
model.addAttribute("oauthUser",oauthUser);
|
||||||
@ -321,6 +329,13 @@ public class MemberController extends NlibCommonController{
|
|||||||
String jsessionId = session.getId();
|
String jsessionId = session.getId();
|
||||||
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
||||||
|
|
||||||
|
if(oauthUser == null)
|
||||||
|
{
|
||||||
|
model.addAttribute("msg","SNS인증이 정상적이지않습니다. 다시 회원가입을 진행해주세요.");
|
||||||
|
model.addAttribute("url","${pageContext.request.contextPath}"+NlibProperty.getString("member.new.url"));
|
||||||
|
return "nlib/cmm/alert";
|
||||||
|
}
|
||||||
|
|
||||||
SessionConfig.setLoginInfo(jsessionId, oauthUser);
|
SessionConfig.setLoginInfo(jsessionId, oauthUser);
|
||||||
session.setAttribute("councilReturnUrl","/member/accountConsolidationForm.do" );//로그인후 이동할페이지
|
session.setAttribute("councilReturnUrl","/member/accountConsolidationForm.do" );//로그인후 이동할페이지
|
||||||
redirectUrl = councilHomeUrl + NlibProperty.getString("nculture.login.post.login.redirect.uri");
|
redirectUrl = councilHomeUrl + NlibProperty.getString("nculture.login.post.login.redirect.uri");
|
||||||
@ -345,6 +360,13 @@ public class MemberController extends NlibCommonController{
|
|||||||
String jsessionId = session.getId();
|
String jsessionId = session.getId();
|
||||||
OAuthUniversalUser oauthUser = SessionConfig.popNewMemberInfo(jsessionId);
|
OAuthUniversalUser oauthUser = SessionConfig.popNewMemberInfo(jsessionId);
|
||||||
|
|
||||||
|
if(oauthUser == null)
|
||||||
|
{
|
||||||
|
model.addAttribute("msg","SNS인증이 정상적이지않습니다. 다시 회원가입을 진행해주세요.");
|
||||||
|
model.addAttribute("url","${pageContext.request.contextPath}"+NlibProperty.getString("member.new.url"));
|
||||||
|
return "nlib/cmm/alert";
|
||||||
|
}
|
||||||
|
|
||||||
model.addAttribute("result",loginVO);
|
model.addAttribute("result",loginVO);
|
||||||
model.addAttribute("oauthUser",oauthUser);
|
model.addAttribute("oauthUser",oauthUser);
|
||||||
return "/nlib/member/accountConsolidationForm";
|
return "/nlib/member/accountConsolidationForm";
|
||||||
@ -356,8 +378,6 @@ public class MemberController extends NlibCommonController{
|
|||||||
@RequestMapping(value="/member/insertMemberInfo.do")
|
@RequestMapping(value="/member/insertMemberInfo.do")
|
||||||
public String insertMemberInfo(NlibLoginVO vo,ModelMap model,HttpSession session,HttpServletRequest request) throws Exception{
|
public String insertMemberInfo(NlibLoginVO vo,ModelMap model,HttpSession session,HttpServletRequest request) throws Exception{
|
||||||
|
|
||||||
EmailVO email = new EmailVO();
|
|
||||||
|
|
||||||
String jsessionId = session.getId();
|
String jsessionId = session.getId();
|
||||||
OAuthUniversalUser oauthUser = SessionConfig.popNewMemberInfo(jsessionId);
|
OAuthUniversalUser oauthUser = SessionConfig.popNewMemberInfo(jsessionId);
|
||||||
if(oauthUser != null && oauthUser.getNlibVO() != null)
|
if(oauthUser != null && oauthUser.getNlibVO() != null)
|
||||||
@ -386,7 +406,6 @@ public class MemberController extends NlibCommonController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//문화원코드
|
//문화원코드
|
||||||
String councilCd = (String)session.getAttribute("councilCd");
|
|
||||||
String councilNm = (String)session.getAttribute("councilNm");
|
String councilNm = (String)session.getAttribute("councilNm");
|
||||||
//클라이언트 IP주소
|
//클라이언트 IP주소
|
||||||
vo.setIp(getRemoteIP(request));
|
vo.setIp(getRemoteIP(request));
|
||||||
@ -454,8 +473,6 @@ public class MemberController extends NlibCommonController{
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
EmailVO emailVO = new EmailVO();
|
|
||||||
|
|
||||||
//인증번호 생성
|
//인증번호 생성
|
||||||
String CertNumber=memberService.numberGen(6,1);
|
String CertNumber=memberService.numberGen(6,1);
|
||||||
|
|
||||||
@ -549,6 +566,10 @@ public class MemberController extends NlibCommonController{
|
|||||||
String jsessionId = session.getId();
|
String jsessionId = session.getId();
|
||||||
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
||||||
|
|
||||||
|
if(oauthUser == null)
|
||||||
|
{
|
||||||
|
return "false";
|
||||||
|
}
|
||||||
//이메일과 인증번호 확인
|
//이메일과 인증번호 확인
|
||||||
if(oauthUser.getNlibVO().getEmail().equals(email) && oauthUser.getNlibVO().getEmailVrfctNo().equals(emailVrfctNo))
|
if(oauthUser.getNlibVO().getEmail().equals(email) && oauthUser.getNlibVO().getEmailVrfctNo().equals(emailVrfctNo))
|
||||||
{
|
{
|
||||||
@ -648,6 +669,11 @@ public class MemberController extends NlibCommonController{
|
|||||||
String jsessionId = session.getId();
|
String jsessionId = session.getId();
|
||||||
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
||||||
|
|
||||||
|
if(oauthUser == null)
|
||||||
|
{
|
||||||
|
return "false";
|
||||||
|
}
|
||||||
|
|
||||||
//핸드폰번호와 인증번호 확인
|
//핸드폰번호와 인증번호 확인
|
||||||
if(oauthUser.getNlibVO().getMobileNo().equals(mobileNo) && oauthUser.getNlibVO().getMobileVrfctNo().equals(mobileVrfctNo))
|
if(oauthUser.getNlibVO().getMobileNo().equals(mobileNo) && oauthUser.getNlibVO().getMobileVrfctNo().equals(mobileVrfctNo))
|
||||||
{
|
{
|
||||||
@ -670,6 +696,11 @@ public class MemberController extends NlibCommonController{
|
|||||||
public String deleteMembershipForm(HttpServletResponse response,Authentication authentication,HttpServletRequest request,ModelMap model) throws Exception{
|
public String deleteMembershipForm(HttpServletResponse response,Authentication authentication,HttpServletRequest request,ModelMap model) throws Exception{
|
||||||
//사용자 정보를 가져온다.
|
//사용자 정보를 가져온다.
|
||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
if(loginVO == null) {
|
||||||
|
model.addAttribute("msg","잘못된 접근입니다. \\n장시간 대기로 다시 로그인 하신 후, 이용해 주시기 바랍니다.");
|
||||||
|
model.addAttribute("url","${pageContext.request.contextPath}"+"/");
|
||||||
|
return "nlib/cmm/alert";
|
||||||
|
}
|
||||||
loginVO.setJoinCouncilCd(getCurCouncilCd(request));
|
loginVO.setJoinCouncilCd(getCurCouncilCd(request));
|
||||||
|
|
||||||
loginVO = loginService.selectLoginUserInfo(loginVO);
|
loginVO = loginService.selectLoginUserInfo(loginVO);
|
||||||
@ -689,15 +720,20 @@ public class MemberController extends NlibCommonController{
|
|||||||
public @ResponseBody String deleteMembership(Authentication authentication,HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{
|
public @ResponseBody String deleteMembership(Authentication authentication,HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{
|
||||||
//사용자 정보를 가져온다.
|
//사용자 정보를 가져온다.
|
||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
if(loginVO == null) {
|
||||||
|
model.addAttribute("msg","잘못된 접근입니다. \\n장시간 대기로 다시 로그인 하신 후, 이용해 주시기 바랍니다.");
|
||||||
|
model.addAttribute("url","${pageContext.request.contextPath}"+"/");
|
||||||
|
return "nlib/cmm/alert";
|
||||||
|
}
|
||||||
|
|
||||||
loginVO.setJoinCouncilCd(getCurCouncilCd(request));
|
loginVO.setJoinCouncilCd(getCurCouncilCd(request));
|
||||||
|
|
||||||
loginVO = loginService.selectLoginUserInfo(loginVO);
|
loginVO = loginService.selectLoginUserInfo(loginVO);
|
||||||
String a=loginVO.getLoginUserId()+request.getParameter("password").trim();
|
String password = egovPasswordEncoder.encryptPassword(loginVO.getLoginUserId()+request.getParameter("password").trim());
|
||||||
String password=egovPasswordEncoder.encryptPassword(a);
|
|
||||||
|
|
||||||
String message="";
|
String message="";
|
||||||
|
|
||||||
if(loginVO!=null && (loginVO.getPassword().equals(password)))
|
if(loginVO != null && (loginVO.getPassword().equals(password)))
|
||||||
{
|
{
|
||||||
//회원탈퇴
|
//회원탈퇴
|
||||||
memberService.deleteMembership(loginVO);
|
memberService.deleteMembership(loginVO);
|
||||||
@ -732,7 +768,6 @@ public class MemberController extends NlibCommonController{
|
|||||||
*/
|
*/
|
||||||
@RequestMapping(value="/member/initPassword.ajax")
|
@RequestMapping(value="/member/initPassword.ajax")
|
||||||
public @ResponseBody String initPassword(NlibLoginVO vo,HttpSession session,HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{
|
public @ResponseBody String initPassword(NlibLoginVO vo,HttpSession session,HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{
|
||||||
//내정보페이지, 회원가입시 핸드폰번호가 같을시 비밀번호 초기화
|
|
||||||
String email = vo.getEmail();
|
String email = vo.getEmail();
|
||||||
vo.setEmail("");
|
vo.setEmail("");
|
||||||
int count =0;
|
int count =0;
|
||||||
@ -812,6 +847,13 @@ public class MemberController extends NlibCommonController{
|
|||||||
//사용자 정보를 가져온다.
|
//사용자 정보를 가져온다.
|
||||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||||
|
|
||||||
|
String message="";
|
||||||
|
|
||||||
|
if(loginVO == null) {
|
||||||
|
message="fail";
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
loginVO.setJoinCouncilCd(getCurCouncilCd(request));
|
loginVO.setJoinCouncilCd(getCurCouncilCd(request));
|
||||||
|
|
||||||
loginVO = loginService.selectLoginUserInfo(loginVO);
|
loginVO = loginService.selectLoginUserInfo(loginVO);
|
||||||
@ -819,8 +861,6 @@ public class MemberController extends NlibCommonController{
|
|||||||
String password=egovPasswordEncoder.encryptPassword(loginVO.getLoginUserId()+request.getParameter("password"));
|
String password=egovPasswordEncoder.encryptPassword(loginVO.getLoginUserId()+request.getParameter("password"));
|
||||||
String newPassword=egovPasswordEncoder.encryptPassword(loginVO.getLoginUserId()+request.getParameter("newPassword"));
|
String newPassword=egovPasswordEncoder.encryptPassword(loginVO.getLoginUserId()+request.getParameter("newPassword"));
|
||||||
|
|
||||||
String message="";
|
|
||||||
|
|
||||||
if(loginVO!=null && loginVO.getPassword().equals(password))
|
if(loginVO!=null && loginVO.getPassword().equals(password))
|
||||||
{
|
{
|
||||||
loginVO.setPassword(newPassword);
|
loginVO.setPassword(newPassword);
|
||||||
@ -834,55 +874,6 @@ public class MemberController extends NlibCommonController{
|
|||||||
|
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 회원가입 SNS 구글인증
|
|
||||||
* @exception Exception
|
|
||||||
*//*
|
|
||||||
@RequestMapping(value = "/member/googleCallback.do")
|
|
||||||
public String googleCallback(@RequestParam(value = "code") String authCode, HttpSession session, Model model,
|
|
||||||
HttpServletRequest request,RedirectAttributes rttr) throws Exception {
|
|
||||||
|
|
||||||
String code = request.getParameter("code");
|
|
||||||
HttpHeaders headers = new HttpHeaders();
|
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
|
||||||
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
|
|
||||||
|
|
||||||
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();
|
|
||||||
parameters.add("code", code);
|
|
||||||
parameters.add("client_id", "879126511006-jro7bld7b2epl3n5mkksp0p24k2inbpu.apps.googleusercontent.com");
|
|
||||||
parameters.add("client_secret", "F6T-ZV9jibLhKtcugxPUtBlN");
|
|
||||||
parameters.add("redirect_uri", "http://nlib.nculture.org/nlib/member/googleCallback.do");
|
|
||||||
parameters.add("grant_type", "authorization_code");
|
|
||||||
|
|
||||||
HttpEntity<MultiValueMap<String,String>> rest_request = new HttpEntity<>(parameters,headers);
|
|
||||||
|
|
||||||
URI uri = URI.create("https://www.googleapis.com/oauth2/v4/token");
|
|
||||||
|
|
||||||
ResponseEntity<String> resultEntity;
|
|
||||||
resultEntity = restTemplate.postForEntity(uri, rest_request, String.class);
|
|
||||||
// JSON 파싱을 위한 기본값 세팅
|
|
||||||
// 요청시 파라미터는 스네이크 케이스로 세팅되므로 Object mapper에 미리 설정해준다.
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
|
||||||
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
|
||||||
mapper.setSerializationInclusion(Include.NON_NULL);
|
|
||||||
// Token Request
|
|
||||||
GoogleOAuthResponse result = mapper.readValue(resultEntity.getBody(), new TypeReference<GoogleOAuthResponse>() {
|
|
||||||
});
|
|
||||||
|
|
||||||
// ID Token만 추출 (사용자의 정보는 jwt로 인코딩 되어있다)
|
|
||||||
String jwtToken = result.getIdToken();
|
|
||||||
String requestUrl = UriComponentsBuilder.fromHttpUrl("https://oauth2.googleapis.com/tokeninfo")
|
|
||||||
.queryParam("id_token", jwtToken).toUriString();
|
|
||||||
|
|
||||||
String resultJson = restTemplate.getForObject(requestUrl, String.class);
|
|
||||||
|
|
||||||
Map<String, String> userInfo = mapper.readValue(resultJson, new TypeReference<Map<String, String>>() {
|
|
||||||
});
|
|
||||||
|
|
||||||
rttr.addFlashAttribute("email",userInfo.get("email"));
|
|
||||||
return "redirect:/member/insertMemberInfoForm.do";
|
|
||||||
}*/
|
|
||||||
//클라이언트 IP 가져오기
|
//클라이언트 IP 가져오기
|
||||||
public static String getRemoteIP(HttpServletRequest request){
|
public static String getRemoteIP(HttpServletRequest request){
|
||||||
String ip = request.getHeader("X-FORWARDED-FOR");
|
String ip = request.getHeader("X-FORWARDED-FOR");
|
||||||
|
|||||||
@ -132,7 +132,7 @@ public class UserInfoController extends NlibCommonController {
|
|||||||
|
|
||||||
if(loginVO == null)
|
if(loginVO == null)
|
||||||
{
|
{
|
||||||
model.addAttribute("msg","비정상적인 접근입니다. \\n관리자에게 문의하여 주시기 바랍니다.");
|
model.addAttribute("msg","잘못된 접근입니다. \\n장시간 대기로 다시 로그인 하신 후, 이용해 주시기 바랍니다.");
|
||||||
model.addAttribute("url","/userInfo/pwCertMyInfo.do");
|
model.addAttribute("url","/userInfo/pwCertMyInfo.do");
|
||||||
return "nlib/cmm/alert";
|
return "nlib/cmm/alert";
|
||||||
}
|
}
|
||||||
@ -228,8 +228,16 @@ public class UserInfoController extends NlibCommonController {
|
|||||||
@Secured("ROLE_USER")
|
@Secured("ROLE_USER")
|
||||||
@RequestMapping(value="/userInfo/pwCertMyInfo.do")
|
@RequestMapping(value="/userInfo/pwCertMyInfo.do")
|
||||||
public String pwCertMyInfo(HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{
|
public String pwCertMyInfo(HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{
|
||||||
NlibLoginVO nlibLoginVO = getNlibLoginVO(request);
|
NlibLoginVO loginVO = getNlibLoginVO(request);
|
||||||
model.addAttribute("loginVO",nlibLoginVO);
|
|
||||||
|
if(loginVO == null)
|
||||||
|
{
|
||||||
|
model.addAttribute("msg","잘못된 접근입니다. \\n장시간 대기로 다시 로그인 하신 후, 이용해 주시기 바랍니다.");
|
||||||
|
model.addAttribute("url","${pageContext.request.contextPath}"+"/");
|
||||||
|
return "nlib/cmm/alert";
|
||||||
|
}
|
||||||
|
|
||||||
|
model.addAttribute("loginVO",loginVO);
|
||||||
return "nlib/userInfo/pwCertMyInfo";
|
return "nlib/userInfo/pwCertMyInfo";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,15 +38,7 @@
|
|||||||
<select id="listOrgPicks" parameterType="String" resultType="CollectionVO">
|
<select id="listOrgPicks" parameterType="String" resultType="CollectionVO">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
SELECT
|
SELECT
|
||||||
MASTER_ID
|
M1.MASTER_ID
|
||||||
, TITLE
|
|
||||||
, TYPE_DIV_NM
|
|
||||||
, RPRS_THUMB_URL
|
|
||||||
FROM (
|
|
||||||
(/* 문화원 PICK한 자료 */
|
|
||||||
SELECT
|
|
||||||
1 AS RNK
|
|
||||||
, M1.MASTER_ID
|
|
||||||
, M1.TITLE
|
, M1.TITLE
|
||||||
, M1.TYPE_DIV_CD
|
, M1.TYPE_DIV_CD
|
||||||
, TDC.S_CODE_NM AS TYPE_DIV_NM
|
, TDC.S_CODE_NM AS TYPE_DIV_NM
|
||||||
@ -62,32 +54,6 @@
|
|||||||
AND M1.REG_STATUS = 'REG_OK' /* 등록상태 : 등록완료 */
|
AND M1.REG_STATUS = 'REG_OK' /* 등록상태 : 등록완료 */
|
||||||
AND M1.USE_FLAG = 'Y'
|
AND M1.USE_FLAG = 'Y'
|
||||||
ORDER BY M1.MOD_DD DESC, M1.REG_DD DESC
|
ORDER BY M1.MOD_DD DESC, M1.REG_DD DESC
|
||||||
LIMIT 10)
|
|
||||||
UNION
|
|
||||||
(/* 문화원 PICK한 자료가 없거나 충분치 않은 경우, 대출/열람/온라인 가능 자료 중 최근 변경된 자료로 대체 */
|
|
||||||
SELECT
|
|
||||||
2 AS RNK
|
|
||||||
, M2.MASTER_ID
|
|
||||||
, M2.TITLE
|
|
||||||
, M2.TYPE_DIV_CD
|
|
||||||
, TDC.S_CODE_NM AS TYPE_DIV_NM
|
|
||||||
, M2.RPRS_THUMB_URL
|
|
||||||
, M2.REG_DD
|
|
||||||
, M2.MOD_DD
|
|
||||||
FROM RG_MASTER M2
|
|
||||||
JOIN SM_CODE_S TDC ON M2.TYPE_DIV_CD = TDC.S_CODE_ID AND TDC.L_CODE_ID = 'MASTER_TYPE_DIV_CD'
|
|
||||||
WHERE M2.MNG_ORG_CD = #{mngOrgCd}
|
|
||||||
AND M2.USE_FLAG = 'Y'
|
|
||||||
AND M2.OPEN_DIV_CD != '3' /* 공개구분 : 공개, 부분공개 */
|
|
||||||
AND M2.REG_STATUS = 'REG_OK' /* 등록상태 : 등록완료 */
|
|
||||||
AND (M2.OPER_OUT_RANGE_CD = '01' /* 대출구분 : 대출가능 */
|
|
||||||
OR M2.OPER_READ_RANGE_CD = '01' /* 열람 : 전체열람 */
|
|
||||||
OR M2.DIGITAL_READ_YN = 'Y') /* 디지탈열람여부 */
|
|
||||||
AND IFNULL(M2.PE_STATUS, '') = '' /* 보존상태 */
|
|
||||||
ORDER BY M2.MOD_DD DESC, M2.REG_DD DESC
|
|
||||||
LIMIT 10 )
|
|
||||||
) T
|
|
||||||
ORDER BY RNK, T.MOD_DD DESC, T.REG_DD DESC
|
|
||||||
LIMIT 10
|
LIMIT 10
|
||||||
]]>
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -276,7 +276,7 @@ function goList(){
|
|||||||
<h3><span>목차</span>정보</h3>
|
<h3><span>목차</span>정보</h3>
|
||||||
<button type="button" class="down-btn">down-btn</button>
|
<button type="button" class="down-btn">down-btn</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom h-down">
|
<div class="bottom h-down" style="white-space: pre-wrap;">
|
||||||
<p><c:if test="${empty result.bookIndex }">없음</c:if><c:out value="${result.bookIndex }"/></p>
|
<p><c:if test="${empty result.bookIndex }">없음</c:if><c:out value="${result.bookIndex }"/></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -4,6 +4,9 @@
|
|||||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
||||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
|
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
|
||||||
|
<%
|
||||||
|
String councilDnsHost = (String)session.getAttribute("councilDnsHost");
|
||||||
|
%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
<head>
|
<head>
|
||||||
@ -12,6 +15,14 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="format-detection" content="telephone=no" />
|
<meta name="format-detection" content="telephone=no" />
|
||||||
|
|
||||||
|
<meta id="meta_og_title" property="og:title" content="한국문화원연합회 소장자료관">
|
||||||
|
<meta id="meta_og_url" property="og:url" content="https://<%=councilDnsHost %>.nculture.org">
|
||||||
|
<meta id="meta_og_type" property="og:type" content="website" />
|
||||||
|
<meta id="meta_og_image" property="og:image" content="https://<%=councilDnsHost %>.nculture.org/images/meta_og_image.jpg" />
|
||||||
|
<meta id="meta_og_image_type" property="og:image:type" content="image/jpeg" />
|
||||||
|
<meta id="meta_og_description" property="og:description" content="온라인 대출/알람예약 서비스를 통해 문화원 소장자료들을 만나보세요.">
|
||||||
|
<meta id="meta_description" name="description" content="온라인 대출/알람예약 서비스를 통해 문화원 소장자료들을 만나보세요.">
|
||||||
|
|
||||||
<!-- <link rel="shortcut icon" type="image/x-icon" href="#"> 2번 호출되는 문제로 주석처리 -->
|
<!-- <link rel="shortcut icon" type="image/x-icon" href="#"> 2번 호출되는 문제로 주석처리 -->
|
||||||
<link href="/css/common.css" rel="stylesheet">
|
<link href="/css/common.css" rel="stylesheet">
|
||||||
<link href="/css/jquery.mCustomScrollbar.css" rel="stylesheet">
|
<link href="/css/jquery.mCustomScrollbar.css" rel="stylesheet">
|
||||||
|
|||||||
BIN
src/main/webapp/images/meta_og_image.jpg
Normal file
BIN
src/main/webapp/images/meta_og_image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
@ -409,7 +409,7 @@ function gfn_showDocPdf(interfaceId,masterId,typeDivCd,dtlsTypeDivCd) {
|
|||||||
function gfn_setSnsShare(interfaceId,masterId,typeDivCd,dtlsTypeDivCd){
|
function gfn_setSnsShare(interfaceId,masterId,typeDivCd,dtlsTypeDivCd){
|
||||||
var url=window.location.protocol + "//" + window.location.host + window.location.pathname + "?masterId=" + masterId;
|
var url=window.location.protocol + "//" + window.location.host + window.location.pathname + "?masterId=" + masterId;
|
||||||
|
|
||||||
if(interfaceId != null && interfaceId != '')
|
if(!fn_isEmpty(interfaceId))
|
||||||
{
|
{
|
||||||
if(typeDivCd == "IT_PHOTO" && (dtlsTypeDivCd == "C199" || dtlsTypeDivCd == "C01")){
|
if(typeDivCd == "IT_PHOTO" && (dtlsTypeDivCd == "C199" || dtlsTypeDivCd == "C01")){
|
||||||
url = IMAGE_VIEW_URL;
|
url = IMAGE_VIEW_URL;
|
||||||
@ -418,6 +418,7 @@ function gfn_setSnsShare(interfaceId,masterId,typeDivCd,dtlsTypeDivCd){
|
|||||||
}else{
|
}else{
|
||||||
url = DOC_VIEW_URL;
|
url = DOC_VIEW_URL;
|
||||||
}
|
}
|
||||||
|
url += interfaceId
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#div_pop-sharing img').attr('data-cUrl',url); // url 모두 맵핑
|
$('#div_pop-sharing img').attr('data-cUrl',url); // url 모두 맵핑
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user