Skip to content

Commit

Permalink
Updated user detail History and zone user history repositories
Browse files Browse the repository at this point in the history
Signed-off-by: Balaji <[email protected]>
  • Loading branch information
balaji-alluru committed Jan 16, 2024
1 parent fdf0bcc commit 9434d0b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public interface UserDetailsHistoryRepository extends BaseRepository<UserDetails
*/
// select a.id,a.langCode,a.name,a.uin,a.email,a.mobile,a.statusCode
// SELECT m.id,m.langCode,m.name,m.uin,m.email,m.mobile,m.statusCode,m.effDTimes
@Query(value = "select * from (SELECT * FROM master.user_detail_h m WHERE id = ?1 AND eff_dtimes<= ?2 and (is_deleted is null or is_deleted =false) ORDER BY eff_dtimes DESC) a LIMIT 1", nativeQuery = true)
@Query(value = "select * from (SELECT * FROM master.user_detail_h m WHERE LOWER(id) = LOWER(?1) AND eff_dtimes<= ?2 and (is_deleted is null or is_deleted =false) ORDER BY eff_dtimes DESC) a LIMIT 1", nativeQuery = true)
List<UserDetailsHistory> getByUserIdAndTimestamp(String userId, LocalDateTime effDTimes);
// (?2 BETWEEN effDTimes AND CURRENT_TIMESTAMP)

@Query(value = "Select * from master.user_detail_h m where m.regcntr_id = ?1 and m.id = ?2 and m.eff_dtimes <= ?3 and ( m.is_deleted = false or m.is_deleted is null) order by m.eff_dtimes desc ", nativeQuery = true)
@Query(value = "Select * from master.user_detail_h m where m.regcntr_id = ?1 and LOWER(m.id) = LOWER(?2) and m.eff_dtimes <= ?3 and ( m.is_deleted = false or m.is_deleted is null) order by m.eff_dtimes desc ", nativeQuery = true)
List<UserDetailsHistory> findByCntrIdAndUsrIdAndEffectivetimesLessThanEqualAndIsDeletedFalseOrIsDeletedIsNull(
String registrationCenterId, String userId, LocalDateTime lDateAndTime);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import io.mosip.kernel.masterdata.entity.id.ZoneUserHistoryId;
@Repository
public interface ZoneUserHistoryRepository extends BaseRepository<ZoneUserHistory, ZoneUserHistoryId>{
@Query(value = "SELECT * FROM master.zone_user_h m WHERE usr_id = ?1 AND eff_dtimes>= ?2 ORDER BY eff_dtimes DESC ", nativeQuery = true)
@Query(value = "SELECT * FROM master.zone_user_h m WHERE LOWER(usr_id) = LOWER(?1) AND eff_dtimes>= ?2 ORDER BY eff_dtimes DESC ", nativeQuery = true)
List<ZoneUserHistory> getByUserIdAndTimestamp(String userId, LocalDateTime localDateTime);

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,41 @@ hibernate.cache.use_second_level_cache=false
hibernate.cache.use_query_cache=false
hibernate.cache.use_structured_entries=false
hibernate.generate_statistics=false
mosip.right_to_left.orientation=ara

mosip.kernel.packet-status-update-url=https://api-internal.dev.mosip.net/registrationprocessor/v1/registrationstatus/search
mosip.kernel.packet-status-update-url=https://dev.mosip.net/registrationprocessor/v1/registrationstatus/search

mosip.kernel.registrationcenterid.length=5
mosip.kernel.machineid.length=5

masterdata_database_url=jdbc:postgresql://api-internal.dev.mosip.net/mosip_master
masterdata_database_username=postgres
masterdata_database_password=mQi298ZW7p
auth.server.admin.issuer.uri=https://iam.dev.mosip.net/auth/realms/
masterdata_database_url=jdbc:postgresql://dev.mosip.net:30090/mosip_master
masterdata_database_username=masteruser
masterdata_database_password=mosip123
auth.server.admin.issuer.uri=https://dev.mosip.net/keycloak/auth/realms/
mosip.primary-language=eng
mosip.secondary-language=
mosip.all-languages=all
auth.server.admin.allowed.audience=mosip-regproc-client,mosip-prereg-client,mosip-admin-client,mosip-partner-client,mosip-crereq-client,mosip-creser-client,mosip-datsha-client,mosip-ida-client,mosip-resident-client,mosip-reg-client

mosip.kernel.auth.appids.realm.map={prereg:'preregistration',ida:'mosip',registrationclient:'mosip',regproc:'mosip',partner:'mosip',resident:'mosip',admin:'mosip',crereq:'mosip',creser:'mosip',datsha:'mosip'}

#auth.server.validate.url=https://api-internal.dev.mosip.net/v1/authmanager/authorize/validateToken
#auth.server.validate.url=https://dev.mosip.net/v1/authmanager/authorize/validateToken
mosip.kernel.filtervalue.max_columns=200
mosip.admin.ui.configs=primaryLangCode:${mosip.primary-language};secondaryLangCode:${mosip.secondary-language};version:${aplication.configuration.level.version};filterValueMaxCount:{"default":${mosip.kernel.filtervalue.max_columns},"registrationcenters":50,"locations":100}
mosip.recommended.centers.locCode =5
auth.server.admin.offline.token.validate=false
aplication.configuration.level.version=1.1.5
mosip.optional-languages=
mosip.mandatory-languages=eng
auth.server.validate.url=https://api-internal.dev.mosip.net/v1/authmanager/authorize/admin/validateToken
auth.server.admin.validate.url=https://api-internal.dev.mosip.net/v1/authmanager/authorize/admin/validateToken
auth.server.validate.url=https://dev.mosip.net/v1/authmanager/authorize/admin/validateToken
auth.server.admin.validate.url=https://dev.mosip.net/v1/authmanager/authorize/admin/validateToken

master.search.maximum.rows=50

mosip.kernel.masterdata.audit-url=https://api-internal.dev.mosip.net/v1/auditmanager/audits
mosip.kernel.masterdata.audit-url=https://dev.mosip.net/v1/auditmanager/audits

mosip.level=2
mosip.iam.adapter.clientid=mosip-admin-client
mosip.iam.adapter.clientsecret=xzzvvPISDPwR2yl7
mosip.iam.adapter.clientsecret=xyz123
mosip.iam.adapter.appid=admin
mosip.kernel.sign-url=https://qa.mosip.io/v1/signature/sign

Expand All @@ -57,12 +56,12 @@ mosip.kernel.applicant.type.age.limit = 5
mosip.stage.environment=Staging
mosip.auth.adapter.impl.basepackage=io.mosip.kernel.auth.defaultadapter
mosip.kernel.applicantType.mvel.file=applicanttype.mvel
mosip.kernel.config.server.file.storage.uri=https://api-internal.dev.mosip.net/config/kernel-masterdata-service/mz/develop-v2/
mosip.kernel.config.server.file.storage.uri=https://dev.mosip.net/config/kernel-masterdata-service/mz/develop-v2/
mosip.kernel.masterdata.auth-manager-base-uri=http://localhost:8080/

mosip.kernel.masterdata.template_idauthentication_event=MASTERDATA_IDAUTHENTICATION_TEMPLATES
mosip.kernel.masterdata.title_event=MASTERDATA_TITLES
websub.publish.url=https://api-internal.dev.mosip.net/websub/publish
websub.publish.url=https://dev.mosip.net/websub/publish

mosip.kernel.masterdata.template_idauthentication_event_module_name=ID Authentication

Expand Down Expand Up @@ -396,7 +395,6 @@ mosip.role.admin.masterdata.getdocumenttypesmissingidslangcode=GLOBAL_ADMIN,ZONA
mosip.role.admin.masterdata.getdocumentcategoriesmissingidslangcode=GLOBAL_ADMIN,ZONAL_ADMIN
mosip.role.admin.masterdata.getdynamicfieldmissingidslangcode=GLOBAL_ADMIN,ZONAL_ADMIN

zone.user.details.url=https://api-internal.dev.mosip.net/v1/authmanager/userdetails
zone.user.details.url=https://dev.mosip.net/v1/authmanager/userdetails
mosip.kernel.masterdata.code.validate.regex=[^a-z0-9]
mosip.kernel.masterdata.name.validate.regex=[^A-Za-z]
mosip.kernel.config.server.file.storage.uri=http://localhost:51000/config/resident/mz/develop/
mosip.kernel.masterdata.name.validate.regex=[^A-Za-z]

0 comments on commit 9434d0b

Please sign in to comment.