B선 전송사 이용고객 이벤트대상 제외처리

This commit is contained in:
itn 2023-06-22 12:44:23 +09:00
parent e2a7a09ff5
commit aba49eacb0
2 changed files with 63 additions and 42 deletions

View File

@ -281,31 +281,42 @@ public class MjonEventController {
if(resultEvent != null) {//진행중 이벤트 이면 이벤트 게시글 번호 셋팅
//이벤트 회원 정보 조회
MjonEventVO mjonEventVO = new MjonEventVO();
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
// Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리
MberManageVO mberManageVO = new MberManageVO();
mberManageVO.setMberId(userId);
String blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
if (blineCode != null && blineCode.equals("N")) {
int resultCnt = 0;
//이벤트 회원 정보 조회
MjonEventVO mjonEventVO = new MjonEventVO();
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
int resultCnt = 0;
String status = eventMberInfo.getEventStatus();
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
if(status.equals("Y")) {//이벤트가 진행중인 경우
String status = eventMberInfo.getEventStatus();
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 진행중입니다.");
return "redirect:/web/main/mainPage.do";
if(status.equals("Y")) {//이벤트가 진행중인 경우
}else if(status.equals("E")) {//이벤트가 종료된 경우
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 진행중입니다.");
return "redirect:/web/main/mainPage.do";
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 완료 하였습니다.");
return "redirect:/web/main/mainPage.do";
}else if(status.equals("E")) {//이벤트가 종료된 경우
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 완료 하였습니다.");
return "redirect:/web/main/mainPage.do";
}
}
}
else {
redirectAttributes.addFlashAttribute("message", "이벤트 대상자가 아닙니다.");
return "redirect:/web/main/mainPage.do";
}
}else {//이벤트 게시글 정보가 없으면 0으로 셋팅.

View File

@ -103,31 +103,41 @@ public class MjonEventPayV2Controller {
if(resultEvent != null) {//진행중 이벤트 이면 이벤트 게시글 번호 셋팅
//이벤트 회원 정보 조회
MjonEventVO mjonEventVO = new MjonEventVO();
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
// Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리
MberManageVO mberManageVO = new MberManageVO();
mberManageVO.setMberId(userId);
String blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
if (blineCode != null && blineCode.equals("N")) {
//이벤트 회원 정보 조회
MjonEventVO mjonEventVO = new MjonEventVO();
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
int resultCnt = 0;
int resultCnt = 0;
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
String status = eventMberInfo.getEventStatus();
String status = eventMberInfo.getEventStatus();
if(status.equals("Y")) {//이벤트가 진행중인 경우
if(status.equals("Y")) {//이벤트가 진행중인 경우
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 진행중입니다.");
return "redirect:/web/main/mainPage.do";
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 진행중입니다.");
return "redirect:/web/main/mainPage.do";
}else if(status.equals("E")) {//이벤트가 종료된 경우
}else if(status.equals("E")) {//이벤트가 종료된 경우
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 완료 하였습니다.");
return "redirect:/web/main/mainPage.do";
redirectAttributes.addFlashAttribute("message", "현재 첫 결제 이벤트를 완료 하였습니다.");
return "redirect:/web/main/mainPage.do";
}
}
}
else {
redirectAttributes.addFlashAttribute("message", "이벤트 대상자가 아닙니다.");
return "redirect:/web/main/mainPage.do";
}
}else {//이벤트 게시글 정보가 없으면 0으로 셋팅.