|
|
@@ -3,8 +3,10 @@ package com.x1ongzhu.wisFactory.repo;
|
|
|
import com.x1ongzhu.wisFactory.domain.StaffAccess;
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
|
+import org.springframework.data.jpa.repository.Modifying;
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
|
|
|
+import javax.transaction.Transactional;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -27,6 +29,8 @@ public interface StaffAccessRepo extends JpaRepository<StaffAccess, Long>, JpaSp
|
|
|
"where staff_access.name is null " +
|
|
|
" and pass = true " +
|
|
|
" and staff_access.card_no is not null ")
|
|
|
+ @Modifying
|
|
|
+ @Transactional
|
|
|
void setInfo();
|
|
|
|
|
|
@Query(nativeQuery = true, value = "update staff_access " +
|
|
|
@@ -36,5 +40,7 @@ public interface StaffAccessRepo extends JpaRepository<StaffAccess, Long>, JpaSp
|
|
|
"where staff_access.name is null " +
|
|
|
" and staff_access.employ_no is not null " +
|
|
|
" and pass = true")
|
|
|
+ @Modifying
|
|
|
+ @Transactional
|
|
|
void setInfo1();
|
|
|
}
|