zhangf
2024-07-26 698995469a3fcdc3164fc486d18bdbe059b6c92e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.gkhy.fourierSpecialGasMonitor.repository;
 
import com.gkhy.fourierSpecialGasMonitor.entity.DeviceExceptionLog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
 
/**
 * @author Mr.huang
 * @decription
 * @date 2023/8/8 15:11
 */
@Repository
public interface DeviceExceptionLogRepository extends JpaRepository<DeviceExceptionLog,Long>, JpaSpecificationExecutor<DeviceExceptionLog> {
 
    @Query(value="SELECT * FROM device_exception_log a ORDER BY a.time DESC LIMIT 1",nativeQuery= true)
    DeviceExceptionLog getLastLog();
}