fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject incubator-fineract git commit: MySQL is returning Long value where Drizzle was returning Big Integer
Date Tue, 28 Jun 2016 08:23:42 GMT
Repository: incubator-fineract
Updated Branches:
  refs/heads/develop 9a2568d15 -> 59825080b


MySQL is returning Long value where Drizzle was returning Big Integer


Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/59825080
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/59825080
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/59825080

Branch: refs/heads/develop
Commit: 59825080b7408a08ac62fe71aec8d058782b332d
Parents: 9a2568d
Author: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Authored: Tue Jun 28 13:52:55 2016 +0530
Committer: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Committed: Tue Jun 28 13:52:55 2016 +0530

----------------------------------------------------------------------
 .../service/ScheduledJobRunnerServiceImpl.java           | 11 +++++++++--
 ...rom_entitytoentityaccess_to_entitytoentitymapping.sql |  6 +++---
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/59825080/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
index d68efb1..26aac81 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/scheduledjobs/service/ScheduledJobRunnerServiceImpl.java
@@ -379,8 +379,15 @@ public class ScheduledJobRunnerServiceImpl implements ScheduledJobRunnerService
         List<Map<String, Object>> dividendDetails = this.shareAccountDividendReadPlatformService.retriveDividendDetailsForPostDividents();
         StringBuilder errorMsg = new StringBuilder();
         for (Map<String, Object> dividendMap : dividendDetails) {
-            final Long id = ((BigInteger) dividendMap.get("id")).longValue();
-            final Long savingsId = ((BigInteger) dividendMap.get("savingsAccountId")).longValue();
+        	Long id = null ;
+        	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 {
                 this.shareAccountSchedularService.postDividend(id, savingsId);
             } catch (final PlatformApiDataValidationException e) {

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/59825080/fineract-provider/src/main/resources/sql/migrations/core_db/V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/resources/sql/migrations/core_db/V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql
b/fineract-provider/src/main/resources/sql/migrations/core_db/V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql
index 19e58ae..17089ad 100644
--- a/fineract-provider/src/main/resources/sql/migrations/core_db/V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql
+++ b/fineract-provider/src/main/resources/sql/migrations/core_db/V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql
@@ -2,8 +2,8 @@ insert ignore into m_entity_to_entity_mapping (from_id,to_id,rel_id)
 select  mea.entity_id as fromId,
 mea.second_entity_id as toid,
 case mea.access_type_code_value_id
-when 10 then 1
-when 11 then 2
-when 12 then 3
+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 (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 (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
 from m_entity_to_entity_access mea
\ No newline at end of file


Mime
View raw message