From ad490270d3becf4677e1925ce188e8dcdeb5b223 Mon Sep 17 00:00:00 2001
From: weicd <weicd@yhzhg.cn>
Date: Tue, 31 Oct 2023 06:55:31 +0000
Subject: [PATCH] 修改
---
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/UserRepository.java | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/UserRepository.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/UserRepository.java
index 85d2d16..02177bb 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/UserRepository.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/UserRepository.java
@@ -129,10 +129,41 @@
int countByRoles(Set<Long> ids);
/**
+ * 根据状态查询
+ * @param enabled
+ * @return
+ */
+ List<User> findAllByEnabled(Boolean enabled);
+
+ /**
* 根据排班查询
* @param ids /
* @return /
*/
@Query(value = "SELECT count(1) FROM sys_user WHERE rostering_id IN ?1", nativeQuery = true)
int countByRosterings(Long[] ids);
+
+ /**
+ * 根据级别查询
+ * @param ids /
+ * @return /
+ */
+ @Query(value = "SELECT count(1) FROM sys_user WHERE level_id IN ?1", nativeQuery = true)
+ int countByLevels(Long[] ids);
+
+ /**
+ * 查询部门
+ * @param
+ * @return
+ */
+ @Query(value = "SELECT u.* FROM sys_user u JOIN sys_dept d ON u.dept_id = d.dept_id WHERE d.dept_id = ?;", nativeQuery = true)
+ List<User> findByDeptId(Long dept_id);
+
+ /**
+ * 查询用户
+ * @param
+ * @return
+ */
+ @Query(value = "SELECT * FROM sys_user WHERE user_id = ?;", nativeQuery = true)
+ List<User> findByUserId(Long user_id);
}
--
Gitblit v1.9.3