huangzhen
2023-08-16 7b1878ed989949cb4a7aa16adab6fbe48b5325ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.gkhy.fourierSpecialGasMonitor.repository;
 
 
import com.gkhy.fourierSpecialGasMonitor.entity.GasCategory;
import com.gkhy.fourierSpecialGasMonitor.entity.GasConcentration;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
 
import javax.persistence.OrderBy;
 
@Repository
public interface GasConcentrationRepository extends JpaRepository<GasConcentration,Long>, JpaSpecificationExecutor<GasConcentration> {
 
    @OrderBy("dataReceivingTime desc")
    GasConcentration findTopByOrderByDataReceivingTimeDesc();
}