Repository: incubator-fineract Updated Branches: refs/heads/develop 34b988195 -> f1f3d6516
FINERACT-228 Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/5a258bde Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/5a258bde Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/5a258bde Branch: refs/heads/develop Commit: 5a258bde90443fc95350bb2608b34e3a08975a40 Parents: c1af6d6 Author: Ippez Robert <ippezrob...@gmail.com> Authored: Sat Mar 4 10:45:17 2017 +0300 Committer: Ippez Robert <ippezrob...@gmail.com> Committed: Sat Mar 4 10:45:17 2017 +0300 ---------------------------------------------------------------------- .../client/api/ClientApiConstants.java | 8 +++---- .../portfolio/client/data/ClientData.java | 23 ++++++++++++-------- .../client/data/ClientDataValidator.java | 10 +++++++++ .../portfolio/client/domain/Client.java | 21 ++++++++++++++++-- .../service/ClientReadPlatformServiceImpl.java | 8 +++++-- ...ntWritePlatformServiceJpaRepositoryImpl.java | 5 +++-- .../core_db/V325__add_is_staff_client_data.sql | 20 +++++++++++++++++ 7 files changed, 76 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/5a258bde/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java index fe5ec64..bae61d5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java @@ -89,6 +89,7 @@ public class ClientApiConstants { public static final String activationDateParamName = "activationDate"; public static final String reactivationDateParamName = "reactivationDate"; public static final String staffIdParamName = "staffId"; + public static final String isStaffParamName = "isStaff"; public static final String closureDateParamName = "closureDate"; public static final String closureReasonIdParamName = "closureReasonId"; public static final String reopenedDateParamName = "reopenedDate"; @@ -184,7 +185,7 @@ public class ClientApiConstants { mobileNoParamName, firstnameParamName, middlenameParamName, lastnameParamName, fullnameParamName, officeIdParamName, activeParamName, activationDateParamName, staffIdParamName, submittedOnDateParamName, savingsProductIdParamName, dateOfBirthParamName, genderIdParamName, clientTypeIdParamName, clientClassificationIdParamName, - clientNonPersonDetailsParamName, displaynameParamName, legalFormIdParamName, datatables)); + clientNonPersonDetailsParamName, displaynameParamName, legalFormIdParamName, datatables, isStaffParamName)); public static final Set<String> CLIENT_NON_PERSON_CREATE_REQUEST_DATA_PARAMETERS = new HashSet<>( Arrays.asList(address,localeParamName, dateFormatParamName, incorpNumberParamName, remarksParamName, incorpValidityTillParamName, @@ -194,8 +195,7 @@ public class ClientApiConstants { dateFormatParamName, accountNoParamName, externalIdParamName, mobileNoParamName, firstnameParamName, middlenameParamName, lastnameParamName, fullnameParamName, activeParamName, activationDateParamName, staffIdParamName, savingsProductIdParamName, - dateOfBirthParamName, genderIdParamName, clientTypeIdParamName, clientClassificationIdParamName, submittedOnDateParamName, - clientNonPersonDetailsParamName, displaynameParamName, legalFormIdParamName)); + dateOfBirthParamName, genderIdParamName, clientTypeIdParamName, clientClassificationIdParamName, submittedOnDateParamName, clientNonPersonDetailsParamName, displaynameParamName, legalFormIdParamName, isStaffParamName)); public static final Set<String> CLIENT_NON_PERSON_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(Arrays.asList(localeParamName, dateFormatParamName, incorpNumberParamName, remarksParamName, incorpValidityTillParamName, @@ -212,7 +212,7 @@ public class ClientApiConstants { transferToOfficeIdParamName, transferToOfficeNameParamName, hierarchyParamName, imageIdParamName, imagePresentParamName, staffIdParamName, staffNameParamName, timelineParamName, groupsParamName, officeOptionsParamName, staffOptionsParamName, dateOfBirthParamName, genderParamName, clientTypeParamName, clientClassificationParamName, legalFormParamName, - clientNonPersonDetailsParamName)); + clientNonPersonDetailsParamName, isStaffParamName)); public static final Set<String> ACTIVATION_REQUEST_DATA_PARAMETERS = new HashSet<>( Arrays.asList(localeParamName, dateFormatParamName, activationDateParamName)); http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/5a258bde/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java index 913ac17..5d7e500 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java @@ -62,6 +62,7 @@ final public class ClientData implements Comparable<ClientData> { private final CodeValueData gender; private final CodeValueData clientType; private final CodeValueData clientClassification; + private final Boolean isStaff; private final Long officeId; private final String officeName; @@ -138,13 +139,14 @@ final public class ClientData implements Comparable<ClientData> { final CodeValueData clientType = null; final CodeValueData clientClassification = null; final EnumOptionData legalForm = null; + final Boolean isStaff = false; final ClientNonPersonData clientNonPersonDetails = null; return new ClientData(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname, middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, joinedDate, imageId, staffId, staffName, officeOptions, groups, staffOptions, narrations, genderOptions, timeline, savingProductOptions, savingsProductId, savingsProductName, savingsAccountId, savingAccountOptions, clientType, clientClassification, clientTypeOptions, clientClassificationOptions, clientNonPersonConstitutionOptions, clientNonPersonMainBusinessLineOptions, - clientNonPersonDetails, clientLegalFormOptions, legalForm,address, isAddressEnabled, datatables); + clientNonPersonDetails, clientLegalFormOptions, legalForm,address, isAddressEnabled, datatables, isStaff); } @@ -159,7 +161,7 @@ final public class ClientData implements Comparable<ClientData> { clientData.savingsProductName, clientData.savingsAccountId, clientData.savingAccountOptions, clientData.clientType, clientData.clientClassification, templateData.clientTypeOptions, templateData.clientClassificationOptions, templateData.clientNonPersonConstitutionOptions, templateData.clientNonPersonMainBusinessLineOptions, clientData.clientNonPersonDetails, - templateData.clientLegalFormOptions, clientData.legalForm, clientData.address,clientData.isAddressEnabled, null); + templateData.clientLegalFormOptions, clientData.legalForm, clientData.address,clientData.isAddressEnabled, null, clientData.isStaff); } @@ -175,7 +177,7 @@ final public class ClientData implements Comparable<ClientData> { clientData.savingsProductName, clientData.savingsAccountId, savingAccountOptions, clientData.clientType, clientData.clientClassification, clientData.clientTypeOptions, clientData.clientClassificationOptions, clientData.clientNonPersonConstitutionOptions, clientData.clientNonPersonMainBusinessLineOptions, clientData.clientNonPersonDetails, - clientData.clientLegalFormOptions, clientData.legalForm,clientData.address, clientData.isAddressEnabled, null); + clientData.clientLegalFormOptions, clientData.legalForm,clientData.address, clientData.isAddressEnabled, null, clientData.isStaff); } @@ -189,7 +191,7 @@ final public class ClientData implements Comparable<ClientData> { clientData.savingAccountOptions, clientData.clientType, clientData.clientClassification, clientData.clientTypeOptions, clientData.clientClassificationOptions, clientData.clientNonPersonConstitutionOptions, clientData.clientNonPersonMainBusinessLineOptions, clientData.clientNonPersonDetails, clientData.clientLegalFormOptions, clientData.legalForm,clientData.address, - clientData.isAddressEnabled, null); + clientData.isAddressEnabled, null, clientData.isStaff); } @@ -227,13 +229,14 @@ final public class ClientData implements Comparable<ClientData> { final EnumOptionData status = null; final CodeValueData subStatus = null; final EnumOptionData legalForm = null; + final Boolean isStaff = false; final ClientNonPersonData clientNonPerson = null; return new ClientData(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname, middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId, staffId, staffName, allowedOffices, groups, staffOptions, closureReasons, genderOptions, timeline, savingProductOptions, savingsProductId, savingsProductName, savingsAccountId, savingAccountOptions, clientType, clientClassification, clientTypeOptions, clientClassificationOptions, clientNonPersonConstitutionOptions, clientNonPersonMainBusinessLineOptions, - clientNonPerson, clientLegalFormOptions, legalForm,null,null, null); + clientNonPerson, clientLegalFormOptions, legalForm,null,null, null, isStaff); } public static ClientData lookup(final Long id, final String displayName, final Long officeId, final String officeName) { @@ -273,13 +276,14 @@ final public class ClientData implements Comparable<ClientData> { final Collection<CodeValueData> clientNonPersonMainBusinessLineOptions = null; final List<EnumOptionData> clientLegalFormOptions = null; final EnumOptionData legalForm = null; + final Boolean isStaff = false; final ClientNonPersonData clientNonPerson = null; return new ClientData(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname, middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId, staffId, staffName, allowedOffices, groups, staffOptions, closureReasons, genderOptions, timeline, savingProductOptions, savingsProductId, savingsProductName, savingsAccountId, savingAccountOptions, clientType, clientClassification, clientTypeOptions, clientClassificationOptions, clientNonPersonConstitutionOptions, clientNonPersonMainBusinessLineOptions, - clientNonPerson, clientLegalFormOptions, legalForm,null,null, null); + clientNonPerson, clientLegalFormOptions, legalForm,null,null, null, isStaff); } @@ -289,7 +293,7 @@ final public class ClientData implements Comparable<ClientData> { final String externalId, final String mobileNo, final LocalDate dateOfBirth, final CodeValueData gender, final LocalDate activationDate, final Long imageId, final Long staffId, final String staffName, final ClientTimelineData timeline, final Long savingsProductId, final String savingsProductName, final Long savingsAccountId, - final CodeValueData clientType, final CodeValueData clientClassification, final EnumOptionData legalForm, final ClientNonPersonData clientNonPerson) { + final CodeValueData clientType, final CodeValueData clientClassification, final EnumOptionData legalForm, final ClientNonPersonData clientNonPerson, final Boolean isStaff) { final Collection<OfficeData> allowedOffices = null; final Collection<GroupGeneralData> groups = null; @@ -307,7 +311,7 @@ final public class ClientData implements Comparable<ClientData> { staffName, allowedOffices, groups, staffOptions, closureReasons, genderOptions, timeline, savingProductOptions, savingsProductId, savingsProductName, savingsAccountId, null, clientType, clientClassification, clientTypeOptions, clientClassificationOptions, clientNonPersonConstitutionOptions, clientNonPersonMainBusinessLineOptions, clientNonPerson, - clientLegalFormOptions, legalForm,null,null, null); + clientLegalFormOptions, legalForm,null,null, null, isStaff); } @@ -325,7 +329,7 @@ final public class ClientData implements Comparable<ClientData> { final Collection<CodeValueData> clientClassificationOptions, final Collection<CodeValueData> clientNonPersonConstitutionOptions, final Collection<CodeValueData> clientNonPersonMainBusinessLineOptions, final ClientNonPersonData clientNonPerson, final List<EnumOptionData> clientLegalFormOptions, final EnumOptionData legalForm, final AddressData address, - final Boolean isAddressEnabled, final List<DatatableData> datatables) { + final Boolean isAddressEnabled, final List<DatatableData> datatables, final Boolean isStaff) { this.accountNo = accountNo; this.status = status; if (status != null) { @@ -383,6 +387,7 @@ final public class ClientData implements Comparable<ClientData> { this.savingsAccountId = savingsAccountId; this.savingAccountOptions = savingAccountOptions; this.legalForm = legalForm; + this.isStaff = isStaff; this.clientNonPersonDetails = clientNonPerson; this.address = address; http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/5a258bde/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java index 4c2f538..585c222 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java @@ -211,6 +211,11 @@ public final class ClientDataValidator { baseDataValidator.reset().parameter(ClientApiConstants.datatables).value(datatables).notNull().jsonArrayNotEmpty(); } + if (this.fromApiJsonHelper.parameterExists("isStaff", element)) { + final Boolean isStaffFlag = this.fromApiJsonHelper.extractBooleanNamed("isStaff", element); + baseDataValidator.reset().parameter("isStaff").value(isStaffFlag).notNull(); + } + List<ApiParameterError> dataValidationErrorsForClientNonPerson = getDataValidationErrorsForCreateOnClientNonPerson(element.getAsJsonObject().get(ClientApiConstants.clientNonPersonDetailsParamName)); dataValidationErrors.addAll(dataValidationErrorsForClientNonPerson); @@ -478,6 +483,11 @@ public final class ClientDataValidator { baseDataValidator.reset().parameter(ClientApiConstants.legalFormIdParamName).value(legalFormId).ignoreIfNull().inMinMaxRange(1, 2); } + if (this.fromApiJsonHelper.parameterExists("isStaff", element)) { + final Boolean isStaffFlag = this.fromApiJsonHelper.extractBooleanNamed("isStaff", element); + baseDataValidator.reset().parameter("isStaff").value(isStaffFlag).notNull(); + } + Map<String, Object> parameterUpdateStatusDetails = getParameterUpdateStatusAndDataValidationErrorsForUpdateOnClientNonPerson(element.getAsJsonObject().get(ClientApiConstants.clientNonPersonDetailsParamName)); boolean atLeastOneParameterPassedForClientNonPersonUpdate = (boolean) parameterUpdateStatusDetails.get("parameterUpdateStatus"); http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/5a258bde/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java index 5e82970..ce0e0f9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java @@ -115,6 +115,9 @@ public final class Client extends AbstractPersistableCustom<Long> { @Column(name = "mobile_no", length = 50, nullable = false, unique = true) private String mobileNo; + @Column(name = "is_staff", nullable = false) + private boolean isStaff; + @Column(name = "external_id", length = 100, nullable = true, unique = true) private String externalId; @@ -238,6 +241,8 @@ public final class Client extends AbstractPersistableCustom<Long> { final String middlename = command.stringValueOfParameterNamed(ClientApiConstants.middlenameParamName); final String lastname = command.stringValueOfParameterNamed(ClientApiConstants.lastnameParamName); final String fullname = command.stringValueOfParameterNamed(ClientApiConstants.fullnameParamName); + + final boolean isStaff = command.booleanPrimitiveValueOfParameterNamed(ClientApiConstants.isStaffParamName); final LocalDate dataOfBirth = command.localDateValueOfParameterNamed(ClientApiConstants.dateOfBirthParamName); @@ -265,7 +270,7 @@ public final class Client extends AbstractPersistableCustom<Long> { final Long savingsAccountId = null; return new Client(currentUser, status, clientOffice, clientParentGroup, accountNo, firstname, middlename, lastname, fullname, activationDate, officeJoiningDate, externalId, mobileNo, staff, submittedOnDate, savingsProductId, savingsAccountId, dataOfBirth, - gender, clientType, clientClassification, legalForm); + gender, clientType, clientClassification, legalForm, isStaff); } protected Client() { @@ -276,7 +281,7 @@ public final class Client extends AbstractPersistableCustom<Long> { final String accountNo, final String firstname, final String middlename, final String lastname, final String fullname, final LocalDate activationDate, final LocalDate officeJoiningDate, final String externalId, final String mobileNo, final Staff staff, final LocalDate submittedOnDate, final Long savingsProductId, final Long savingsAccountId, - final LocalDate dateOfBirth, final CodeValue gender, final CodeValue clientType, final CodeValue clientClassification, final Integer legalForm) { + final LocalDate dateOfBirth, final CodeValue gender, final CodeValue clientType, final CodeValue clientClassification, final Integer legalForm, final Boolean isStaff) { if (StringUtils.isBlank(accountNo)) { this.accountNumber = new RandomPasswordGenerator(19).generate(); @@ -763,6 +768,18 @@ public final class Client extends AbstractPersistableCustom<Long> { this.mobileNo = mobileNo; } + public boolean isNotStaff() { + return !isStaff(); + } + + public boolean isStaff() { + return this.isStaff; + } + + public String getExternalId() { + return this.externalId; + } + public String getDisplayName() { return this.displayName; } http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/5a258bde/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java index cab88f7..c521729 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java @@ -351,6 +351,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService sqlBuilder.append("c.firstname as firstname, c.middlename as middlename, c.lastname as lastname, "); sqlBuilder.append("c.fullname as fullname, c.display_name as displayName, "); sqlBuilder.append("c.mobile_no as mobileNo, "); + sqlBuilder.append("c.is_staff as isStaff, "); sqlBuilder.append("c.date_of_birth as dateOfBirth, "); sqlBuilder.append("c.gender_cv_id as genderId, "); sqlBuilder.append("cv.code_value as genderValue, "); @@ -439,6 +440,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService final String displayName = rs.getString("displayName"); final String externalId = rs.getString("externalId"); final String mobileNo = rs.getString("mobileNo"); + final boolean isStaff = rs.getBoolean("isStaff"); final LocalDate dateOfBirth = JdbcSupport.getLocalDate(rs, "dateOfBirth"); final Long genderId = JdbcSupport.getLong(rs, "genderId"); final String genderValue = rs.getString("genderValue"); @@ -500,7 +502,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService return ClientData.instance(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname, middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId, staffId, staffName, timeline, savingsProductId, savingsProductName, savingsAccountId, clienttype, - classification, legalForm, clientNonPerson); + classification, legalForm, clientNonPerson, isStaff); } } @@ -533,6 +535,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService builder.append("c.firstname as firstname, c.middlename as middlename, c.lastname as lastname, "); builder.append("c.fullname as fullname, c.display_name as displayName, "); builder.append("c.mobile_no as mobileNo, "); + builder.append("c.is_staff as isStaff, "); builder.append("c.date_of_birth as dateOfBirth, "); builder.append("c.gender_cv_id as genderId, "); builder.append("cv.code_value as genderValue, "); @@ -620,6 +623,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService final String displayName = rs.getString("displayName"); final String externalId = rs.getString("externalId"); final String mobileNo = rs.getString("mobileNo"); + final boolean isStaff = rs.getBoolean("isStaff"); final LocalDate dateOfBirth = JdbcSupport.getLocalDate(rs, "dateOfBirth"); final Long genderId = JdbcSupport.getLong(rs, "genderId"); final String genderValue = rs.getString("genderValue"); @@ -680,7 +684,7 @@ public class ClientReadPlatformServiceImpl implements ClientReadPlatformService return ClientData.instance(accountNo, status, subStatus, officeId, officeName, transferToOfficeId, transferToOfficeName, id, firstname, middlename, lastname, fullname, displayName, externalId, mobileNo, dateOfBirth, gender, activationDate, imageId, staffId, staffName, timeline, savingsProductId, savingsProductName, savingsAccountId, clienttype, - classification, legalForm, clientNonPerson); + classification, legalForm, clientNonPerson, isStaff); } } http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/5a258bde/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java index 4941e3e..cd334fa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java @@ -229,6 +229,8 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP .retrieveGlobalConfiguration("Enable-Address"); final Boolean isAddressEnabled = configuration.isEnabled(); + + final Boolean isStaff = command.booleanObjectValueOfParameterNamed(ClientApiConstants.isStaffParamName); final Long officeId = command.longValueOfParameterNamed(ClientApiConstants.officeIdParamName); @@ -298,7 +300,7 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP final CommandWrapper commandWrapper = new CommandWrapperBuilder().activateClient(null).build(); rollbackTransaction = this.commandProcessingService.validateCommand(commandWrapper, currentUser); } - + this.clientRepository.save(newClient); if (newClient.isActive()) { this.businessEventNotifierService.notifyBusinessEventWasExecuted(BUSINESS_EVENTS.CLIENTS_ACTIVATE, @@ -334,7 +336,6 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP this.entityDatatableChecksWritePlatformService.runTheCheck(newClient.getId(), EntityTables.CLIENT.getName(), StatusEnum.CREATE.getCode().longValue(), EntityTables.CLIENT.getForeignKeyColumnNameOnDatatable()); - return new CommandProcessingResultBuilder() // .withCommandId(command.commandId()) // .withOfficeId(clientOffice.getId()) // http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/5a258bde/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql b/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql new file mode 100644 index 0000000..ef9854b --- /dev/null +++ b/fineract-provider/src/main/resources/sql/migrations/core_db/V325__add_is_staff_client_data.sql @@ -0,0 +1,20 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. +-- +ALTER TABLE `m_client` + ADD COLUMN `is_staff` TINYINT(1) NOT NULL DEFAULT '0' AFTER `mobile_no`;