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

This commit is contained in:
itn 2023-06-22 12:22:57 +09:00
parent 913782e28d
commit e2a7a09ff5
8 changed files with 100 additions and 46 deletions

View File

@ -125,34 +125,45 @@ public class MjonEventController {
} }
//이벤트 회원 정보 조회 // Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName()); MberManageVO mberManageVO = new MberManageVO();
mberManageVO.setMberId(loginVO.getId());
String blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
if (blineCode != null && blineCode.equals("N")) {
int resultCnt = 0; //이벤트 회원 정보 조회
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력 int resultCnt = 0;
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
String status = eventMberInfo.getEventStatus(); if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
}else {//등록된 회원정보가 있으면 화면 이동 메세지 처리
if(status.equals("Y")) {//이벤트가 진행중인 경우 String status = eventMberInfo.getEventStatus();
modelAndView.addObject("resultSts", "eventJoined"); if(status.equals("Y")) {//이벤트가 진행중인 경우
}else if(status.equals("E")) {//이벤트가 종료된 경우 modelAndView.addObject("resultSts", "eventJoined");
modelAndView.addObject("resultSts", "eventEnded"); }else if(status.equals("E")) {//이벤트가 종료된 경우
}else {//이벤트 미진행인 경우 성공으로 결제페이지로 이동되도록 한다. modelAndView.addObject("resultSts", "eventEnded");
modelAndView.addObject("resultSts", "success"); }else {//이벤트 미진행인 경우 성공으로 결제페이지로 이동되도록 한다.
modelAndView.addObject("resultSts", "success");
}
return modelAndView;
} }
}
else {
modelAndView.addObject("resultSts", "eventBline");
return modelAndView; return modelAndView;
} }
modelAndView.addObject("resultSts", "success"); modelAndView.addObject("resultSts", "success");

View File

@ -350,6 +350,11 @@ public class EgovMberManageServiceImpl extends EgovAbstractServiceImpl implement
return mberManageDAO.selectMberNmByMberId(mberManageVO); return mberManageDAO.selectMberNmByMberId(mberManageVO);
} }
@Override
public String selectBlineCodeByMberId(MberManageVO mberManageVO) throws Exception {
return mberManageDAO.selectBlineCodeByMberId(mberManageVO);
}
//개인 문자전송 금액 수정하기 //개인 문자전송 금액 수정하기
public int updateUserPrice(MberManageVO mberManageVO) throws Exception{ public int updateUserPrice(MberManageVO mberManageVO) throws Exception{
return mberManageDAO.updateUserPrice(mberManageVO); return mberManageDAO.updateUserPrice(mberManageVO);

View File

@ -186,6 +186,10 @@ public class MberManageDAO extends EgovComAbstractDAO{
return (String) select("mberManageDAO.selectMberNmByMberId",mberManageVO); return (String) select("mberManageDAO.selectMberNmByMberId",mberManageVO);
} }
public String selectBlineCodeByMberId(MberManageVO mberManageVO) {
return (String) select("mberManageDAO.selectBlineCodeByMberId",mberManageVO);
}
//개인 문자전송 금액 수정하기 //개인 문자전송 금액 수정하기
public int updateUserPrice(MberManageVO mberManageVO) throws Exception{ public int updateUserPrice(MberManageVO mberManageVO) throws Exception{
return update("mberManageDAO.updateUserPrice", mberManageVO); return update("mberManageDAO.updateUserPrice", mberManageVO);

View File

@ -1743,28 +1743,33 @@ public class EgovLoginController {
loginVO.setName(mberNm); loginVO.setName(mberNm);
} }
// Step 1. 결제여부 체크(미결제 일때 이벤트 대상) // Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리
int payCnt = mjonPayService.selectMemerPayCount(loginVO.getId()); mberManageVO.setMberId(loginVO.getId());
if (payCnt == 0) { String blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
// Step 2. 이벤트 회원 정보 조회 if (blineCode != null && blineCode.equals("N")) {
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName()); // Step 1. 결제여부 체크(미결제 일때 이벤트 대상)
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력 int payCnt = mjonPayService.selectMemerPayCount(loginVO.getId());
mjonEventVO.setEventStatus("N"); if (payCnt == 0) {
int resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO); // Step 2. 이벤트 회원 정보 조회
if (resultCnt > 0) { MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
goEventPay = true; if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
} mjonEventVO.setEventStatus("N");
}else { int resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
//등록된 회원정보가 있으면 화면 이동 메세지 처리 if (resultCnt > 0) {
String status = eventMberInfo.getEventStatus(); goEventPay = true;
if(status.equals("Y")) { }
//이벤트가 진행중인 경우
}
else if(status.equals("E")) {
//이벤트가 종료된 경우
}else { }else {
//이벤트 미진행인 경우 성공으로 결제페이지로 이동되도록 한다. //등록된 회원정보가 있으면 화면 이동 메세지 처리
goEventPay = true; String status = eventMberInfo.getEventStatus();
if(status.equals("Y")) {
//이벤트가 진행중인 경우
}
else if(status.equals("E")) {
//이벤트가 종료된 경우
}else {
//이벤트 미진행인 경우 성공으로 결제페이지로 이동되도록 한다.
goEventPay = true;
}
} }
} }
} }

View File

@ -184,6 +184,8 @@ public interface EgovMberManageService {
public String selectMberNmByMberId(MberManageVO mberManageVO) throws Exception; public String selectMberNmByMberId(MberManageVO mberManageVO) throws Exception;
public String selectBlineCodeByMberId(MberManageVO mberManageVO) throws Exception;
//개인 문자전송 금액 수정하기 //개인 문자전송 금액 수정하기
public int updateUserPrice(MberManageVO mberManageVO) throws Exception; public int updateUserPrice(MberManageVO mberManageVO) throws Exception;
//개인 팩스전송 금액 수정하기 //개인 팩스전송 금액 수정하기

View File

@ -125,7 +125,9 @@ import itn.let.sym.prm.service.ProgrmManageVO;
import itn.let.sym.site.service.EgovSiteManagerService; import itn.let.sym.site.service.EgovSiteManagerService;
import itn.let.sym.site.service.MetaTagVO; import itn.let.sym.site.service.MetaTagVO;
import itn.let.sym.site.service.SiteManagerVO; import itn.let.sym.site.service.SiteManagerVO;
import itn.let.uss.umt.service.EgovMberManageService;
import itn.let.uss.umt.service.EgovUserManageService; import itn.let.uss.umt.service.EgovUserManageService;
import itn.let.uss.umt.service.MberManageVO;
import itn.let.uss.umt.service.UserManageVO; import itn.let.uss.umt.service.UserManageVO;
import itn.let.utl.sim.service.EgovClntInfo; import itn.let.utl.sim.service.EgovClntInfo;
@ -250,6 +252,10 @@ public class MainController {
@Resource(name = "userManageService") @Resource(name = "userManageService")
private EgovUserManageService userManageService; private EgovUserManageService userManageService;
/** mberManageService */
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@Value("#{globalSettings['Globals.email.host']}") @Value("#{globalSettings['Globals.email.host']}")
private String Globals_email_host; private String Globals_email_host;
@Value("#{globalSettings['Globals.email.port']}") @Value("#{globalSettings['Globals.email.port']}")
@ -652,6 +658,14 @@ public class MainController {
model.addAttribute("resultEvent", resultEvent); model.addAttribute("resultEvent", resultEvent);
String blineCode = "N";
if(StringUtil.isNotEmpty(userId)) {
// B선 전송사 사용여부
MberManageVO mberManageVO = new MberManageVO();
mberManageVO.setMberId(userId);
blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
}
model.addAttribute("blineCode", blineCode);
} }
return "web/main/mainPage"; return "web/main/mainPage";

View File

@ -1192,6 +1192,13 @@
WHERE A.MBER_ID= #mberId# WHERE A.MBER_ID= #mberId#
</select> </select>
<select id="mberManageDAO.selectBlineCodeByMberId" parameterClass="mberVO" resultClass="String">
SELECT
IFNULL(A.BLINE_CODE, 'N') AS blineCode
FROM LETTNGNRLMBER A
WHERE A.MBER_ID= #mberId#
</select>
<update id="mberManageDAO.updateUserPrice" parameterClass="mberVO"> <update id="mberManageDAO.updateUserPrice" parameterClass="mberVO">
UPDATE UPDATE

View File

@ -11,6 +11,7 @@
<script src="/publish/js/swiper.min.js"></script> <script src="/publish/js/swiper.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var blineCode = "${blineCode}";
$(document).ready(function() { $(document).ready(function() {
// http => https 로 이동 // http => https 로 이동
@ -258,7 +259,7 @@ $(document).ready(function() {
eventYn = true; eventYn = true;
</c:if> </c:if>
if(payCount < 1 && eventYn){//결제내역이 하나도 없고, 이벤트가 진행중이면 팝업 호출 if(payCount < 1 && eventYn && blineCode == 'N'){//결제내역이 하나도 없고, 이벤트가 진행중이면 팝업 호출
remoteEventPayPop(payCount); remoteEventPayPop(payCount);
}else{//이벤트 대상자가 아니면 첫결제 이벤트 팝업은 안보여준다. }else{//이벤트 대상자가 아니면 첫결제 이벤트 팝업은 안보여준다.
@ -941,6 +942,11 @@ function fnEventLoginChk(){
alert("해당 이벤트가 종료되었습니다."); alert("해당 이벤트가 종료되었습니다.");
location.href="<c:url value='/web/main/mainPage.do'/>"; location.href="<c:url value='/web/main/mainPage.do'/>";
}else if(returnData.resultSts == 'eventBline'){//B선 전송사 이용고객 => 이벤트대상 제외처리
alert("이벤트 대상자가 아닙니다.");
location.href="<c:url value='/web/main/mainPage.do'/>";
} }
} else if(status== 'fail'){ } else if(status== 'fail'){