From 85d7d8d3444dd931190603349cd4d961a9fd9114 Mon Sep 17 00:00:00 2001
From: YH-zlh <zhaolh@yhzhg.cn>
Date: Wed, 06 Sep 2023 03:21:48 +0000
Subject: [PATCH] 新工资管理

---
 eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/system/repository/UserRepository.java |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 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..c397b58 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
@@ -15,6 +15,7 @@
  */
 package me.zhengjie.modules.system.repository;
 
+import me.zhengjie.modules.system.domain.Dept;
 import me.zhengjie.modules.system.domain.User;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
@@ -129,10 +130,42 @@
     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);
+
+    /**
+     * 根据ID查询
+     * @param userIds
+     * @return
+     */
+	List<User> findByIdIn(List<Long> userIds);
+
+    /**
+     * 根据部门查询
+     * @param dept
+     * @return
+     */
+	List<User> findByDeptAndEnabled(Dept dept, Boolean enabled);
+
+	@Query(value = "SELECT * FROM sys_user WHERE dept_id IN ?1 AND enabled = ?2", nativeQuery = true)
+	List<User> findByDeptIdInAndEnabled(List<Long> deptIds, Boolean enabled);
 }

--
Gitblit v1.9.3