diff --git a/core-services/egov-notification-sms/src/main/java/org/egov/web/notification/sms/service/BaseSMSService.java b/core-services/egov-notification-sms/src/main/java/org/egov/web/notification/sms/service/BaseSMSService.java index 4c257ada6..6a5d68310 100644 --- a/core-services/egov-notification-sms/src/main/java/org/egov/web/notification/sms/service/BaseSMSService.java +++ b/core-services/egov-notification-sms/src/main/java/org/egov/web/notification/sms/service/BaseSMSService.java @@ -85,9 +85,10 @@ public void sendSMS(Sms sms) { log.info("calling submitToExternalSmsService() method"); if(smsProperties.isSaveSmsEnable()) { Long id = smsNotificationRepository.getNextSequence(); - SmsSaveRequest smsSaveRequest = SmsSaveRequest.builder().id(id).mobileNumber(sms.getMobileNumber()).message(sms.getMessage()) + String mobileNumber = sms.getMobileNumber(); + mobileNumber = mobileNumber.substring(0, 2) + mobileNumber.substring(6); + SmsSaveRequest smsSaveRequest = SmsSaveRequest.builder().id(id).mobileNumber(mobileNumber).message(sms.getMessage()) .category(sms.getCategory()).templateId(sms.getTemplateId()).tenantId(sms.getTenantId()).createdtime(System.currentTimeMillis()).build(); - log.info("SMS request to save sms topic" + smsSaveRequest); producer.push(smsProperties.getSaveSmsTopic(), smsSaveRequest); } submitToExternalSmsService(sms); diff --git a/core-services/egov-notification-sms/src/main/resources/db/migration/main/V20231006150836__notification_sms_ddl.sql b/core-services/egov-notification-sms/src/main/resources/db/migration/main/V20231006150836__notification_sms_ddl.sql index 04ae434f5..8c775e011 100644 --- a/core-services/egov-notification-sms/src/main/resources/db/migration/main/V20231006150836__notification_sms_ddl.sql +++ b/core-services/egov-notification-sms/src/main/resources/db/migration/main/V20231006150836__notification_sms_ddl.sql @@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS eg_notification_sms ( message TEXT, category VARCHAR(50), template_id VARCHAR(50), - createdtime TIMESTAMP, + createdtime bigint, tenant_id VARCHAR(50) ); CREATE SEQUENCE seq_eg_notification_sms