diff --git a/src/main/java/org/isf/menu/model/User.java b/src/main/java/org/isf/menu/model/User.java index 0d6aad4ba..7806c3d2c 100644 --- a/src/main/java/org/isf/menu/model/User.java +++ b/src/main/java/org/isf/menu/model/User.java @@ -153,12 +153,15 @@ public LocalDateTime getLastLogin() { public void setLastLogin(LocalDateTime lastLogin) { this.lastLogin = lastLogin; } + public boolean isDeleted() { return deleted; } + public void setDeleted(boolean deleted) { this.deleted = deleted; } + @Override public String toString() { return getUserName(); diff --git a/src/main/java/org/isf/menu/model/UserGroup.java b/src/main/java/org/isf/menu/model/UserGroup.java index 7b35ddcb7..2e9f937f1 100644 --- a/src/main/java/org/isf/menu/model/UserGroup.java +++ b/src/main/java/org/isf/menu/model/UserGroup.java @@ -68,12 +68,15 @@ public String getCode() { public void setCode(String code) { this.code = code; } + public boolean isDeleted() { return deleted; } + public void setDeleted(boolean deleted) { this.deleted = deleted; } + public String getDesc() { return desc; } diff --git a/src/main/java/org/isf/menu/service/UserIoOperationRepository.java b/src/main/java/org/isf/menu/service/UserIoOperationRepository.java index 76616304e..045ff54a9 100644 --- a/src/main/java/org/isf/menu/service/UserIoOperationRepository.java +++ b/src/main/java/org/isf/menu/service/UserIoOperationRepository.java @@ -76,13 +76,13 @@ int updateUser(@Param("description") String description, @Param("groupName") Use @Query(value = "update User set lastLogin=:lastLoggedIn where userName=:id") void setLastLogin(@Param("lastLoggedIn") LocalDateTime lockTime, @Param("id") String id); - @Query("select count(u) from User u where active=1 and deleted!=true") + @Query("select count(u) from User u where active=1 and deleted=false") long countAllActiveUsers(); @Query("select count(u) from User u where active=1 and deleted=:deleted") long countAllActiveUsersByDeleted(@Param("deleted") boolean deleted); - @Query("select count(g) from UserGroup g where active=1 and deleted!=true") + @Query("select count(g) from UserGroup g where active=1 and deleted=false") long countAllActiveGroups(); @Query("select count(g) from UserGroup g where active=1 and deleted=:deleted")