FINERACT-1754: Turn off unnecessary logging
This commit is contained in:
committed by
Aleksandar Vidakovic
parent
d4517f4a4d
commit
af63dbc9fa
+1
-1
@@ -62,7 +62,7 @@ public class UpdateTrialBalanceDetailsTasklet implements Tasklet {
|
|||||||
.append("from acc_gl_journal_entry je WHERE je.transaction_date = ? ")
|
.append("from acc_gl_journal_entry je WHERE je.transaction_date = ? ")
|
||||||
.append("group by je.account_id, je.office_id, je.transaction_date, Date(je.entry_date)");
|
.append("group by je.account_id, je.office_id, je.transaction_date, Date(je.entry_date)");
|
||||||
final int result = jdbcTemplate.update(sqlBuilder.toString(), tbGap);
|
final int result = jdbcTemplate.update(sqlBuilder.toString(), tbGap);
|
||||||
log.info("{}: Records affected by updateTrialBalanceDetails: {}", ThreadLocalContextUtil.getTenant().getName(), result);
|
log.debug("{}: Records affected by updateTrialBalanceDetails: {}", ThreadLocalContextUtil.getTenant().getName(), result);
|
||||||
}
|
}
|
||||||
String distinctOfficeQuery = "select distinct(office_id) from m_trial_balance where closing_balance is null group by office_id";
|
String distinctOfficeQuery = "select distinct(office_id) from m_trial_balance where closing_balance is null group by office_id";
|
||||||
final List<Long> officeIds = jdbcTemplate.queryForList(distinctOfficeQuery, Long.class);
|
final List<Long> officeIds = jdbcTemplate.queryForList(distinctOfficeQuery, Long.class);
|
||||||
|
|||||||
+2
-2
@@ -199,7 +199,7 @@ public class AuditReadPlatformServiceImpl implements AuditReadPlatformService {
|
|||||||
this.columnValidator.validateSqlInjection(sqlBuilder.toString(), parameters.limitSql());
|
this.columnValidator.validateSqlInjection(sqlBuilder.toString(), parameters.limitSql());
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("sql: {}", sqlBuilder);
|
log.debug("sql: {}", sqlBuilder);
|
||||||
|
|
||||||
return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), extraCriteria.getArguments(), rm);
|
return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), extraCriteria.getArguments(), rm);
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,7 @@ public class AuditReadPlatformServiceImpl implements AuditReadPlatformService {
|
|||||||
}
|
}
|
||||||
sql += extraCriteria.getSQLTemplate();
|
sql += extraCriteria.getSQLTemplate();
|
||||||
sql += groupAndOrderBySQL;
|
sql += groupAndOrderBySQL;
|
||||||
log.info("sql: {}", sql);
|
log.debug("sql: {}", sql);
|
||||||
|
|
||||||
return this.jdbcTemplate.query(sql, rm, extraCriteria.getArguments()); // NOSONAR
|
return this.jdbcTemplate.query(sql, rm, extraCriteria.getArguments()); // NOSONAR
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -91,7 +91,7 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio
|
|||||||
result = this.processAndLogCommandService.executeCommand(wrapper, command, isApprovedByChecker);
|
result = this.processAndLogCommandService.executeCommand(wrapper, command, isApprovedByChecker);
|
||||||
numberOfRetries = maxNumberOfRetries + 1;
|
numberOfRetries = maxNumberOfRetries + 1;
|
||||||
} catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) {
|
} catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) {
|
||||||
log.info("The following command {} has been retried {} time(s)", command.json(), numberOfRetries);
|
log.debug("The following command {} has been retried {} time(s)", command.json(), numberOfRetries);
|
||||||
/***
|
/***
|
||||||
* Fail if the transaction has been retired for maxNumberOfRetries
|
* Fail if the transaction has been retired for maxNumberOfRetries
|
||||||
**/
|
**/
|
||||||
|
|||||||
+2
-2
@@ -89,13 +89,13 @@ public class GetDeliveryReportsFromSmsGatewayTasklet implements Tasklet {
|
|||||||
smsMessageRepository.save(smsMessage);
|
smsMessageRepository.save(smsMessage);
|
||||||
|
|
||||||
if (statusChanged) {
|
if (statusChanged) {
|
||||||
log.info("Status of SMS message id: {} successfully changed to {}", smsMessage.getId(), statusType);
|
log.debug("Status of SMS message id: {} successfully changed to {}", smsMessage.getId(), statusType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(smsMessageDeliveryReportDataCollection)) {
|
if (!CollectionUtils.isEmpty(smsMessageDeliveryReportDataCollection)) {
|
||||||
log.info("{} delivery report(s) successfully received from the intermediate gateway - sms",
|
log.debug("{} delivery report(s) successfully received from the intermediate gateway - sms",
|
||||||
smsMessageDeliveryReportDataCollection.size());
|
smsMessageDeliveryReportDataCollection.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -72,7 +72,7 @@ public class UpdateEmailOutboundWithCampaignMessageTasklet implements Tasklet {
|
|||||||
LocalDateTime tenantDateNow = TenantDateTimeUtil.tenantDateTime();
|
LocalDateTime tenantDateNow = TenantDateTimeUtil.tenantDateTime();
|
||||||
LocalDateTime nextTriggerDate = emailCampaignData.getNextTriggerDate().toLocalDateTime();
|
LocalDateTime nextTriggerDate = emailCampaignData.getNextTriggerDate().toLocalDateTime();
|
||||||
|
|
||||||
log.info("tenant time {} trigger time {}", tenantDateNow, nextTriggerDate);
|
log.debug("tenant time {} trigger time {}", tenantDateNow, nextTriggerDate);
|
||||||
if (nextTriggerDate.isBefore(tenantDateNow)) {
|
if (nextTriggerDate.isBefore(tenantDateNow)) {
|
||||||
insertDirectCampaignIntoEmailOutboundTable(emailCampaignData.getParamValue(), emailCampaignData.getEmailSubject(),
|
insertDirectCampaignIntoEmailOutboundTable(emailCampaignData.getParamValue(), emailCampaignData.getEmailSubject(),
|
||||||
emailCampaignData.getMessage(), emailCampaignData.getCampaignName(), emailCampaignData.getId());
|
emailCampaignData.getMessage(), emailCampaignData.getCampaignName(), emailCampaignData.getId());
|
||||||
|
|||||||
+1
-1
@@ -54,7 +54,7 @@ public class UpdateSmsOutboundWithCampaignMessageTasklet implements Tasklet {
|
|||||||
LocalDateTime tenantDateNow = TenantDateTimeUtil.tenantDateTime();
|
LocalDateTime tenantDateNow = TenantDateTimeUtil.tenantDateTime();
|
||||||
LocalDateTime nextTriggerDate = smsCampaign.getNextTriggerDate();
|
LocalDateTime nextTriggerDate = smsCampaign.getNextTriggerDate();
|
||||||
|
|
||||||
log.info("tenant time {} trigger time {} {}", tenantDateNow, nextTriggerDate,
|
log.debug("tenant time {} trigger time {} {}", tenantDateNow, nextTriggerDate,
|
||||||
JobName.UPDATE_SMS_OUTBOUND_WITH_CAMPAIGN_MESSAGE.name());
|
JobName.UPDATE_SMS_OUTBOUND_WITH_CAMPAIGN_MESSAGE.name());
|
||||||
if (nextTriggerDate.isBefore(tenantDateNow)) {
|
if (nextTriggerDate.isBefore(tenantDateNow)) {
|
||||||
smsCampaignWritePlatformService.insertDirectCampaignIntoSmsOutboundTable(smsCampaign);
|
smsCampaignWritePlatformService.insertDirectCampaignIntoSmsOutboundTable(smsCampaign);
|
||||||
|
|||||||
+1
-1
@@ -452,7 +452,7 @@ public class SmsCampaignWritePlatformServiceJpaImpl implements SmsCampaignWriteP
|
|||||||
final String response = this.genericDataService.generateJsonFromGenericResultsetData(results);
|
final String response = this.genericDataService.generateJsonFromGenericResultsetData(results);
|
||||||
resultList = new ObjectMapper().readValue(response, new TypeReference<List<HashMap<String, Object>>>() {});
|
resultList = new ObjectMapper().readValue(response, new TypeReference<List<HashMap<String, Object>>>() {});
|
||||||
} catch (JsonParseException e) {
|
} catch (JsonParseException e) {
|
||||||
log.info("Conversion of report query results to JSON failed", e);
|
log.warn("Conversion of report query results to JSON failed", e);
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
// loop changes array date to string date
|
// loop changes array date to string date
|
||||||
|
|||||||
+2
-2
@@ -81,10 +81,10 @@ public class MultiException extends Exception {
|
|||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("RegexpSinglelineJava")
|
@SuppressWarnings("RegexpSinglelineJava")
|
||||||
public void printStackTrace() {
|
public void printStackTrace() {
|
||||||
LOG.info("{}", super.getMessage());
|
LOG.error("{}", super.getMessage());
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Throwable e : throwables) {
|
for (Throwable e : throwables) {
|
||||||
LOG.info("{}.", ++i);
|
LOG.error("{}.", ++i);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -60,13 +60,13 @@ public class AbandonedConnectionCleanupShutdownListener implements ApplicationLi
|
|||||||
java.sql.DriverManager.deregisterDriver(driver);
|
java.sql.DriverManager.deregisterDriver(driver);
|
||||||
LOG.info("JDBC driver de-registered successfully");
|
LOG.info("JDBC driver de-registered successfully");
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
LOG.error("Exception occured while deristering jdbc driver", t);
|
LOG.error("Exception occurred while de-register jdbc driver", t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
Thread.sleep(2000L);
|
Thread.sleep(2000L);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Exception Occcured while trying to sleep.", e);
|
LOG.error("Exception Occcurred while trying to sleep.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -107,7 +107,7 @@ public class EntityDatatableChecksWritePlatformServiceImpl implements EntityData
|
|||||||
final String foreignKeyColumnName = EntityTables.getForeignKeyColumnNameOnDatatable(entity);
|
final String foreignKeyColumnName = EntityTables.getForeignKeyColumnNameOnDatatable(entity);
|
||||||
final boolean columnExist = datatableData.hasColumn(foreignKeyColumnName);
|
final boolean columnExist = datatableData.hasColumn(foreignKeyColumnName);
|
||||||
|
|
||||||
LOG.info("{} has column {} ? {}", datatableData.getRegisteredTableName(), foreignKeyColumnName, columnExist);
|
LOG.debug("{} has column {} ? {}", datatableData.getRegisteredTableName(), foreignKeyColumnName, columnExist);
|
||||||
|
|
||||||
if (!columnExist) {
|
if (!columnExist) {
|
||||||
throw new EntityDatatableCheckNotSupportedException(datatableData.getRegisteredTableName(), entity);
|
throw new EntityDatatableCheckNotSupportedException(datatableData.getRegisteredTableName(), entity);
|
||||||
@@ -170,7 +170,7 @@ public class EntityDatatableChecksWritePlatformServiceImpl implements EntityData
|
|||||||
final String datatableName = t.getDatatableName();
|
final String datatableName = t.getDatatableName();
|
||||||
final Long countEntries = readWriteNonCoreDataService.countDatatableEntries(datatableName, entityId, foreignKeyColumn);
|
final Long countEntries = readWriteNonCoreDataService.countDatatableEntries(datatableName, entityId, foreignKeyColumn);
|
||||||
|
|
||||||
LOG.info("The are {} entries in the table {}", countEntries, datatableName);
|
LOG.debug("The are {} entries in the table {}", countEntries, datatableName);
|
||||||
if (countEntries.intValue() == 0) {
|
if (countEntries.intValue() == 0) {
|
||||||
reqDatatables.add(datatableName);
|
reqDatatables.add(datatableName);
|
||||||
}
|
}
|
||||||
@@ -199,7 +199,7 @@ public class EntityDatatableChecksWritePlatformServiceImpl implements EntityData
|
|||||||
final String datatableName = t.getDatatableName();
|
final String datatableName = t.getDatatableName();
|
||||||
final Long countEntries = readWriteNonCoreDataService.countDatatableEntries(datatableName, entityId, foreignKeyColumn);
|
final Long countEntries = readWriteNonCoreDataService.countDatatableEntries(datatableName, entityId, foreignKeyColumn);
|
||||||
|
|
||||||
LOG.info("The are {} entries in the table {}", countEntries, datatableName);
|
LOG.debug("The are {} entries in the table {}", countEntries, datatableName);
|
||||||
if (countEntries.intValue() == 0) {
|
if (countEntries.intValue() == 0) {
|
||||||
reqDatatables.add(datatableName);
|
reqDatatables.add(datatableName);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -104,7 +104,7 @@ public class ReadReportingServiceImpl implements ReadReportingService {
|
|||||||
final StringBuilder writer = new StringBuilder();
|
final StringBuilder writer = new StringBuilder();
|
||||||
|
|
||||||
final List<ResultsetColumnHeaderData> columnHeaders = result.getColumnHeaders();
|
final List<ResultsetColumnHeaderData> columnHeaders = result.getColumnHeaders();
|
||||||
log.info("NO. of Columns: {}", columnHeaders.size());
|
log.debug("NO. of Columns: {}", columnHeaders.size());
|
||||||
final Integer chSize = columnHeaders.size();
|
final Integer chSize = columnHeaders.size();
|
||||||
for (int i = 0; i < chSize; i++) {
|
for (int i = 0; i < chSize; i++) {
|
||||||
writer.append('"' + columnHeaders.get(i).getColumnName() + '"');
|
writer.append('"' + columnHeaders.get(i).getColumnName() + '"');
|
||||||
@@ -122,7 +122,7 @@ public class ReadReportingServiceImpl implements ReadReportingService {
|
|||||||
String currVal;
|
String currVal;
|
||||||
final String doubleQuote = "\"";
|
final String doubleQuote = "\"";
|
||||||
final String twoDoubleQuotes = doubleQuote + doubleQuote;
|
final String twoDoubleQuotes = doubleQuote + doubleQuote;
|
||||||
log.info("NO. of Rows: {}", data.size());
|
log.debug("NO. of Rows: {}", data.size());
|
||||||
for (ResultsetRowData element : data) {
|
for (ResultsetRowData element : data) {
|
||||||
row = element.getRow();
|
row = element.getRow();
|
||||||
rSize = row.size();
|
rSize = row.size();
|
||||||
@@ -254,7 +254,7 @@ public class ReadReportingServiceImpl implements ReadReportingService {
|
|||||||
final List<ResultsetRowData> data = result.getData();
|
final List<ResultsetRowData> data = result.getData();
|
||||||
List<Object> row;
|
List<Object> row;
|
||||||
|
|
||||||
log.info("NO. of Columns: {}", columnHeaders.size());
|
log.debug("NO. of Columns: {}", columnHeaders.size());
|
||||||
final Integer chSize = columnHeaders.size();
|
final Integer chSize = columnHeaders.size();
|
||||||
|
|
||||||
final Document document = new Document(PageSize.B0.rotate());
|
final Document document = new Document(PageSize.B0.rotate());
|
||||||
@@ -276,7 +276,7 @@ public class ReadReportingServiceImpl implements ReadReportingService {
|
|||||||
Integer rSize;
|
Integer rSize;
|
||||||
String currColType;
|
String currColType;
|
||||||
String currVal;
|
String currVal;
|
||||||
log.info("NO. of Rows: {}", data.size());
|
log.debug("NO. of Rows: {}", data.size());
|
||||||
for (ResultsetRowData element : data) {
|
for (ResultsetRowData element : data) {
|
||||||
row = element.getRow();
|
row = element.getRow();
|
||||||
rSize = row.size();
|
rSize = row.size();
|
||||||
@@ -484,14 +484,14 @@ public class ReadReportingServiceImpl implements ReadReportingService {
|
|||||||
@Override
|
@Override
|
||||||
public GenericResultsetData retrieveGenericResultSetForSmsEmailCampaign(String name, String type, Map<String, String> queryParams) {
|
public GenericResultsetData retrieveGenericResultSetForSmsEmailCampaign(String name, String type, Map<String, String> queryParams) {
|
||||||
final long startTime = System.currentTimeMillis();
|
final long startTime = System.currentTimeMillis();
|
||||||
log.info("STARTING REPORT: {} Type: {}", name, type);
|
log.debug("STARTING REPORT: {} Type: {}", name, type);
|
||||||
|
|
||||||
final String sql = sqlToRunForSmsEmailCampaign(name, type, queryParams);
|
final String sql = sqlToRunForSmsEmailCampaign(name, type, queryParams);
|
||||||
|
|
||||||
final GenericResultsetData result = this.genericDataService.fillGenericResultSet(sql);
|
final GenericResultsetData result = this.genericDataService.fillGenericResultSet(sql);
|
||||||
|
|
||||||
final long elapsed = System.currentTimeMillis() - startTime;
|
final long elapsed = System.currentTimeMillis() - startTime;
|
||||||
log.info("FINISHING Report/Request Name: {} - {} Elapsed Time: {}", name, type, elapsed);
|
log.debug("FINISHING Report/Request Name: {} - {} Elapsed Time: {}", name, type, elapsed);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -184,7 +184,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void logAsErrorUnexpectedDataIntegrityException(final Exception dve) {
|
private void logAsErrorUnexpectedDataIntegrityException(final Exception dve) {
|
||||||
LOG.error("Error occured.", dve);
|
LOG.error("Error occurred.", dve);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -806,7 +806,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
try {
|
try {
|
||||||
codeId = this.jdbcTemplate.queryForObject(checkColumnCodeMapping.toString(), Integer.class);
|
codeId = this.jdbcTemplate.queryForObject(checkColumnCodeMapping.toString(), Integer.class);
|
||||||
} catch (final EmptyResultDataAccessException e) {
|
} catch (final EmptyResultDataAccessException e) {
|
||||||
LOG.info("Error occured.", e);
|
LOG.warn("Error occurred.", e);
|
||||||
}
|
}
|
||||||
return ObjectUtils.defaultIfNull(codeId, 0);
|
return ObjectUtils.defaultIfNull(codeId, 0);
|
||||||
}
|
}
|
||||||
@@ -1228,11 +1228,11 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
pkValue = datatableId;
|
pkValue = datatableId;
|
||||||
}
|
}
|
||||||
final String sql = getUpdateSql(grs.getColumnHeaders(), dataTableName, pkName, pkValue, changes);
|
final String sql = getUpdateSql(grs.getColumnHeaders(), dataTableName, pkName, pkValue, changes);
|
||||||
LOG.info("Update sql: {}", sql);
|
LOG.debug("Update sql: {}", sql);
|
||||||
if (StringUtils.isNotBlank(sql)) {
|
if (StringUtils.isNotBlank(sql)) {
|
||||||
this.jdbcTemplate.update(sql);
|
this.jdbcTemplate.update(sql);
|
||||||
} else {
|
} else {
|
||||||
LOG.info("No Changes");
|
LOG.debug("No Changes");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1574,7 +1574,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
addSql = "insert into " + sqlGenerator.escape(datatable) + " (" + sqlGenerator.escape(fkName) + " " + insertColumns + ")"
|
addSql = "insert into " + sqlGenerator.escape(datatable) + " (" + sqlGenerator.escape(fkName) + " " + insertColumns + ")"
|
||||||
+ " select " + appTableId + " as id" + selectColumns;
|
+ " select " + appTableId + " as id" + selectColumns;
|
||||||
|
|
||||||
LOG.info("{}", addSql);
|
LOG.debug("{}", addSql);
|
||||||
|
|
||||||
return addSql;
|
return addSql;
|
||||||
}
|
}
|
||||||
@@ -1624,7 +1624,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
|||||||
+ ", score )" + " select " + appTableId + " as id" + selectColumns
|
+ ", score )" + " select " + appTableId + " as id" + selectColumns
|
||||||
+ " , ( SELECT SUM( code_score ) FROM m_code_value WHERE m_code_value.id IN (" + scoresId + " ) ) as score";
|
+ " , ( SELECT SUM( code_score ) FROM m_code_value WHERE m_code_value.id IN (" + scoresId + " ) ) as score";
|
||||||
|
|
||||||
LOG.info("{}", vaddSql);
|
LOG.debug("{}", vaddSql);
|
||||||
|
|
||||||
return vaddSql;
|
return vaddSql;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -164,7 +164,7 @@ public class S3ContentRepository implements ContentRepository {
|
|||||||
|
|
||||||
private S3Object getObject(String key) {
|
private S3Object getObject(String key) {
|
||||||
try {
|
try {
|
||||||
log.info("Downloading an object from Amazon S3 Bucket: {}, location: {}", this.s3BucketName, key);
|
log.debug("Downloading an object from Amazon S3 Bucket: {}, location: {}", this.s3BucketName, key);
|
||||||
return this.s3Client.getObject(new GetObjectRequest(this.s3BucketName, key));
|
return this.s3Client.getObject(new GetObjectRequest(this.s3BucketName, key));
|
||||||
} catch (AmazonClientException ase) {
|
} catch (AmazonClientException ase) {
|
||||||
throw new ContentManagementException(key, ase.getMessage(), ase);
|
throw new ContentManagementException(key, ase.getMessage(), ase);
|
||||||
|
|||||||
+3
-3
@@ -102,12 +102,12 @@ public final class ProcessorHelper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@SuppressWarnings("unused") Call call, retrofit2.Response response) {
|
public void onResponse(@SuppressWarnings("unused") Call call, retrofit2.Response response) {
|
||||||
LOG.info("URL: {} - Status: {}", url, response.code());
|
LOG.debug("URL: {} - Status: {}", url, response.code());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@SuppressWarnings("unused") Call call, Throwable t) {
|
public void onFailure(@SuppressWarnings("unused") Call call, Throwable t) {
|
||||||
LOG.error("URL: {} - Retrofit failure occured", url, t);
|
LOG.error("URL: {} - Retrofit failure occurred", url, t);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ public final class ProcessorHelper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@SuppressWarnings("unused") Call call, retrofit2.Response response) {
|
public void onResponse(@SuppressWarnings("unused") Call call, retrofit2.Response response) {
|
||||||
LOG.info("URL: {} - Status: {}", url, response.code());
|
LOG.debug("URL: {} - Status: {}", url, response.code());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -84,7 +84,7 @@ public class UpdateNpaTasklet implements Tasklet {
|
|||||||
|
|
||||||
final int result = jdbcTemplate.update(updateSqlBuilder.toString(), user.getId(), DateUtils.getOffsetDateTimeOfTenant());
|
final int result = jdbcTemplate.update(updateSqlBuilder.toString(), user.getId(), DateUtils.getOffsetDateTimeOfTenant());
|
||||||
|
|
||||||
log.info("{}: Records affected by updateNPA: {}", ThreadLocalContextUtil.getTenant().getName(), result);
|
log.debug("{}: Records affected by updateNPA: {}", ThreadLocalContextUtil.getTenant().getName(), result);
|
||||||
return RepeatStatus.FINISHED;
|
return RepeatStatus.FINISHED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -150,7 +150,7 @@ public class TenantAwareTenantIdentifierFilter extends GenericFilterBean {
|
|||||||
} finally {
|
} finally {
|
||||||
task.stop();
|
task.stop();
|
||||||
final PlatformRequestLog logRequest = PlatformRequestLog.from(task, request);
|
final PlatformRequestLog logRequest = PlatformRequestLog.from(task, request);
|
||||||
log.info("{}", this.toApiJsonSerializer.serialize(logRequest));
|
log.debug("{}", this.toApiJsonSerializer.serialize(logRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -140,7 +140,7 @@ public class SmsMessageScheduledJobServiceImpl implements SmsMessageScheduledJob
|
|||||||
}
|
}
|
||||||
this.smsMessageRepository.saveAll(smsMessages);
|
this.smsMessageRepository.saveAll(smsMessages);
|
||||||
request.append(SmsMessageApiQueueResourceData.toJsonString(apiQueueResourceDatas));
|
request.append(SmsMessageApiQueueResourceData.toJsonString(apiQueueResourceDatas));
|
||||||
log.info("Sending triggered SMS to specific provider with request - {}", request);
|
log.debug("Sending triggered SMS to specific provider with request - {}", request);
|
||||||
this.triggeredExecutorService.execute(new SmsTask(apiQueueResourceDatas, ThreadLocalContextUtil.getContext()));
|
this.triggeredExecutorService.execute(new SmsTask(apiQueueResourceDatas, ThreadLocalContextUtil.getContext()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Error occured.", e);
|
log.error("Error occured.", e);
|
||||||
|
|||||||
+5
-5
@@ -63,7 +63,7 @@ public class RecalculateInterestForLoanTasklet implements Tasklet {
|
|||||||
Map<String, JobParameter> jobParameters = chunkContext.getStepContext().getStepExecution().getJobParameters().getParameters();
|
Map<String, JobParameter> jobParameters = chunkContext.getStepContext().getStepExecution().getJobParameters().getParameters();
|
||||||
if (!jobParameters.isEmpty()) {
|
if (!jobParameters.isEmpty()) {
|
||||||
final String officeId = (String) jobParameters.get("officeId").getValue();
|
final String officeId = (String) jobParameters.get("officeId").getValue();
|
||||||
log.info("recalculateInterest: officeId={}", officeId);
|
log.debug("recalculateInterest: officeId={}", officeId);
|
||||||
Long officeIdLong = Long.valueOf(officeId);
|
Long officeIdLong = Long.valueOf(officeId);
|
||||||
|
|
||||||
final OfficeData office = officeReadPlatformService.retrieveOffice(officeIdLong);
|
final OfficeData office = officeReadPlatformService.retrieveOffice(officeIdLong);
|
||||||
@@ -82,14 +82,14 @@ public class RecalculateInterestForLoanTasklet implements Tasklet {
|
|||||||
if (!loanIds.isEmpty()) {
|
if (!loanIds.isEmpty()) {
|
||||||
List<Throwable> errors = new ArrayList<>();
|
List<Throwable> errors = new ArrayList<>();
|
||||||
for (Long loanId : loanIds) {
|
for (Long loanId : loanIds) {
|
||||||
log.info("recalculateInterest: Loan ID = {}", loanId);
|
log.debug("recalculateInterest: Loan ID = {}", loanId);
|
||||||
int numberOfRetries = 0;
|
int numberOfRetries = 0;
|
||||||
while (numberOfRetries <= maxNumberOfRetries) {
|
while (numberOfRetries <= maxNumberOfRetries) {
|
||||||
try {
|
try {
|
||||||
loanWritePlatformService.recalculateInterest(loanId);
|
loanWritePlatformService.recalculateInterest(loanId);
|
||||||
numberOfRetries = maxNumberOfRetries + 1;
|
numberOfRetries = maxNumberOfRetries + 1;
|
||||||
} catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) {
|
} catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) {
|
||||||
log.info("Recalulate interest job has been retried {} time(s)", numberOfRetries);
|
log.debug("Recalulate interest job has been retried {} time(s)", numberOfRetries);
|
||||||
if (numberOfRetries >= maxNumberOfRetries) {
|
if (numberOfRetries >= maxNumberOfRetries) {
|
||||||
log.error(
|
log.error(
|
||||||
"Recalulate interest job has been retried for the max allowed attempts of {} and will be rolled back",
|
"Recalulate interest job has been retried for the max allowed attempts of {} and will be rolled back",
|
||||||
@@ -113,7 +113,7 @@ public class RecalculateInterestForLoanTasklet implements Tasklet {
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
log.info("recalculateInterest: Loans count {}", i);
|
log.debug("recalculateInterest: Loans count {}", i);
|
||||||
}
|
}
|
||||||
if (!errors.isEmpty()) {
|
if (!errors.isEmpty()) {
|
||||||
throw new JobExecutionException(errors);
|
throw new JobExecutionException(errors);
|
||||||
@@ -136,7 +136,7 @@ public class RecalculateInterestForLoanTasklet implements Tasklet {
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
int totalFilteredRecords = loanIds.size();
|
int totalFilteredRecords = loanIds.size();
|
||||||
log.info("Starting accrual - total filtered records - {}", totalFilteredRecords);
|
log.debug("Starting accrual - total filtered records - {}", totalFilteredRecords);
|
||||||
recalculateInterest(loanIds, threadPoolSize, batchSize, executorService);
|
recalculateInterest(loanIds, threadPoolSize, batchSize, executorService);
|
||||||
maxLoanIdInList += pageSize + 1;
|
maxLoanIdInList += pageSize + 1;
|
||||||
loanIds = Collections.synchronizedList(
|
loanIds = Collections.synchronizedList(
|
||||||
|
|||||||
+1
-1
@@ -83,7 +83,7 @@ public class UpdateLoanArrearsAgeingTasklet implements Tasklet {
|
|||||||
result += i;
|
result += i;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("{}: Records affected by updateLoanArrearsAgeingDetails: {}", ThreadLocalContextUtil.getTenant().getName(), result);
|
log.debug("{}: Records affected by updateLoanArrearsAgeingDetails: {}", ThreadLocalContextUtil.getTenant().getName(), result);
|
||||||
return RepeatStatus.FINISHED;
|
return RepeatStatus.FINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -913,7 +913,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
|||||||
Long[] childLoanId = new Long[repayments.size()];
|
Long[] childLoanId = new Long[repayments.size()];
|
||||||
for (int i = 0; i < repayments.size(); i++) {
|
for (int i = 0; i < repayments.size(); i++) {
|
||||||
jsonObject = repayments.get(i).getAsJsonObject();
|
jsonObject = repayments.get(i).getAsJsonObject();
|
||||||
log.info("{}", jsonObject.toString());
|
log.debug("{}", jsonObject.toString());
|
||||||
childLoanId[i] = jsonObject.get("loanId").getAsLong();
|
childLoanId[i] = jsonObject.get("loanId").getAsLong();
|
||||||
}
|
}
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|||||||
+5
-4
@@ -62,18 +62,19 @@ public class RecalculateInterestPoster implements Callable<Void> {
|
|||||||
if (!loanIds.isEmpty()) {
|
if (!loanIds.isEmpty()) {
|
||||||
List<Throwable> errors = new ArrayList<>();
|
List<Throwable> errors = new ArrayList<>();
|
||||||
for (Long loanId : loanIds) {
|
for (Long loanId : loanIds) {
|
||||||
LOG.info("Loan ID {}", loanId);
|
LOG.debug("Loan ID {}", loanId);
|
||||||
Integer numberOfRetries = 0;
|
Integer numberOfRetries = 0;
|
||||||
while (numberOfRetries <= maxNumberOfRetries) {
|
while (numberOfRetries <= maxNumberOfRetries) {
|
||||||
try {
|
try {
|
||||||
this.loanWritePlatformService.recalculateInterest(loanId);
|
this.loanWritePlatformService.recalculateInterest(loanId);
|
||||||
numberOfRetries = maxNumberOfRetries + 1;
|
numberOfRetries = maxNumberOfRetries + 1;
|
||||||
} catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) {
|
} catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) {
|
||||||
LOG.info("Recalulate interest job has been retried {} time(s)", numberOfRetries);
|
LOG.debug("Recalculate interest job has been retried {} time(s)", numberOfRetries);
|
||||||
// Fail if the transaction has been retired for
|
// Fail if the transaction has been retired for
|
||||||
// maxNumberOfRetries
|
// maxNumberOfRetries
|
||||||
if (numberOfRetries >= maxNumberOfRetries) {
|
if (numberOfRetries >= maxNumberOfRetries) {
|
||||||
LOG.error("Recalulate interest job has been retried for the max allowed attempts of {} and will be rolled back",
|
LOG.error(
|
||||||
|
"Recalculate interest job has been retried for the max allowed attempts of {} and will be rolled back",
|
||||||
numberOfRetries);
|
numberOfRetries);
|
||||||
errors.add(exception);
|
errors.add(exception);
|
||||||
break;
|
break;
|
||||||
@@ -96,7 +97,7 @@ public class RecalculateInterestPoster implements Callable<Void> {
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
LOG.info("Loans count {}", i);
|
LOG.debug("Loans count {}", i);
|
||||||
}
|
}
|
||||||
if (!errors.isEmpty()) {
|
if (!errors.isEmpty()) {
|
||||||
throw new JobExecutionException(errors);
|
throw new JobExecutionException(errors);
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ public class ApplyAnnualFeeForSavingsTasklet implements Tasklet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("{}: Records affected by applyAnnualFeeForSavings: {}", ThreadLocalContextUtil.getTenant().getName(),
|
log.debug("{}: Records affected by applyAnnualFeeForSavings: {}", ThreadLocalContextUtil.getTenant().getName(),
|
||||||
annualFeeData.size());
|
annualFeeData.size());
|
||||||
return RepeatStatus.FINISHED;
|
return RepeatStatus.FINISHED;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -85,18 +85,18 @@ public class GenerateAdhocClientScheduleTasklet implements Tasklet {
|
|||||||
.append(") ").append(adhoc.getQuery());
|
.append(") ").append(adhoc.getQuery());
|
||||||
if (insertSqlBuilder.length() > 0) {
|
if (insertSqlBuilder.length() > 0) {
|
||||||
final int result = jdbcTemplate.update(insertSqlBuilder.toString());
|
final int result = jdbcTemplate.update(insertSqlBuilder.toString());
|
||||||
log.info("{}: Records affected by generateClientSchedule: {}", ThreadLocalContextUtil.getTenant().getName(),
|
log.debug("{}: Records affected by generateClientSchedule: {}", ThreadLocalContextUtil.getTenant().getName(),
|
||||||
result);
|
result);
|
||||||
|
|
||||||
jdbcTemplate.update("UPDATE m_adhoc SET last_run=? WHERE id=?", new Date(), adhoc.getId());
|
jdbcTemplate.update("UPDATE m_adhoc SET last_run=? WHERE id=?", new Date(), adhoc.getId());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.info("{}: Skipping execution of {}, scheduled for execution on {}", ThreadLocalContextUtil.getTenant().getName(),
|
log.debug("{}: Skipping execution of {}, scheduled for execution on {}", ThreadLocalContextUtil.getTenant().getName(),
|
||||||
adhoc.getName(), next);
|
adhoc.getName(), next);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
log.info("{}: Nothing to update by generateClientSchedule", ThreadLocalContextUtil.getTenant().getName());
|
log.debug("{}: Nothing to update by generateClientSchedule", ThreadLocalContextUtil.getTenant().getName());
|
||||||
}
|
}
|
||||||
return RepeatStatus.FINISHED;
|
return RepeatStatus.FINISHED;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ public class PayDueSavingsChargesTasklet implements Tasklet {
|
|||||||
log.error("Apply Charges due for savings failed for account: {}", savingsAccountReference.getAccountNo(), ex);
|
log.error("Apply Charges due for savings failed for account: {}", savingsAccountReference.getAccountNo(), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info("{}: Records affected by applyDueChargesForSavings: {}", ThreadLocalContextUtil.getTenant().getName(),
|
log.debug("{}: Records affected by applyDueChargesForSavings: {}", ThreadLocalContextUtil.getTenant().getName(),
|
||||||
chargesDueData.size());
|
chargesDueData.size());
|
||||||
if (!exceptions.isEmpty()) {
|
if (!exceptions.isEmpty()) {
|
||||||
throw new JobExecutionException(exceptions);
|
throw new JobExecutionException(exceptions);
|
||||||
|
|||||||
+7
-7
@@ -80,20 +80,20 @@ public class PostInterestForSavingTasklet implements Tasklet {
|
|||||||
|
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
|
|
||||||
log.info("Reading Savings Account Data!");
|
log.debug("Reading Savings Account Data!");
|
||||||
List<SavingsAccountData> savingsAccounts = savingAccountReadPlatformService
|
List<SavingsAccountData> savingsAccounts = savingAccountReadPlatformService
|
||||||
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxSavingsIdInList);
|
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxSavingsIdInList);
|
||||||
|
|
||||||
if (savingsAccounts != null && savingsAccounts.size() > 0) {
|
if (savingsAccounts != null && savingsAccounts.size() > 0) {
|
||||||
savingsAccounts = Collections.synchronizedList(savingsAccounts);
|
savingsAccounts = Collections.synchronizedList(savingsAccounts);
|
||||||
long finish = System.currentTimeMillis();
|
long finish = System.currentTimeMillis();
|
||||||
log.info("Done fetching Data within {} milliseconds", finish - start);
|
log.debug("Done fetching Data within {} milliseconds", finish - start);
|
||||||
queue.add(savingsAccounts);
|
queue.add(savingsAccounts);
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(queue)) {
|
if (!CollectionUtils.isEmpty(queue)) {
|
||||||
do {
|
do {
|
||||||
int totalFilteredRecords = savingsAccounts.size();
|
int totalFilteredRecords = savingsAccounts.size();
|
||||||
log.info("Starting Interest posting - total records - {}", totalFilteredRecords);
|
log.debug("Starting Interest posting - total records - {}", totalFilteredRecords);
|
||||||
List<SavingsAccountData> queueElement = queue.element();
|
List<SavingsAccountData> queueElement = queue.element();
|
||||||
maxSavingsIdInList = queueElement.get(queueElement.size() - 1).getId();
|
maxSavingsIdInList = queueElement.get(queueElement.size() - 1).getId();
|
||||||
postInterest(queue.remove(), threadPoolSize, executorService, backdatedTxnsAllowedTill, pageSize, maxSavingsIdInList);
|
postInterest(queue.remove(), threadPoolSize, executorService, backdatedTxnsAllowedTill, pageSize, maxSavingsIdInList);
|
||||||
@@ -132,7 +132,7 @@ public class PostInterestForSavingTasklet implements Tasklet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (queue.size() <= queueSize) {
|
while (queue.size() <= queueSize) {
|
||||||
log.info("Fetching while threads are running!");
|
log.debug("Fetching while threads are running!");
|
||||||
List<SavingsAccountData> savingsAccountDataList = Collections.synchronizedList(this.savingAccountReadPlatformService
|
List<SavingsAccountData> savingsAccountDataList = Collections.synchronizedList(this.savingAccountReadPlatformService
|
||||||
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxId));
|
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxId));
|
||||||
if (savingsAccountDataList.isEmpty()) {
|
if (savingsAccountDataList.isEmpty()) {
|
||||||
@@ -184,19 +184,19 @@ public class PostInterestForSavingTasklet implements Tasklet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (queue.size() <= queueSize) {
|
while (queue.size() <= queueSize) {
|
||||||
log.info("Fetching while threads are running!..:: this is not supposed to run........");
|
log.debug("Fetching while threads are running!..:: this is not supposed to run........");
|
||||||
savingsAccounts = Collections.synchronizedList(this.savingAccountReadPlatformService
|
savingsAccounts = Collections.synchronizedList(this.savingAccountReadPlatformService
|
||||||
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxId));
|
.retrieveAllSavingsDataForInterestPosting(backdatedTxnsAllowedTill, pageSize, ACTIVE.getValue(), maxId));
|
||||||
if (savingsAccounts.isEmpty()) {
|
if (savingsAccounts.isEmpty()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
maxId = savingsAccounts.get(savingsAccounts.size() - 1).getId();
|
maxId = savingsAccounts.get(savingsAccounts.size() - 1).getId();
|
||||||
log.info("Add to the Queue");
|
log.debug("Add to the Queue");
|
||||||
queue.add(savingsAccounts);
|
queue.add(savingsAccounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkCompletion(responses);
|
checkCompletion(responses);
|
||||||
log.info("Queue size {}", queue.size());
|
log.debug("Queue size {}", queue.size());
|
||||||
} catch (InterruptedException e1) {
|
} catch (InterruptedException e1) {
|
||||||
log.error("Interrupted while postInterest", e1);
|
log.error("Interrupted while postInterest", e1);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ public class UpdateDepositsAccountMaturityDetailsTasklet implements Tasklet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("{}: Records affected by updateMaturityDetailsOfDepositAccounts: {}", ThreadLocalContextUtil.getTenant().getName(),
|
log.debug("{}: Records affected by updateMaturityDetailsOfDepositAccounts: {}", ThreadLocalContextUtil.getTenant().getName(),
|
||||||
depositAccounts.size());
|
depositAccounts.size());
|
||||||
return RepeatStatus.FINISHED;
|
return RepeatStatus.FINISHED;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -355,7 +355,7 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
|
|
||||||
if (account.getGsim() != null) {
|
if (account.getGsim() != null) {
|
||||||
isGsim = true;
|
isGsim = true;
|
||||||
LOG.info("is gsim");
|
LOG.debug("is gsim");
|
||||||
}
|
}
|
||||||
checkClientOrGroupActive(account);
|
checkClientOrGroupActive(account);
|
||||||
|
|
||||||
@@ -379,13 +379,13 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
LOG.debug("Deposit account has been created: {} ", deposit);
|
LOG.debug("Deposit account has been created: {} ", deposit);
|
||||||
|
|
||||||
GroupSavingsIndividualMonitoring gsim = gsimRepository.findById(account.getGsim().getId()).orElseThrow();
|
GroupSavingsIndividualMonitoring gsim = gsimRepository.findById(account.getGsim().getId()).orElseThrow();
|
||||||
LOG.info("parent deposit : {} ", gsim.getParentDeposit());
|
LOG.debug("parent deposit : {} ", gsim.getParentDeposit());
|
||||||
LOG.info("child account : {} ", savingsId);
|
LOG.debug("child account : {} ", savingsId);
|
||||||
BigDecimal currentBalance = gsim.getParentDeposit();
|
BigDecimal currentBalance = gsim.getParentDeposit();
|
||||||
BigDecimal newBalance = currentBalance.add(transactionAmount);
|
BigDecimal newBalance = currentBalance.add(transactionAmount);
|
||||||
gsim.setParentDeposit(newBalance);
|
gsim.setParentDeposit(newBalance);
|
||||||
gsimRepository.save(gsim);
|
gsimRepository.save(gsim);
|
||||||
LOG.info("balance after making deposit : {} ",
|
LOG.debug("balance after making deposit : {} ",
|
||||||
gsimRepository.findById(account.getGsim().getId()).orElseThrow().getParentDeposit());
|
gsimRepository.findById(account.getGsim().getId()).orElseThrow().getParentDeposit());
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -663,13 +663,13 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
}
|
}
|
||||||
|
|
||||||
long startPosting = System.currentTimeMillis();
|
long startPosting = System.currentTimeMillis();
|
||||||
LOG.info("Interest Posting Start Here at {}", startPosting);
|
LOG.debug("Interest Posting Start Here at {}", startPosting);
|
||||||
|
|
||||||
savingsAccountData = this.savingsAccountInterestPostingService.postInterest(mc, today, isInterestTransfer,
|
savingsAccountData = this.savingsAccountInterestPostingService.postInterest(mc, today, isInterestTransfer,
|
||||||
isSavingsInterestPostingAtCurrentPeriodEnd, financialYearBeginningMonth, postInterestOnDate, backdatedTxnsAllowedTill,
|
isSavingsInterestPostingAtCurrentPeriodEnd, financialYearBeginningMonth, postInterestOnDate, backdatedTxnsAllowedTill,
|
||||||
savingsAccountData);
|
savingsAccountData);
|
||||||
long endPosting = System.currentTimeMillis();
|
long endPosting = System.currentTimeMillis();
|
||||||
LOG.info("Interest Posting Ends within {}", endPosting - startPosting);
|
LOG.debug("Interest Posting Ends within {}", endPosting - startPosting);
|
||||||
|
|
||||||
if (!backdatedTxnsAllowedTill) {
|
if (!backdatedTxnsAllowedTill) {
|
||||||
List<SavingsAccountTransactionData> transactions = savingsAccountData.getSavingsAccountTransactionData();
|
List<SavingsAccountTransactionData> transactions = savingsAccountData.getSavingsAccountTransactionData();
|
||||||
|
|||||||
+6
-6
@@ -96,7 +96,7 @@ public class SavingsSchedularInterestPoster implements Callable<Void> {
|
|||||||
|
|
||||||
// List<BatchResponse> responseList = new ArrayList<>();
|
// List<BatchResponse> responseList = new ArrayList<>();
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
LOG.info("Thread Execution Started at {}", start);
|
LOG.debug("Thread Execution Started at {}", start);
|
||||||
|
|
||||||
List<Throwable> errors = new ArrayList<>();
|
List<Throwable> errors = new ArrayList<>();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -113,11 +113,11 @@ public class SavingsSchedularInterestPoster implements Callable<Void> {
|
|||||||
long endPosting = System.currentTimeMillis();
|
long endPosting = System.currentTimeMillis();
|
||||||
savingsAccountDataList.add(savingsAccountDataRet);
|
savingsAccountDataList.add(savingsAccountDataRet);
|
||||||
|
|
||||||
LOG.info("Posting Completed Within {}", endPosting - startPosting);
|
LOG.debug("Posting Completed Within {}", endPosting - startPosting);
|
||||||
|
|
||||||
numberOfRetries = maxNumberOfRetries + 1;
|
numberOfRetries = maxNumberOfRetries + 1;
|
||||||
} catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) {
|
} catch (CannotAcquireLockException | ObjectOptimisticLockingFailureException exception) {
|
||||||
LOG.info("Interest posting job for savings ID {} has been retried {} time(s)", savingsAccountData.getId(),
|
LOG.debug("Interest posting job for savings ID {} has been retried {} time(s)", savingsAccountData.getId(),
|
||||||
numberOfRetries);
|
numberOfRetries);
|
||||||
// Fail if the transaction has been retired for
|
// Fail if the transaction has been retired for
|
||||||
// maxNumberOfRetries
|
// maxNumberOfRetries
|
||||||
@@ -166,7 +166,7 @@ public class SavingsSchedularInterestPoster implements Callable<Void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
long end = System.currentTimeMillis();
|
long end = System.currentTimeMillis();
|
||||||
LOG.info("Time To Finish the batch {} by thread {} for accounts {}", end - start, Thread.currentThread().getId(),
|
LOG.debug("Time To Finish the batch {} by thread {} for accounts {}", end - start, Thread.currentThread().getId(),
|
||||||
savingAccounts.size());
|
savingAccounts.size());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -297,10 +297,10 @@ public class SavingsSchedularInterestPoster implements Callable<Void> {
|
|||||||
this.jdbcTemplate.batchUpdate(queryForSavingsUpdate, paramsForSavingsSummary);
|
this.jdbcTemplate.batchUpdate(queryForSavingsUpdate, paramsForSavingsSummary);
|
||||||
this.jdbcTemplate.batchUpdate(queryForTransactionInsertion, paramsForTransactionInsertion);
|
this.jdbcTemplate.batchUpdate(queryForTransactionInsertion, paramsForTransactionInsertion);
|
||||||
this.jdbcTemplate.batchUpdate(queryForTransactionUpdate, paramsForTransactionUpdate);
|
this.jdbcTemplate.batchUpdate(queryForTransactionUpdate, paramsForTransactionUpdate);
|
||||||
LOG.info("`Total No Of Interest Posting:` {}", transRefNo.size());
|
LOG.debug("`Total No Of Interest Posting:` {}", transRefNo.size());
|
||||||
List<SavingsAccountTransactionData> savingsAccountTransactionDataList = fetchTransactionsFromIds(transRefNo);
|
List<SavingsAccountTransactionData> savingsAccountTransactionDataList = fetchTransactionsFromIds(transRefNo);
|
||||||
if (savingsAccountDataList != null) {
|
if (savingsAccountDataList != null) {
|
||||||
LOG.info("Fetched Transactions from DB: {}", savingsAccountTransactionDataList.size());
|
LOG.debug("Fetched Transactions from DB: {}", savingsAccountTransactionDataList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap<String, SavingsAccountTransactionData> savingsAccountTransactionMap = new HashMap<>();
|
HashMap<String, SavingsAccountTransactionData> savingsAccountTransactionMap = new HashMap<>();
|
||||||
|
|||||||
-5
@@ -38,7 +38,6 @@ import javax.persistence.ManyToOne;
|
|||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.UniqueConstraint;
|
import javax.persistence.UniqueConstraint;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
@@ -48,7 +47,6 @@ import org.apache.fineract.infrastructure.security.domain.PlatformUser;
|
|||||||
import org.apache.fineract.infrastructure.security.exception.NoAuthorizationException;
|
import org.apache.fineract.infrastructure.security.exception.NoAuthorizationException;
|
||||||
import org.apache.fineract.infrastructure.security.service.PlatformPasswordEncoder;
|
import org.apache.fineract.infrastructure.security.service.PlatformPasswordEncoder;
|
||||||
import org.apache.fineract.infrastructure.security.service.RandomPasswordGenerator;
|
import org.apache.fineract.infrastructure.security.service.RandomPasswordGenerator;
|
||||||
import org.apache.fineract.infrastructure.security.utils.LogParameterEscapeUtil;
|
|
||||||
import org.apache.fineract.organisation.office.domain.Office;
|
import org.apache.fineract.organisation.office.domain.Office;
|
||||||
import org.apache.fineract.organisation.staff.domain.Staff;
|
import org.apache.fineract.organisation.staff.domain.Staff;
|
||||||
import org.apache.fineract.portfolio.client.domain.Client;
|
import org.apache.fineract.portfolio.client.domain.Client;
|
||||||
@@ -57,7 +55,6 @@ import org.springframework.security.core.GrantedAuthority;
|
|||||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||||
import org.springframework.security.core.userdetails.User;
|
import org.springframework.security.core.userdetails.User;
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "m_appuser", uniqueConstraints = @UniqueConstraint(columnNames = { "username" }, name = "username_org"))
|
@Table(name = "m_appuser", uniqueConstraints = @UniqueConstraint(columnNames = { "username" }, name = "username_org"))
|
||||||
public class AppUser extends AbstractPersistableCustom implements PlatformUser {
|
public class AppUser extends AbstractPersistableCustom implements PlatformUser {
|
||||||
@@ -638,8 +635,6 @@ public class AppUser extends AbstractPersistableCustom implements PlatformUser {
|
|||||||
public void validateHasPermissionTo(final String function) {
|
public void validateHasPermissionTo(final String function) {
|
||||||
if (hasNotPermissionTo(function)) {
|
if (hasNotPermissionTo(function)) {
|
||||||
final String authorizationMessage = "User has no authority to: " + function;
|
final String authorizationMessage = "User has no authority to: " + function;
|
||||||
log.info("Unauthorized access: userId: {} action: {} allowed: {}", getId(), LogParameterEscapeUtil.escapeLogParameter(function),
|
|
||||||
getAuthorities());
|
|
||||||
throw new NoAuthorizationException(authorizationMessage);
|
throw new NoAuthorizationException(authorizationMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -55,7 +55,7 @@ public class PermissionReadPlatformServiceImpl implements PermissionReadPlatform
|
|||||||
|
|
||||||
final PermissionUsageDataMapper mapper = new PermissionUsageDataMapper(sqlGenerator);
|
final PermissionUsageDataMapper mapper = new PermissionUsageDataMapper(sqlGenerator);
|
||||||
final String sql = mapper.permissionSchema();
|
final String sql = mapper.permissionSchema();
|
||||||
LOG.info("retrieveAllPermissions: {}", sql);
|
LOG.debug("retrieveAllPermissions: {}", sql);
|
||||||
return this.jdbcTemplate.query(sql, mapper, new Object[] {});
|
return this.jdbcTemplate.query(sql, mapper, new Object[] {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ public class PermissionReadPlatformServiceImpl implements PermissionReadPlatform
|
|||||||
|
|
||||||
final PermissionUsageDataMapper mapper = new PermissionUsageDataMapper(sqlGenerator);
|
final PermissionUsageDataMapper mapper = new PermissionUsageDataMapper(sqlGenerator);
|
||||||
final String sql = mapper.makerCheckerablePermissionSchema();
|
final String sql = mapper.makerCheckerablePermissionSchema();
|
||||||
LOG.info("retrieveAllMakerCheckerablePermissions: {}", sql);
|
LOG.debug("retrieveAllMakerCheckerablePermissions: {}", sql);
|
||||||
|
|
||||||
return this.jdbcTemplate.query(sql, mapper, new Object[] {});
|
return this.jdbcTemplate.query(sql, mapper, new Object[] {});
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,7 @@ public class PermissionReadPlatformServiceImpl implements PermissionReadPlatform
|
|||||||
|
|
||||||
final PermissionUsageDataMapper mapper = new PermissionUsageDataMapper(sqlGenerator);
|
final PermissionUsageDataMapper mapper = new PermissionUsageDataMapper(sqlGenerator);
|
||||||
final String sql = mapper.rolePermissionSchema();
|
final String sql = mapper.rolePermissionSchema();
|
||||||
LOG.info("retrieveAllRolePermissions: {}", sql);
|
LOG.debug("retrieveAllRolePermissions: {}", sql);
|
||||||
|
|
||||||
return this.jdbcTemplate.query(sql, mapper, new Object[] { roleId });
|
return this.jdbcTemplate.query(sql, mapper, new Object[] { roleId });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user