shjung vor 2 Jahren
Ursprung
Commit
7d8aa8392c

+ 3 - 1
src/main/java/com/its/op/dao/repository/its/rse/TbRseCtlrRepository.java

@@ -7,6 +7,7 @@ import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 
@@ -22,7 +23,8 @@ public interface TbRseCtlrRepository extends JpaRepository<TbRseCtlr, Long>, Jpa
     @Query(value = "SELECT NVL(MAX(RSE_CTLR_NMBR), 1000) + 1 AS NEWID FROM TB_RSE_CTLR", nativeQuery = true)
     Long getNewNmbr();
 
+    @Transactional
     @Modifying
     @Query("update TbRseCtlr m set m.clctAbnrBasi = :clctAbnrBasi")
-    void updateClctAbnrBasi(@Param("clctAbnrBasi") Integer clctAbnrBasi);
+    Integer updateClctAbnrBasi(@Param("clctAbnrBasi") Integer clctAbnrBasi);
 }

+ 1 - 2
src/main/java/com/its/op/service/its/rse/TbRseCtlrService.java

@@ -121,8 +121,7 @@ public class TbRseCtlrService {
 
     //@Transactional
     public Integer updateClctAbnrBasi(Integer clctAbnrBasi) {
-        this.repo.updateClctAbnrBasi(clctAbnrBasi);
-        return clctAbnrBasi;
+        return this.repo.updateClctAbnrBasi(clctAbnrBasi);
     }
 
     /**