소스 검색

traffic refresh

shjung 3 년 전
부모
커밋
e435c02f23

+ 1 - 1
src/main/java/com/its/op/dao/repository/its/ifsc/TbIfscTrafSimpleRepository.java

@@ -12,6 +12,6 @@ import java.util.List;
 @Repository
 public interface TbIfscTrafSimpleRepository extends JpaRepository<TbIfscTrafSimple, Long>, JpaSpecificationExecutor<TbIfscTraf> {
 
-    @Query("select p from TbIfscTrafSimple p")
+    @Query("select p from TbIfscTrafSimple p where p.prcnDt >= to_char(sysdate - 10/1440, 'YYYYMMDDHH24MISS')")
     List<TbIfscTrafSimple> findAll();
 }

+ 1 - 1
src/main/java/com/its/op/dao/repository/its/link/TbLinkTrafSimpleRepository.java

@@ -12,6 +12,6 @@ import java.util.List;
 @Repository
 public interface TbLinkTrafSimpleRepository extends JpaRepository<TbLinkTrafSimple, Long>, JpaSpecificationExecutor<TbLinkTraf> {
 
-    @Query("select p from TbLinkTrafSimple p")
+    @Query("select p from TbLinkTrafSimple p where p.prcnDt >= to_char(sysdate - 10/1440, 'YYYYMMDDHH24MISS')")
     List<TbLinkTrafSimple> findAll();
 }

+ 1 - 1
src/main/java/com/its/op/dao/repository/its/road/TbRoadTrafSimpleRepository.java

@@ -12,6 +12,6 @@ import java.util.List;
 @Repository
 public interface TbRoadTrafSimpleRepository extends JpaRepository<TbRoadTrafSimple, Long>, JpaSpecificationExecutor<TbRoadTraf> {
 
-    @Query("select p from TbRoadTrafSimple p")
+    @Query("select p from TbRoadTrafSimple p where p.prcnDt >= to_char(sysdate - 10/1440, 'YYYYMMDDHH24MISS')")
     List<TbRoadTrafSimple> findAll();
 }

+ 1 - 0
src/main/java/com/its/op/service/its/common/CommonService.java

@@ -47,6 +47,7 @@ public class CommonService {
             dto = this.linkService.findById(linkId);
         }
         catch (NoSuchElementException e) {
+            log.error("findAllDetailTrafficLink: Not Fond, {}", linkId);
             throw e;
         }
         DetlTrafLinkDto result = DetlTrafLinkDto.builder()

+ 3 - 3
src/main/resources/mybatis/mapper/its/common/CommonMapper.xml

@@ -84,7 +84,7 @@
                     FROM TB_CMMN_CD
                     WHERE CMMN_CLSF_CD = 'LTC') C
               WHERE LINK_ID = TO_NUMBER(#{ID})
-                AND PRCN_DT >= TO_CHAR(SYSDATE - 7 / 1440, 'YYYYMMDDHH24MISS')
+                AND PRCN_DT >= TO_CHAR(SYSDATE - 10 / 1440, 'YYYYMMDDHH24MISS')
                 AND A.PRCN_SORC = B.CMMN_CD(+)
                 AND A.ADJS_SORC = D.CMMN_CD(+)
                 AND A.CMTR_GRAD_CD = C.CMMN_CD(+))
@@ -107,7 +107,7 @@
                     FROM TB_CMMN_CD
                     WHERE CMMN_CLSF_CD = 'LTC') C
               WHERE IFSC_ID = TO_NUMBER(#{ID})
-                AND PRCN_DT >= TO_CHAR(SYSDATE - 7 / 1440, 'YYYYMMDDHH24MISS')
+                AND PRCN_DT >= TO_CHAR(SYSDATE - 10 / 1440, 'YYYYMMDDHH24MISS')
                 AND A.CMTR_GRAD_CD = C.CMMN_CD(+))
         ]]>
     </select>
@@ -128,7 +128,7 @@
                     FROM TB_CMMN_CD
                     WHERE CMMN_CLSF_CD = 'LTC') C
               WHERE ROAD_ID = TO_NUMBER(#{ID})
-                AND PRCN_DT > TO_CHAR(SYSDATE - 7 / 1440, 'YYYYMMDDHH24MISS')
+                AND PRCN_DT > TO_CHAR(SYSDATE - 10 / 1440, 'YYYYMMDDHH24MISS')
                 AND A.CMTR_GRAD_CD = C.CMMN_CD(+))
         ]]>
     </select>