친구톡 환불로직 수정

This commit is contained in:
hehihoho3@gmail.com 2025-07-16 14:23:28 +09:00
parent 1f0c38b791
commit ffd779dd66
6 changed files with 54 additions and 12 deletions

View File

@ -71,6 +71,7 @@ public class KakaoSendAdvcVO implements Serializable {
private String bizKakaoResendType; // 카카오 알림톡 단가 private String bizKakaoResendType; // 카카오 알림톡 단가
private String filePath1; // 대체문자 이미지 private String filePath1; // 대체문자 이미지
private String fileCnt; // 파일 카운트 private String fileCnt; // 파일 카운트
private String bizKakaoImageType; // 파일 카운트
@ -113,6 +114,7 @@ public class KakaoSendAdvcVO implements Serializable {
"\n , bizKakaoResendOrgnlTxt=[" + bizKakaoResendOrgnlTxt + "]" + "\n , bizKakaoResendOrgnlTxt=[" + bizKakaoResendOrgnlTxt + "]" +
"\n , bizKakaoResendType=[" + bizKakaoResendType + "]" + "\n , bizKakaoResendType=[" + bizKakaoResendType + "]" +
"\n , filePath1=[" + filePath1 + "]" + "\n , filePath1=[" + filePath1 + "]" +
"\n , bizKakaoImageType=[" + bizKakaoImageType + "]" +
"\n ]"; "\n ]";
} }

View File

@ -698,7 +698,7 @@ public class KakaoSendUtil {
} }
public Float getValidPrice(Float personalPrice, Float defaultPrice) { public static Float getValidPrice(Float personalPrice, Float defaultPrice) {
return (personalPrice != null && personalPrice > 0) ? personalPrice : defaultPrice; return (personalPrice != null && personalPrice > 0) ? personalPrice : defaultPrice;
} }
@ -1691,6 +1691,7 @@ public class KakaoSendUtil {
sendVO.setAtDelayYn(kakaoVO.getAtSmishingYn()); sendVO.setAtDelayYn(kakaoVO.getAtSmishingYn());
sendVO.setBizKakaoResendOrgnlTxt(kakaoVO.getSubMsgTxt()); sendVO.setBizKakaoResendOrgnlTxt(kakaoVO.getSubMsgTxt());
sendVO.setBizKakaoResendType(sendVO.getSubMsgType()); sendVO.setBizKakaoResendType(sendVO.getSubMsgType());
sendVO.setBizKakaoImageType(kakaoVO.getImageType());
kakaoAlimTalkDAO.insertKakaoGroupDataTb_advc(sendVO); kakaoAlimTalkDAO.insertKakaoGroupDataTb_advc(sendVO);

View File

@ -175,14 +175,9 @@ public class KakaoFriendsTalkServiceImpl extends EgovAbstractServiceImpl implem
kakaoSendUtil.insertKakaoGroupDataTb_advc(instCnt, kakaoVO, sendVO); kakaoSendUtil.insertKakaoGroupDataTb_advc(instCnt, kakaoVO, sendVO);
/** @biz_kakao_price에 insert (대체문자 환불관련 테이블)*/
kakaoVO.setMsgGroupId(sendVO.getMsgGroupId());
kakaoVO.setKakaoFtPrice(Float.parseFloat(sendVO.getEachPrice()));
kakaoVO.setSmsPrice(Float.parseFloat(sendVO.getSmsPrice()));
kakaoVO.setMmsPrice(Float.parseFloat(sendVO.getMmsPrice()));
kakaoVO.setPicturePrice(Float.parseFloat(sendVO.getPicturePrice()));
kakaoAlimTalkDAO.insertKakaoSendPrice(kakaoVO); /** @biz_kakao_price에 insert (대체문자 환불관련 테이블)*/
priceAndPoint.insertBizFtKakaoPrice(kakaoVO.getUserId(), sendVO.getMsgGroupId());
priceAndPoint.insertCashAndPoint(kakaoVO.getUserId() priceAndPoint.insertCashAndPoint(kakaoVO.getUserId()

View File

@ -302,6 +302,8 @@ public class MjonMsgVO extends ComDefaultVO{
private String bizLogCallStatusCode; //다우기술 biz_log 테이블의 발송결과 코드 성공/실패/대기 코드값 변환(성공:S, 대기:W, 실패:F). private String bizLogCallStatusCode; //다우기술 biz_log 테이블의 발송결과 코드 성공/실패/대기 코드값 변환(성공:S, 대기:W, 실패:F).
private String bizLogCallStatusTxt; //다우기술 biz_log 테이블의 발송결과 내용 텍스트. private String bizLogCallStatusTxt; //다우기술 biz_log 테이블의 발송결과 내용 텍스트.
private String bizLogStatus; //다우기술 biz_log 테이블의 전송상태값 private String bizLogStatus; //다우기술 biz_log 테이블의 전송상태값
private String bizKakaoImageType; // 비즈 발송 img
private String accessKey; // 'API Key', private String accessKey; // 'API Key',

View File

@ -9,14 +9,21 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import egovframework.rte.fdl.idgnr.EgovIdGnrService; import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import itn.let.kakao.kakaoComm.KakaoSendAdvcVO;
import itn.let.kakao.kakaoComm.KakaoSendUtil;
import itn.let.kakao.kakaoComm.KakaoVO;
import itn.let.kakao.user.kakaoAt.service.impl.KakaoAlimTalkDAO;
import itn.let.mjo.event.service.MjonEventService; import itn.let.mjo.event.service.MjonEventService;
import itn.let.mjo.event.service.MjonEventVO; import itn.let.mjo.event.service.MjonEventVO;
import itn.let.mjo.event.service.impl.MjonEventDAO; import itn.let.mjo.event.service.impl.MjonEventDAO;
import itn.let.mjo.msg.service.MjonMsgVO; import itn.let.mjo.msg.service.MjonMsgVO;
import itn.let.mjo.msgdata.service.MjonMsgDataService;
import itn.let.mjo.msgdata.service.impl.MjonMsgDataDAO; import itn.let.mjo.msgdata.service.impl.MjonMsgDataDAO;
import itn.let.mjo.pay.service.MjonPayVO; import itn.let.mjo.pay.service.MjonPayVO;
import itn.let.mjo.pay.service.impl.MjonPayDAO; import itn.let.mjo.pay.service.impl.MjonPayDAO;
import itn.let.sym.site.service.JoinSettingVO;
import itn.let.uss.umt.service.MberManageVO; import itn.let.uss.umt.service.MberManageVO;
import lombok.extern.slf4j.Slf4j;
/** /**
* *
@ -32,6 +39,7 @@ import itn.let.uss.umt.service.MberManageVO;
* *
* *
*/ */
@Slf4j
@Component @Component
public class PriceAndPoint { public class PriceAndPoint {
@ -46,6 +54,11 @@ public class PriceAndPoint {
@Resource(name = "egovMjonCashIdGnrService") @Resource(name = "egovMjonCashIdGnrService")
private EgovIdGnrService idgenMjonCashId; private EgovIdGnrService idgenMjonCashId;
@Resource(name="kakaoAlimTalkDAO")
private KakaoAlimTalkDAO kakaoAlimTalkDAO;
/** /**
* @methodName : getBefCash * @methodName : getBefCash
@ -127,6 +140,31 @@ public class PriceAndPoint {
mjonPayDAO.updateMemberCash(mjonPayVO); //회원정보 업데이트 mjonPayDAO.updateMemberCash(mjonPayVO); //회원정보 업데이트
} }
public void insertBizFtKakaoPrice(String userId, String msgGroupId) throws Exception {
KakaoVO kakaoVO = new KakaoVO();
// 사용자 개인 단가 정보 불러오기
MberManageVO mberManageVO = mjonMsgDataDAO.selectMberManageInfo(userId);
// 시스템 기본 단가 정보 불러오기
JoinSettingVO sysJoinSetVO = mjonMsgDataDAO.selectJoinSettingInfo();
KakaoSendUtil.getValidPrice(mberManageVO.getShortPrice(), sysJoinSetVO.getShortPrice());
// TODO Auto-generated method stub
kakaoVO.setMsgGroupId(msgGroupId);
kakaoVO.setSmsPrice(KakaoSendUtil.getValidPrice(mberManageVO.getShortPrice(), sysJoinSetVO.getShortPrice()));
kakaoVO.setMmsPrice(KakaoSendUtil.getValidPrice(mberManageVO.getLongPrice(), sysJoinSetVO.getLongPrice()));
kakaoVO.setPicturePrice(KakaoSendUtil.getValidPrice(mberManageVO.getPicturePrice(), sysJoinSetVO.getPicturePrice()));
kakaoVO.setKakaoFtPrice(KakaoSendUtil.getValidPrice(mberManageVO.getKakaoFtPrice(), sysJoinSetVO.getKakaoFtPrice()));
kakaoVO.setKakaoFtImgPrice(KakaoSendUtil.getValidPrice(mberManageVO.getKakaoFtImgPrice(), sysJoinSetVO.getKakaoFtImgPrice()));
kakaoVO.setKakaoFtWideImgPrice(KakaoSendUtil.getValidPrice(mberManageVO.getKakaoFtWideImgPrice(), sysJoinSetVO.getKakaoFtWideImgPrice()));
kakaoAlimTalkDAO.insertKakaoSendPrice(kakaoVO);
}
} }

View File

@ -151,7 +151,8 @@
AT_DELAY_YN, AT_DELAY_YN,
BIZ_KAKAO_RESEND_ORGNL_TXT, BIZ_KAKAO_RESEND_ORGNL_TXT,
BIZ_KAKAO_RESEND_TYPE BIZ_KAKAO_RESEND_TYPE,
BIZ_KAKAO_IMAGE_TYPE
)VALUES )VALUES
( (
#msgGroupId#, #msgGroupId#,
@ -174,7 +175,8 @@
#atDelayYn#, #atDelayYn#,
#bizKakaoResendOrgnlTxt#, #bizKakaoResendOrgnlTxt#,
#bizKakaoResendType# #bizKakaoResendType#,
#bizKakaoImageType#
) )
</insert> </insert>
@ -230,6 +232,7 @@
MMD.USER_ID AS userId MMD.USER_ID AS userId
, MMD.MSG_GROUP_ID AS msgGroupId , MMD.MSG_GROUP_ID AS msgGroupId
, MMD.MSG_SEQ AS msgSeq , MMD.MSG_SEQ AS msgSeq
, MMGD.BIZ_KAKAO_IMAGE_TYPE AS bizKakaoImageType
, MMD.USERDATA AS userData , MMD.USERDATA AS userData
, MMD.REFUND_YN AS refundYn , MMD.REFUND_YN AS refundYn
, MMD.RSLT_CODE AS rsltCode , MMD.RSLT_CODE AS rsltCode
@ -241,11 +244,12 @@
, MMD.BIZ_KAKAO_RESEND_TYPE AS subMsgType , MMD.BIZ_KAKAO_RESEND_TYPE AS subMsgType
, MMD.FILE_CNT AS fileCnt , MMD.FILE_CNT AS fileCnt
, MMD.BIZ_KAKAO_RESEND_TYPE AS bizKakaoResendType , MMD.BIZ_KAKAO_RESEND_TYPE AS bizKakaoResendType
FROM FROM
MJ_MSG_DATA MMD MJ_MSG_DATA MMD
INNER JOIN LETTNGNRLMBER MB INNER JOIN LETTNGNRLMBER MB
ON MMD.USER_ID = MB.MBER_ID ON MMD.USER_ID = MB.MBER_ID
INNER JOIN mj_msg_group_data MMGD
on MMD.MSG_GROUP_ID = MMGD.MSG_GROUP_ID
WHERE 1=1 WHERE 1=1
AND MMD.CUR_STATE = '3' AND MMD.CUR_STATE = '3'
AND MMD.REFUND_YN = 'N' AND MMD.REFUND_YN = 'N'
@ -281,7 +285,7 @@
<!-- 카카오 친구톡 전송 환불 프로시저 실행 (카카오 전송 성공 관련 - 대체문자 선택시 차액 환불 처리) --> <!-- 카카오 친구톡 전송 환불 프로시저 실행 (카카오 전송 성공 관련 - 대체문자 선택시 차액 환불 처리) -->
<procedure id="kakaoAlimTalkDAO.updateKakaoFtSend" parameterClass="kakaoVO"> <procedure id="kakaoAlimTalkDAO.updateKakaoFtSend" parameterClass="kakaoVO">
{call kakaoFt_Send(#userId#, #msgGroupId#, #userData#, #fileCnt#, #bizKakaoResendType#)} {call kakaoFt_Send(#userId#, #msgGroupId#, #userData#, #fileCnt#, #bizKakaoResendType#, #bizKakaoImageType#)}
</procedure> </procedure>
<!-- 카카오 친구톡 전송 환불 프로시저 실행 (카카오 전송 실패시 대체문자 관련 - 대체문자 발송 완료 된 경우) --> <!-- 카카오 친구톡 전송 환불 프로시저 실행 (카카오 전송 실패시 대체문자 관련 - 대체문자 발송 완료 된 경우) -->