From 8485affcb0d4de05059d80cb1e844d6b18291654 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 16 五月 2025 14:35:49 +0800
Subject: [PATCH] 修正

---
 src/main/java/com/gkhy/labRiskManage/domain/account/repository/jpa/UserRepository.java |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/gkhy/labRiskManage/domain/account/repository/jpa/UserRepository.java b/src/main/java/com/gkhy/labRiskManage/domain/account/repository/jpa/UserRepository.java
index e79f02c..73724f1 100644
--- a/src/main/java/com/gkhy/labRiskManage/domain/account/repository/jpa/UserRepository.java
+++ b/src/main/java/com/gkhy/labRiskManage/domain/account/repository/jpa/UserRepository.java
@@ -6,6 +6,7 @@
 import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
 import java.util.List;
@@ -19,8 +20,13 @@
     List<User> findAllByIdIn(List<Long> userIdList);
 
     @Modifying
-    @Query(value = "update User u set u.hash = :hash ,u.salt = :salt ,u.gmtModified = :time where u.id = :uid")
+    @Query(value = "update User u set u.hash = :hash ,u.salt = :salt ,u.gmtModified = :time   where u.id = :uid")
     Integer updatePassword(Long uid, String hash, String salt, LocalDateTime time);
+
+    @Transactional
+    @Modifying
+    @Query(value = "update User u set u.hash = :hash ,u.gmtModified = :time   where u.id = :uid")
+    Integer resetPassword(Long uid, String hash, LocalDateTime time);
 
     @Modifying
     @Query(value = "update User u set u.status = :status ,u.gmtModified = :time where u.id = :uid")
@@ -53,6 +59,11 @@
      */
     @Query(value = "select * from sys_user  where id = :evaluateUserId and status in (1,2)", nativeQuery = true)
     User getUserInfoByIdAndSellInfo(Long evaluateUserId);
+
+    @Query(value = "select u from User u where u.id in :uidList and u.status in (1,2)")
+    List<User> getUserInfoByIds(List<Long> uidList);
+
     @Query(value = "select u from User u where u.id = :uid and u.status in (1,2)")
     User getById(Long uid);
+
 }

--
Gitblit v1.9.2