문자발송로직 > 이벤트 체크

This commit is contained in:
hehihoho3@gmail.com 2024-12-23 13:33:08 +09:00
parent 376f75d711
commit 2b60c92568
4 changed files with 21 additions and 7 deletions

View File

@ -585,8 +585,11 @@ private int parseIntOrDefault(String value, int defaultValue) {
try { try {
// 이벤트 정보 가져오기 // 이벤트 정보 가져오기
MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo_advc(userId); MjonEventVO eventMberInfo = mjonEventService.selectEventMsgMberDefaultInfo_advc(userId);
if (eventMberInfo == null || "E".equals(eventMberInfo.getEventStatus())) { if (eventMberInfo == null
return statusResponse; // 이벤트 상태가 종료인 경우 처리하지 않음 || "E".equals(eventMberInfo.getEventStatus())
|| org.apache.commons.lang3.StringUtils.isEmpty(eventMberInfo.getEventEndDate())
) {
return statusResponse; // 이벤트 상태가 종료이거나 endDate가 없는 경우 처리하지 않음
} }
log.info(" + 이벤트 진행 대상자 :: [{}]", userId); log.info(" + 이벤트 진행 대상자 :: [{}]", userId);

View File

@ -8,12 +8,14 @@ import lombok.Setter;
public class RefundDTO { public class RefundDTO {
private String userId; private String userId;
private String msgGroupId; private String msgGroupId;
private String userData;
private int msgSeq; private int msgSeq;
private String eachPrice ; // 전송문자 개별가격 private String eachPrice ; // 전송문자 개별가격
public RefundDTO(String userId, String msgGroupId, int msgSeq, String eachPrice) { public RefundDTO(String userId, String msgGroupId, String userData, int msgSeq, String eachPrice) {
this.userId = userId; this.userId = userId;
this.msgGroupId = msgGroupId; this.msgGroupId = msgGroupId;
this.userData = userData;
this.msgSeq = msgSeq; this.msgSeq = msgSeq;
this.eachPrice = eachPrice; this.eachPrice = eachPrice;
} }

View File

@ -3452,13 +3452,21 @@ public class TestController {
} }
System.out.println("== msgFailList =============> : "+ msgFailList.size());
// TEST // TEST
// 필요한 필드만 DTO로 매핑 // 필요한 필드만 DTO로 매핑
List<RefundDTO> dtoList = msgFailList.stream() List<RefundDTO> dtoList = msgFailList.stream()
.map(msg -> new RefundDTO(msg.getUserId(), msg.getMsgGroupId(), Integer.parseInt(msg.getUserData()), msg.getEachPrice())) // .limit(10)
.map(msg ->
new RefundDTO(
msg.getUserId()
, msg.getMsgGroupId()
, msg.getUserData()
, Integer.parseInt(msg.getUserData())
, msg.getEachPrice())
)
.collect(Collectors.toList()); .collect(Collectors.toList());
System.out.println("== dtoList =============> : "+ dtoList.size());
// JSON 변환 // JSON 변환
ObjectMapper objectMapper = new ObjectMapper(); ObjectMapper objectMapper = new ObjectMapper();
String msgFailListJson = objectMapper.writeValueAsString(dtoList); String msgFailListJson = objectMapper.writeValueAsString(dtoList);

View File

@ -520,6 +520,7 @@ public class SchdlrManageServiceImpl extends EgovAbstractServiceImpl implements
new RefundDTO( new RefundDTO(
msg.getUserId() msg.getUserId()
, msg.getMsgGroupId() , msg.getMsgGroupId()
, msg.getUserData()
, Integer.parseInt(msg.getUserData()) , Integer.parseInt(msg.getUserData())
, msg.getEachPrice()) , msg.getEachPrice())
) )