Merge branch 'master' of http://alfk8281@vcs.iten.co.kr:9999/hylee/mjon_git
This commit is contained in:
commit
5812f418d4
@ -25,6 +25,7 @@ import itn.let.uat.uia.web.EmailVO;
|
|||||||
import itn.let.uat.uia.web.SendLogVO;
|
import itn.let.uat.uia.web.SendLogVO;
|
||||||
import itn.let.uat.uia.web.SendMail;
|
import itn.let.uat.uia.web.SendMail;
|
||||||
import itn.let.uss.umt.service.MberManageVO;
|
import itn.let.uss.umt.service.MberManageVO;
|
||||||
|
import itn.let.utl.user.service.MjonNoticeSendUtil;
|
||||||
|
|
||||||
@Service("MailTemplateService")
|
@Service("MailTemplateService")
|
||||||
public class MailTemplateServiceImpl extends EgovAbstractServiceImpl implements MailTemplateService {
|
public class MailTemplateServiceImpl extends EgovAbstractServiceImpl implements MailTemplateService {
|
||||||
@ -54,6 +55,10 @@ public class MailTemplateServiceImpl extends EgovAbstractServiceImpl implements
|
|||||||
@Resource(name = "MjonMsgDataService")
|
@Resource(name = "MjonMsgDataService")
|
||||||
private MjonMsgDataService mjonMsgDataService;
|
private MjonMsgDataService mjonMsgDataService;
|
||||||
|
|
||||||
|
/** 알림전송 Util */
|
||||||
|
@Resource(name = "mjonNoticeSendUtil")
|
||||||
|
private MjonNoticeSendUtil mjonNoticeSendUtil;
|
||||||
|
|
||||||
// 휴면회원 메일발송
|
// 휴면회원 메일발송
|
||||||
public void mailSendMemberDormant() throws Exception {
|
public void mailSendMemberDormant() throws Exception {
|
||||||
//MAIL_CONTENT_PATH = "C:/eGovFrameDev-3.9.0-64bit_ncms/workspace/mjon/src/main/webapp";
|
//MAIL_CONTENT_PATH = "C:/eGovFrameDev-3.9.0-64bit_ncms/workspace/mjon/src/main/webapp";
|
||||||
@ -121,6 +126,32 @@ public class MailTemplateServiceImpl extends EgovAbstractServiceImpl implements
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 휴면회원 SMS발송
|
||||||
|
public void smsSendMemberDormant() throws Exception {
|
||||||
|
String mberId = "";
|
||||||
|
String mberNm = "";
|
||||||
|
String loginDt = "";
|
||||||
|
String moblphonNo = "";
|
||||||
|
|
||||||
|
// 로그인 안한지 1년되기 한달전 휴면회원 전환 안내메일 대상자
|
||||||
|
MberManageVO mberManageVO = new MberManageVO();
|
||||||
|
mberManageVO.setDormantDay(335);
|
||||||
|
List<MberManageVO> mberDormantList = mberManageDAO.selectMberDormantList(mberManageVO);
|
||||||
|
|
||||||
|
for (MberManageVO item : mberDormantList) {
|
||||||
|
mberId = item.getMberId();
|
||||||
|
mberNm = item.getMberNm();
|
||||||
|
loginDt = item.getLoginDt();
|
||||||
|
moblphonNo = item.getMoblphonNo();
|
||||||
|
|
||||||
|
// 시스템 문자발송
|
||||||
|
String callTo = moblphonNo;
|
||||||
|
String smsTxt = "시스템발송 테스트";
|
||||||
|
//mjonNoticeSendUtil.userSmsSendBySystem(callTo, smsTxt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StatusResponse mailSendItnRecruitFile(MultipartFile multi) {
|
public StatusResponse mailSendItnRecruitFile(MultipartFile multi) {
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import itn.let.mail.service.MailTemplateService;
|
import itn.let.mail.service.MailTemplateService;
|
||||||
|
import itn.let.utl.user.service.MjonNoticeSendUtil;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class MailTemplateController {
|
public class MailTemplateController {
|
||||||
@ -15,6 +16,10 @@ public class MailTemplateController {
|
|||||||
@Resource (name = "MailTemplateService")
|
@Resource (name = "MailTemplateService")
|
||||||
private MailTemplateService mailTemplateService;
|
private MailTemplateService mailTemplateService;
|
||||||
|
|
||||||
|
/** 알림전송 Util */
|
||||||
|
@Resource(name = "mjonNoticeSendUtil")
|
||||||
|
private MjonNoticeSendUtil mjonNoticeSendUtil;
|
||||||
|
|
||||||
// 휴면회원 메일발송
|
// 휴면회원 메일발송
|
||||||
@RequestMapping("/mail/mailTmplSendMemberDormantAjax.do")
|
@RequestMapping("/mail/mailTmplSendMemberDormantAjax.do")
|
||||||
public ModelAndView mailTmplSendMemberDormant(
|
public ModelAndView mailTmplSendMemberDormant(
|
||||||
@ -28,7 +33,11 @@ public class MailTemplateController {
|
|||||||
String msg = "";
|
String msg = "";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// 시스템 문자발송 테스트
|
||||||
|
String callTo = "01087872615";
|
||||||
|
String smsTxt = "시스템발송 테스트";
|
||||||
|
mjonNoticeSendUtil.userSmsSendBySystem(callTo, smsTxt);
|
||||||
|
|
||||||
// 휴면회원 메일발송
|
// 휴면회원 메일발송
|
||||||
mailTemplateService.mailSendMemberDormant();
|
mailTemplateService.mailSendMemberDormant();
|
||||||
|
|
||||||
|
|||||||
@ -393,6 +393,82 @@ public class MjonNoticeSendUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Method Name : userSmsSystemSend
|
||||||
|
* @작성일 : 2023. 07. 18.
|
||||||
|
* @작성자 : JSP
|
||||||
|
* @수정일 : 2023. 07. 18.
|
||||||
|
* @작성자 : JSP
|
||||||
|
* @Method 설명 : 사용자에게 System 문자 발송
|
||||||
|
*/
|
||||||
|
public void userSmsSendBySystem(String callTo, String smsTxt) throws Exception{
|
||||||
|
|
||||||
|
try {
|
||||||
|
Date nowDate = new Date();
|
||||||
|
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
|
||||||
|
|
||||||
|
MjonMsgVO mjonMsgVO = new MjonMsgVO();
|
||||||
|
|
||||||
|
int fileCount = 0;
|
||||||
|
String msgType = "4"; // 단문
|
||||||
|
String msgDiv = "S"; // 단문
|
||||||
|
|
||||||
|
//문자열 길이 체크 해주기
|
||||||
|
String charset = "euc-kr"; //문자 바이트 계산에 필요한 캐릭터 셋 : 한글 2Byte로 계산
|
||||||
|
String smsCont = smsTxt.replace("\r\n", "\n");
|
||||||
|
int bytes = smsCont.getBytes(charset).length;
|
||||||
|
if(bytes > 90) {//장문일 경우 문자타입을 변경해준다.
|
||||||
|
msgType = "6";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 문자타입 구분
|
||||||
|
if (msgType.equals("6")) {
|
||||||
|
if (fileCount > 0) {
|
||||||
|
msgDiv = "P"; // 그림
|
||||||
|
mjonMsgVO.setNeoType("4");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
msgDiv = "L"; // 장문
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mjonMsgVO.setMsgType(msgType); // 단문 : 4, 장문, 그림 : 6
|
||||||
|
mjonMsgVO.setMsgDiv(msgDiv); // 단문 : S, 장문 : L
|
||||||
|
|
||||||
|
// 문자타입별 대표전송사 정보
|
||||||
|
MjonMsgVO mjonMsgVO2 = new MjonMsgVO();
|
||||||
|
mjonMsgVO2 = mjonMsgService.selectRepMsgAgetnInfo(mjonMsgVO);
|
||||||
|
|
||||||
|
mjonMsgVO.setAgentCode(mjonMsgVO2.getAgentCode()); //전송사 선택
|
||||||
|
mjonMsgVO.setTotPrice(mjonMsgVO2.getAgentPrice().toString()); //총금액
|
||||||
|
mjonMsgVO.setEachPrice(mjonMsgVO2.getAgentPrice().toString()); //한건 금액
|
||||||
|
mjonMsgVO.setUserId("system"); // 문자전송 ID
|
||||||
|
mjonMsgVO.setMsgKind("S"); //문자종류 관리자가 발송하는 것은 msgKind : S 로 셋팅
|
||||||
|
mjonMsgVO.setFileCnt("0"); //첨부이미지 갯수
|
||||||
|
mjonMsgVO.setSmsTxt(smsTxt); // 문자 내용
|
||||||
|
mjonMsgVO.setReserveYn("N"); // 즉시 전송
|
||||||
|
mjonMsgVO.setCallFrom("01084329333"); // 시스템 문자발송 번호
|
||||||
|
mjonMsgVO.setUserId("system");
|
||||||
|
mjonMsgVO.setMsgPayCode("SMS");
|
||||||
|
mjonMsgVO.setMsgGroupCnt("0");
|
||||||
|
mjonMsgVO.setReqDate(simpleDateFormat2.format(nowDate));
|
||||||
|
|
||||||
|
// 받는사람
|
||||||
|
mjonMsgVO.setCallTo(callTo);
|
||||||
|
|
||||||
|
MjonMsgReturnVO returnVO = mjonMsgDataService.insertSysMsgDataInfo(mjonMsgVO);
|
||||||
|
returnVO.getSendMsgCnt();
|
||||||
|
returnVO.getSendMsgBlockCnt();
|
||||||
|
|
||||||
|
// 시스템 발송 로그
|
||||||
|
sendLogInsert(returnVO.getMsgGroupId(), "1" ,mjonMsgVO.getCallFrom() ,mjonMsgVO.getCallTo(), smsTxt);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Method Name : userAllTermsEmailSend
|
* @Method Name : userAllTermsEmailSend
|
||||||
* @작성일 : 2023. 3. 30.
|
* @작성일 : 2023. 3. 30.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user