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,6 +125,12 @@ public class MjonEventController {
}
// 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());
@ -152,7 +158,12 @@ public class MjonEventController {
}
return modelAndView;
}
}
else {
modelAndView.addObject("resultSts", "eventBline");
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

@ -1743,6 +1743,10 @@ public class EgovLoginController {
loginVO.setName(mberNm);
}
// 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) {
@ -1769,6 +1773,7 @@ public class EgovLoginController {
}
}
}
}
return goEventPay;
}

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,6 +942,11 @@ 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'){