Merge branch 'master' into kakaoFT

This commit is contained in:
rosewiper 2024-02-08 12:17:05 +09:00
commit dd225ab65a
5 changed files with 85 additions and 14 deletions

View File

@ -19,6 +19,11 @@ public class MjonBlockDAO extends EgovAbstractDAO {
return (List<MjonBlockVO>)list("MjonBlockDAO.selectBlockList", blockVO);
}
@SuppressWarnings("unchecked")
public List<String> selectBlockPhoneList(MjonBlockVO blockVO) throws Exception{
return (List<String>)list("MjonBlockDAO.selectBlockPhoneList", blockVO);
}
@SuppressWarnings("unchecked")
public List<MjonBlockVO> selectAdmBlockList(MjonBlockVO blockVO) throws Exception{
return (List<MjonBlockVO>)list("MjonBlockDAO.selectAdmBlockList", blockVO);

View File

@ -1,6 +1,5 @@
package itn.let.mjo.block.service.impl;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
@ -57,9 +56,23 @@ public class MjonBlockServiceImpl extends EgovAbstractServiceImpl implements Mjo
@Override
public void insertBlockList(MjonBlockVO mjonBlockVO) throws Exception {
List<MjonBlockVO> blockList = new ArrayList<MjonBlockVO>();
/*
* 수신거부 목록 신규 등록시 기존 등록 정보와 중복 체크
* 2024.02.07 우영두 수정
* */
MjonBlockVO blockVO = new MjonBlockVO();
blockVO.setUserId(mjonBlockVO.getUserId());
blockVO.setBlockType(mjonBlockVO.getBlockType());
List<String> blockPhoneList = blockDAO.selectBlockPhoneList(blockVO);;
for(int i=0; i < mjonBlockVO.getPhoneList().length; i++) {
if(blockPhoneList.size() > 0) {
if(blockPhoneList.contains(mjonBlockVO.getPhoneList()[i])) {
continue;
}
}
mjonBlockVO.setBlockId(idgenBlockId.getNextStringId());
mjonBlockVO.setPhone(mjonBlockVO.getPhoneList()[i].trim().replaceAll("§", ","));

View File

@ -107,6 +107,8 @@ import itn.let.mjo.kisa.service.KisaService;
import itn.let.mjo.kisa.service.KisaVO;
import itn.let.mjo.mjocommon.MjonForienIpChk;
import itn.let.mjo.msg.service.MjonMsgVO;
import itn.let.mjo.msgcampain.service.MjonCandidateService;
import itn.let.mjo.msgcampain.service.MjonCandidateVO;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
import itn.let.mjo.msgdata.service.MjonMsgDataVO;
import itn.let.mjo.pay.service.MjonPayService;
@ -258,6 +260,9 @@ public class MainController {
@Resource(name = "mberManageService")
private EgovMberManageService mberManageService;
@Resource(name = "mjonCandidateService")
private MjonCandidateService mjonCandidateService;
@Value("#{globalSettings['Globals.email.host']}")
private String Globals_email_host;
@ -1194,6 +1199,30 @@ public class MainController {
}
model.addAttribute("prePaymentYn", prePaymentYn);
/*
* 선거문자 메뉴 선별적 노출을 위하여 후보자 정보조회
* 비회원, 후부자 정보가 없는 회원은 선거문자가 안보이도록 처리
* 2024.02.08 우영두 추가
*
* */
String userCandidateYn = "N";
if(loginVO != null) {
//선거 후보자 정보 조회
MjonCandidateVO mjonCandidateVO = mjonCandidateService.selectCandidateDataInfo(userId);
if(mjonCandidateVO != null) {
userCandidateYn = "Y";
}
}
model.addAttribute("userCandidateYn", userCandidateYn);
return "web/com/webCommonHeader";
}

View File

@ -52,6 +52,20 @@
LIMIT #recordCountPerPage# OFFSET #firstIndex#
</select>
<select id="MjonBlockDAO.selectBlockPhoneList" parameterClass="blockVO" resultClass="String">
SELECT
PHONE AS phone
FROM
MJ_BLOCK
WHERE
1=1
AND USER_ID = #userId#
AND BLOCK_TYPE = #blockType#
ORDER BY 1=1
AND PHONE DESC
</select>
<!-- 차단 목록 조회(관리자용) -->
<select id="MjonBlockDAO.selectAdmBlockList" parameterClass="blockVO" resultClass="blockVO">
SELECT

View File

@ -1305,7 +1305,13 @@ function actionLogin() {
<c:if test="${resultListOne.depth eq '1' }">
<c:choose>
<c:when test="${fn:contains(resultListOne.url, '/web/mjon/msgcampain/selectMsgDataView.do')}">
<li class="new">
<c:if test="${userCandidateYn eq 'Y'}">
<li class="new">
</c:if>
<c:if test="${userCandidateYn eq 'N'}">
<%-- 후보자 정보가 없는 경우 메뉴를 보여주지 않는다. --%>
<li style="display:none;">
</c:if>
</c:when>
<c:otherwise>
<li>
@ -1313,7 +1319,9 @@ function actionLogin() {
</c:choose>
<c:choose>
<c:when test="${fn:contains(resultListOne.url, '/web/mjon/msgcampain/selectMsgDataView.do')}">
<a href="${empty resultListOne.url ? '#' : resultListOne.url }" rel="nosublink">${resultListOne.menuNm}</a>
<c:if test="${userCandidateYn eq 'Y'}">
<a href="${empty resultListOne.url ? '#' : resultListOne.url }" rel="nosublink">${resultListOne.menuNm}</a>
</c:if>
</c:when>
<c:when test="${fn:contains(resultListOne.url, '/web/mjon/alimtalk/kakaoAlimtalkMsgDataView.do')}">
<a href="${empty resultListOne.url ? '#' : resultListOne.url }" rel="nosublink">${resultListOne.menuNm}</a>
@ -1332,7 +1340,7 @@ function actionLogin() {
</c:when>
<c:when test="${fn:contains(resultListOne.url, '/web/member/pay/PayList.do')}">
<a href="${empty resultListOne.url ? '#' : resultListOne.url }" rel="nosublink">${resultListOne.menuNm}</a>
</c:when>
</c:when>
<c:otherwise>
<a href="${empty resultListOne.url ? '#' : resultListOne.url }">${resultListOne.menuNm}</a>
</c:otherwise>
@ -1415,15 +1423,17 @@ function actionLogin() {
</ul>
</dd>
</dl>
<dl>
<dt><a href="<c:out value='/web/mjon/msgcampain/selectMsgDataView.do'/>" rel="nosublink">선거문자</a></dt>
<dd>
<ul>
<li><a href="<c:out value='/web/mjon/msgcampain/selectMsgDataView.do'/>">단체문자</a></li>
<li><a href="<c:out value='/web/mjon/msgcampain/selectMsgTWDataView.do'/>" rel="nosublink">20건 문자</a></li>
</ul>
</dd>
</dl>
<c:if test="${userCandidateYn eq 'Y' }">
<dl>
<dt><a href="<c:out value='/web/mjon/msgcampain/selectMsgDataView.do'/>" rel="nosublink">선거문자</a></dt>
<dd>
<ul>
<li><a href="<c:out value='/web/mjon/msgcampain/selectMsgDataView.do'/>">단체문자</a></li>
<li><a href="<c:out value='/web/mjon/msgcampain/selectMsgTWDataView.do'/>" rel="nosublink">20건 문자</a></li>
</ul>
</dd>
</dl>
</c:if>
<dl>
<dt><a href="<c:out value='/web/mjon/alimtalk/kakaoAlimtalkMsgDataView.do'/>" rel="nosublink">카톡전송</a></dt>
<dd>