발송결과 완료
This commit is contained in:
parent
936f413ac0
commit
336ddd8e76
@ -6,9 +6,11 @@ import java.util.List;
|
||||
import itn.let.uss.umt.service.UserDefaultVO;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class KakaoSentVO extends UserDefaultVO{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -39,7 +39,9 @@ import itn.let.kakao.user.sent.service.KakaoSentDetailVO;
|
||||
import itn.let.kakao.user.sent.service.KakaoSentService;
|
||||
import itn.let.kakao.user.sent.service.KakaoSentVO;
|
||||
import itn.let.mjo.msgsent.service.MjonMsgSentVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@Service("KakaoSentService")
|
||||
public class KakaoSentServiceImpl extends EgovAbstractServiceImpl implements KakaoSentService{
|
||||
|
||||
@ -290,15 +292,27 @@ public class KakaoSentServiceImpl extends EgovAbstractServiceImpl implements Ka
|
||||
* */
|
||||
private KakaoSentVO setPriceNCode(KakaoSentVO result) {
|
||||
|
||||
log.info("=============================== setPriceNCode ================================");
|
||||
|
||||
//성공 건수 세팅
|
||||
KakaoSentVO eachCnt = new KakaoSentVO();
|
||||
eachCnt.setMsgGroupId(result.getMsgGroupId());
|
||||
eachCnt.setBizKakaoResendYn("Y".equals(result.getBizKakaoResendYn()) ? "Y" : "N");
|
||||
eachCnt.setMsgType(result.getMsgType());
|
||||
eachCnt.setBizKakaoImageType(result.getBizKakaoImageType());
|
||||
eachCnt.setBizKakaoResendType(result.getBizKakaoResendType());
|
||||
|
||||
try {
|
||||
log.info("eachCnt.getMsgType() :: [{}]", eachCnt.getMsgType());
|
||||
log.info("eachCnt.getBizKakaoImageType() :: [{}]", eachCnt.getBizKakaoImageType());
|
||||
log.info("eachCnt.getBizKakaoResendType() :: [{}]", eachCnt.getBizKakaoResendType());
|
||||
|
||||
eachCnt = kakaoSentDAO.selectKakaoSentCntEachCnt_advc(eachCnt);
|
||||
} catch (Exception e) {
|
||||
System.out.println("setPriceNCode error!!");
|
||||
}
|
||||
log.info(" + eachCnt.toString() :: [{}]", eachCnt.toString());
|
||||
// log.info(" + eachCnt.getSuccessPrice() :: [{}]", eachCnt.getSuccessPrice());
|
||||
|
||||
result.setSuccessCount(eachCnt.getSuccessCount());
|
||||
result.setWaitCount(eachCnt.getWaitCount());
|
||||
@ -331,9 +345,9 @@ public class KakaoSentServiceImpl extends EgovAbstractServiceImpl implements Ka
|
||||
|
||||
//총금액 시작
|
||||
//=======================================================
|
||||
// TotPrice : 성공건수에 대한 금액 곱하기
|
||||
BigDecimal atPrice = new BigDecimal(successPrice);
|
||||
BigDecimal kakaoResendPrice = new BigDecimal(kakaoResendSuccPrice);
|
||||
// TotPrice : 성공건수에 대한 금액 곱하기 ? : null 처리
|
||||
BigDecimal atPrice = successPrice != null ? new BigDecimal(successPrice) : BigDecimal.ZERO;
|
||||
BigDecimal kakaoResendPrice = kakaoResendSuccPrice != null ? new BigDecimal(kakaoResendSuccPrice) : BigDecimal.ZERO;
|
||||
BigDecimal totalPrice = atPrice.add(kakaoResendPrice);
|
||||
// 소수점 한 자리로 설정 (반올림)// totalPrice 값을 소수점 한 자리까지 반올림하여 roundedTotalPrice에 저장
|
||||
// RoundingMode.HALF_UP: 반올림 방식으로, 소수점 기준 5 이상이면 올림, 그렇지 않으면 내림
|
||||
|
||||
@ -1399,6 +1399,7 @@
|
||||
A.BIZ_KAKAO_RESEND_DATA as bizKakaoResendData,
|
||||
B.AD_FLAG as adFlag ,
|
||||
B.BIZ_KAKAO_IMAGE_TYPE as bizKakaoImageType ,
|
||||
B.BIZ_KAKAO_RESEND_TYPE as bizKakaoResendType ,
|
||||
CASE
|
||||
WHEN B.AT_DELAY_YN = 'Y' AND B.AT_DELAY_COMPLETE_YN = 'N'
|
||||
THEN DATE_ADD(B.REQ_DATE, INTERVAL -30 MINUTE)
|
||||
@ -1670,23 +1671,96 @@
|
||||
</select>
|
||||
|
||||
<select id="KakaoSentDAO.selectKakaoSentCntEachCnt_advc" parameterClass="kakaoSentVO" resultClass="kakaoSentVO">
|
||||
/* KakaoSentDAO.selectKakaoSentCntEachCnt_advc */
|
||||
SELECT
|
||||
a.MSG_GROUP_ID AS msgGroupId
|
||||
, a.successCount
|
||||
, a.waitCount
|
||||
, a.failCount
|
||||
, a.divideYn
|
||||
<isEqual property="bizKakaoResendYn" compareValue="Y">
|
||||
, a.kakaoResendSuccCount
|
||||
, a.kakaoResendFailCount
|
||||
, a.successCount * bkp.BIZ_KAKAO_AT_PRICE AS successPrice
|
||||
, (a.smsCnt * bkp.BIZ_SMS_PRICE) + (a.mmsCnt * bkp.BIZ_MMS_PRICE) AS kakaoResendSuccPrice
|
||||
</isEqual>
|
||||
<isNotEqual property="bizKakaoResendYn" compareValue="Y">
|
||||
, 0 AS kakaoResendSuccCount
|
||||
, 0 AS kakaoResendFailCount
|
||||
, 0 AS successPrice
|
||||
, 0 AS kakaoResendSuccPrice
|
||||
a.MSG_GROUP_ID AS msgGroupId
|
||||
, a.successCount
|
||||
, a.waitCount
|
||||
, a.failCount
|
||||
, a.divideYn
|
||||
<isEqual property="bizKakaoResendYn" compareValue="Y">
|
||||
, a.kakaoResendSuccCount
|
||||
, a.kakaoResendFailCount
|
||||
|
||||
|
||||
<isEqual property="msgType" compareValue="8">
|
||||
, a.successCount * bkp.BIZ_KAKAO_AT_PRICE AS successPrice
|
||||
, (a.smsCnt * bkp.BIZ_SMS_PRICE) + (a.mmsCnt * bkp.BIZ_MMS_PRICE) AS kakaoResendSuccPrice
|
||||
|
||||
</isEqual>
|
||||
|
||||
|
||||
|
||||
<isEqual property="msgType" compareValue="9">
|
||||
|
||||
<!-- bizKakaoImageType 있음 + MMS -->
|
||||
<isNotEmpty property="bizKakaoImageType">
|
||||
|
||||
|
||||
<!-- 와이드 이미지인 경우 -->
|
||||
<isEqual property="bizKakaoImageType" compareValue="W">
|
||||
, a.successCount * bkp.BIZ_KAKAO_FT_WIDE_IMG_PRICE AS successPrice
|
||||
</isEqual>
|
||||
|
||||
<!-- 일반 이미지인 경우 -->
|
||||
<isEqual property="bizKakaoImageType" compareValue="I">
|
||||
, a.successCount * bkp.BIZ_KAKAO_FT_IMG_PRICE AS successPrice
|
||||
</isEqual>
|
||||
|
||||
, (a.smsCnt * bkp.BIZ_SMS_PRICE) + (a.mmsCnt * bkp.BIZ_PICTURE_PRICE) AS kakaoResendSuccPrice
|
||||
</isNotEmpty>
|
||||
|
||||
|
||||
<!-- 이미지 없음 -->
|
||||
<isEmpty property="bizKakaoImageType">
|
||||
|
||||
|
||||
, a.successCount * bkp.BIZ_KAKAO_FT_PRICE AS successPrice
|
||||
<isEqual property="bizKakaoResendType" compareValue="MMS">
|
||||
, (a.smsCnt * bkp.BIZ_SMS_PRICE) + (a.mmsCnt * bkp.BIZ_MMS_PRICE) AS kakaoResendSuccPrice
|
||||
</isEqual>
|
||||
|
||||
<isEqual property="bizKakaoResendType" compareValue="SMS">
|
||||
, (a.smsCnt * bkp.BIZ_SMS_PRICE) + (a.mmsCnt * 0) AS kakaoResendSuccPrice
|
||||
</isEqual>
|
||||
|
||||
<!-- 예외: bizKakaoResendType 이 MMS, SMS 둘 다 아닐 경우 -->
|
||||
<isNotEqual property="bizKakaoResendType" compareValue="MMS">
|
||||
<isNotEqual property="bizKakaoResendType" compareValue="SMS">
|
||||
, 0 AS kakaoResendSuccPrice
|
||||
</isNotEqual>
|
||||
</isNotEqual>
|
||||
</isEmpty>
|
||||
</isEqual>
|
||||
</isEqual>
|
||||
<isNotEqual property="bizKakaoResendYn" compareValue="Y">
|
||||
, 0 AS kakaoResendSuccCount
|
||||
, 0 AS kakaoResendFailCount
|
||||
<isEqual property="msgType" compareValue="8">
|
||||
, a.successCount * bkp.BIZ_KAKAO_AT_PRICE AS successPrice
|
||||
</isEqual>
|
||||
|
||||
<isEqual property="msgType" compareValue="9">
|
||||
|
||||
<!-- 와이드 이미지인 경우 -->
|
||||
<isEqual property="bizKakaoImageType" compareValue="W">
|
||||
, a.successCount * bkp.BIZ_KAKAO_FT_WIDE_IMG_PRICE AS successPrice
|
||||
</isEqual>
|
||||
|
||||
<!-- 일반 이미지인 경우 -->
|
||||
<isEqual property="bizKakaoImageType" compareValue="I">
|
||||
, a.successCount * bkp.BIZ_KAKAO_FT_IMG_PRICE AS successPrice
|
||||
</isEqual>
|
||||
|
||||
<!-- 텍스트형(이미지 없음)인 경우 -->
|
||||
<isNotEqual property="bizKakaoImageType" compareValue="W">
|
||||
<isNotEqual property="bizKakaoImageType" compareValue="I">
|
||||
, a.successCount * bkp.BIZ_KAKAO_FT_PRICE AS successPrice
|
||||
</isNotEqual>
|
||||
</isNotEqual>
|
||||
|
||||
</isEqual>
|
||||
, 0 AS kakaoResendSuccPrice
|
||||
</isNotEqual>
|
||||
FROM (
|
||||
SELECT
|
||||
|
||||
Loading…
Reference in New Issue
Block a user