MySQL is returning Long value where Drizzle was returning Big Integer
This commit is contained in:
+9
-2
@@ -379,8 +379,15 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
|
|||||||
List<Map<String, Object>> dividendDetails = this.shareAccountDividendReadPlatformService.retriveDividendDetailsForPostDividents();
|
List<Map<String, Object>> dividendDetails = this.shareAccountDividendReadPlatformService.retriveDividendDetailsForPostDividents();
|
||||||
StringBuilder errorMsg = new StringBuilder();
|
StringBuilder errorMsg = new StringBuilder();
|
||||||
for (Map<String, Object> dividendMap : dividendDetails) {
|
for (Map<String, Object> dividendMap : dividendDetails) {
|
||||||
final Long id = ((BigInteger) dividendMap.get("id")).longValue();
|
Long id = null ;
|
||||||
final Long savingsId = ((BigInteger) dividendMap.get("savingsAccountId")).longValue();
|
Long savingsId = null ;
|
||||||
|
if(dividendMap.get("id") instanceof BigInteger) { //Drizzle is returning BigInteger
|
||||||
|
id = ((BigInteger)dividendMap.get("id")).longValue() ;
|
||||||
|
savingsId = ((BigInteger)dividendMap.get("savingsAccountId")).longValue() ;
|
||||||
|
}else { //MySQL connector is returning Long
|
||||||
|
id = (Long) dividendMap.get("id") ;
|
||||||
|
savingsId = (Long) dividendMap.get("savingsAccountId") ;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
this.shareAccountSchedularService.postDividend(id, savingsId);
|
this.shareAccountSchedularService.postDividend(id, savingsId);
|
||||||
} catch (final PlatformApiDataValidationException e) {
|
} catch (final PlatformApiDataValidationException e) {
|
||||||
|
|||||||
+3
-3
@@ -2,8 +2,8 @@ insert ignore into m_entity_to_entity_mapping (from_id,to_id,rel_id)
|
|||||||
select mea.entity_id as fromId,
|
select mea.entity_id as fromId,
|
||||||
mea.second_entity_id as toid,
|
mea.second_entity_id as toid,
|
||||||
case mea.access_type_code_value_id
|
case mea.access_type_code_value_id
|
||||||
when 10 then 1
|
when (select mcv.id from m_code_value mcv where mcv.code_value like'Office Access to Loan Products') then (select mer.id from m_entity_relation mer where mer.code_name like 'office_access_to_loan_products')
|
||||||
when 11 then 2
|
when (select mcv.id from m_code_value mcv where mcv.code_value like'Office Access to Savings Products') then (select mer.id from m_entity_relation mer where mer.code_name like 'office_access_to_savings_products')
|
||||||
when 12 then 3
|
when (select mcv.id from m_code_value mcv where mcv.code_value like'Office Access to Fees/Charges') then (select mer.id from m_entity_relation mer where mer.code_name like 'office_access_to_fees/charges')
|
||||||
end as reId
|
end as reId
|
||||||
from m_entity_to_entity_access mea
|
from m_entity_to_entity_access mea
|
||||||
Reference in New Issue
Block a user