mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 18:42:43 +09:00
발신번호 반려 이메일 주소
This commit is contained in:
@@ -62,4 +62,6 @@ interface SendNumMgtMapper {
|
||||
List<InsertNumber> selectSndrnoListAll(InsertNumberReqDto insertNumberReqDto);
|
||||
|
||||
String selectApiAuthToken(String apiApplicationId);
|
||||
|
||||
String selectUserEmailByAdminId(String adminId);
|
||||
}
|
||||
|
||||
@@ -617,7 +617,13 @@ public class SendNumMgtService {
|
||||
public UpdateApprResDto updateAppr(UpdateApprReqDto updateApprReqDto) {
|
||||
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionMaster.getMapper(SendNumMgtMapper.class);
|
||||
|
||||
logger.debug("넘어오는 값 확인하기={}",updateApprReqDto);
|
||||
|
||||
String adminId = updateApprReqDto.getAdminId();
|
||||
|
||||
String userEmail = sendNumMgtMapper.selectUserEmailByAdminId(adminId);
|
||||
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
@@ -648,18 +654,19 @@ public class SendNumMgtService {
|
||||
updateApprSendNumber.setAdminId(regId);
|
||||
sendNumMgtMapper.updateSndrno(updateApprSendNumber);
|
||||
}
|
||||
String SndrNoString = sndrNoList.toString();
|
||||
String re1 = SndrNoString.replace("[", "<br>");
|
||||
String re2 = re1.replace(", ","</br><br>");
|
||||
String re3 = re2.replace("]", "</br>");
|
||||
|
||||
logger.debug("발신번호 리스트 스트링 ={}",re3);
|
||||
|
||||
//2. 반려 발신번호 리스트에 값이 있을 경우 메일을 보냄
|
||||
if(sndrNoList.size()>0) {
|
||||
|
||||
//3. 발신번호 리스트 치환
|
||||
String SndrNoString = sndrNoList.toString();
|
||||
String re1 = SndrNoString.replace("[", "<br>");
|
||||
String re2 = re1.replace(", ","</br><br>");
|
||||
String re3 = re2.replace("]", "</br>");
|
||||
|
||||
// logger.debug("발신번호 리스트 스트링 ={}",re3);
|
||||
//try catch 처리하기
|
||||
try {
|
||||
String testEmail = "lmh3294@naver.com";
|
||||
Map<Object, Object> mailResultMap = new HashMap<Object, Object>();
|
||||
|
||||
// API authToken 조회
|
||||
@@ -671,7 +678,7 @@ public class SendNumMgtService {
|
||||
mailReqMap.put("rejectListSndrNo", re3);
|
||||
mailReqMap.put("rejectHtml", updateApprReqDto.getMemo());
|
||||
//이메일 수신자 가져오는 쿼리
|
||||
mailReqMap.put("toEmail", testEmail);
|
||||
mailReqMap.put("toEmail", userEmail);
|
||||
mailReqMap.put("fromEmail", fromEmail);
|
||||
mailReqMap.put("templeteCode", senrNoRejTempleteCode);
|
||||
mailReqMap.put("homeUrl", mailTempleteHomeUrl);
|
||||
|
||||
@@ -217,6 +217,17 @@
|
||||
WHERE
|
||||
USER_ID = #{adminId}
|
||||
</select>
|
||||
|
||||
<select id="selectUserEmailByAdminId" parameterType="String" resultType="String">
|
||||
/* sendNumMgt-mapper.xml(selectUserSeqByAdminId) */
|
||||
SELECT
|
||||
EMAIL
|
||||
FROM
|
||||
hubez_common.EZ_SVC_USER
|
||||
WHERE
|
||||
USER_ID = #{adminId}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteNumber" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberReqDto">
|
||||
/* sendNumMgt-mapper.xml(deleteNumber) */
|
||||
|
||||
Reference in New Issue
Block a user