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

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

View File

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

View File

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

View File

@ -1726,7 +1726,7 @@ public class EgovLoginController {
public boolean goEventPay(LoginVO loginVO) throws Exception {
boolean goEventPay = false;
MjonEventVO mjonEventVO = new MjonEventVO();
// 이벤트 컨텐츠 정보 불러오기
String bbsId = "BBSMSTR_000000000731"; //이벤트 게시판 번호
String nttSj = "[첫결제 이벤트] 첫 결제 시, 누구나 조건 없이 인생 최저가!";
@ -1742,29 +1742,34 @@ public class EgovLoginController {
if (mberNm != null) {
loginVO.setName(mberNm);
}
// Step 1. 결제여부 체크(미결제 일때 이벤트 대상)
int payCnt = mjonPayService.selectMemerPayCount(loginVO.getId());
if (payCnt == 0) {
// Step 2. 이벤트 회원 정보 조회
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
int resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
if (resultCnt > 0) {
goEventPay = true;
}
}else {
//등록된 회원정보가 있으면 화면 이동 메세지 처리
String status = eventMberInfo.getEventStatus();
if(status.equals("Y")) {
//이벤트가 진행중인 경우
}
else if(status.equals("E")) {
//이벤트가 종료된 경우
// Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리
mberManageVO.setMberId(loginVO.getId());
String blineCode = mberManageService.selectBlineCodeByMberId(mberManageVO);
if (blineCode != null && blineCode.equals("N")) {
// Step 1. 결제여부 체크(미결제 일때 이벤트 대상)
int payCnt = mjonPayService.selectMemerPayCount(loginVO.getId());
if (payCnt == 0) {
// Step 2. 이벤트 회원 정보 조회
MjonEventVO eventMberInfo = selectEventMsgMberDefaultInfo(mjonEventVO, resultEvent.getNttId(), bbsId, loginVO.getId(), loginVO.getName());
if(eventMberInfo == null) {//등록된 회원정보가 없으면 정보 입력
mjonEventVO.setEventStatus("N");
int resultCnt = mjonEventService.insertEventMsgMberDefaultInfo(mjonEventVO);
if (resultCnt > 0) {
goEventPay = true;
}
}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 selectBlineCodeByMberId(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.MetaTagVO;
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.MberManageVO;
import itn.let.uss.umt.service.UserManageVO;
import itn.let.utl.sim.service.EgovClntInfo;
@ -250,6 +252,10 @@ public class MainController {
@Resource(name = "userManageService")
private EgovUserManageService userManageService;
/** mberManageService */
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@Value("#{globalSettings['Globals.email.host']}")
private String Globals_email_host;
@Value("#{globalSettings['Globals.email.port']}")
@ -652,6 +658,14 @@ public class MainController {
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";

View File

@ -1192,6 +1192,13 @@
WHERE A.MBER_ID= #mberId#
</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

View File

@ -11,6 +11,7 @@
<script src="/publish/js/swiper.min.js"></script>
<script type="text/javascript">
var blineCode = "${blineCode}";
$(document).ready(function() {
// http => https 로 이동
@ -258,7 +259,7 @@ $(document).ready(function() {
eventYn = true;
</c:if>
if(payCount < 1 && eventYn){//결제내역이 하나도 없고, 이벤트가 진행중이면 팝업 호출
if(payCount < 1 && eventYn && blineCode == 'N'){//결제내역이 하나도 없고, 이벤트가 진행중이면 팝업 호출
remoteEventPayPop(payCount);
}else{//이벤트 대상자가 아니면 첫결제 이벤트 팝업은 안보여준다.
@ -941,7 +942,12 @@ function fnEventLoginChk(){
alert("해당 이벤트가 종료되었습니다.");
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'){
alert("이벤트 신청에 오류가 발생하였습니다.");