Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -15,6 +15,7 @@ import app.module.mms.ports.MMSPortIn;
|
||||
import app.module.mms.ports.application.domain.CreateSmsAutoSendCmd;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -34,6 +35,10 @@ class AutoSchedulesService implements AutoSchedulesPortIn {
|
||||
private final GetIncompleteHouseholdsPortIn getIncompleteHouseholdsPortIn;
|
||||
private final BatchLogRunner batchLogRunner;
|
||||
|
||||
// TODO(ks) : 문자발송 테스트
|
||||
@Value("${spring.profiles.active}")
|
||||
private String activeProfiles;
|
||||
|
||||
@Override
|
||||
public Optional<Boolean> operate() {
|
||||
batchLogRunner.run(BatchLogType.MONTHLY_STATUS, portOut::operate);
|
||||
@@ -43,6 +48,7 @@ class AutoSchedulesService implements AutoSchedulesPortIn {
|
||||
@Override
|
||||
@Transactional
|
||||
public Optional<Boolean> sendAutoSms() {
|
||||
if ("dev".equals(activeProfiles)) { // TODO(ks) : 문자발송 테스트
|
||||
GetSmsAutoStatus getSmsAutoStatus = getSmsAutoStatusPortIn.operate().orElse(null);
|
||||
|
||||
if (getSmsAutoStatus == null || Boolean.FALSE.equals(getSmsAutoStatus.getActive())) {
|
||||
@@ -80,6 +86,7 @@ class AutoSchedulesService implements AutoSchedulesPortIn {
|
||||
log.info("문자 발송 날짜 아님.");
|
||||
return Optional.of(false);
|
||||
}
|
||||
}
|
||||
|
||||
return Optional.of(true);
|
||||
}
|
||||
|
||||
@@ -24,5 +24,7 @@
|
||||
)
|
||||
AND dr.all_status NOT IN ('DONE', 'TODAY_NONE')
|
||||
)
|
||||
AND region_main_code = 'code.region.main.99' /* TODO(ks) : 문자발송 테스트 */
|
||||
AND phone != '010-1111-1111' /* TODO(ks) : 문자발송 테스트 */
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user