|  |  |  | 
|---|
|  |  |  | import org.springframework.data.repository.query.Param; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface ApiInfoDataRep extends JpaRepository<ApiInfoData, String>, JpaSpecificationExecutor<ApiInfoData> { | 
|---|
|  |  |  | 
|---|
|  |  |  | List<ApiInfoData> getDataByInteId(@Param("inteId") String inteId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据接口编码查询数据 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param inteId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Query("from ApiInfoData where inteId=:inteId and updateTime >=:start and updateTime <:end order by updateTime") | 
|---|
|  |  |  | List<ApiInfoData> getDataByInteId(@Param("inteId") String inteId, @Param("start") Date start, @Param("end") Date end); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据表单主键更新操作标志状态 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param id   主键ID | 
|---|
|  |  |  | 
|---|
|  |  |  | @Query(value = "update ApiInfoData set czbz=:czbz ,data=:data where id=:id ") | 
|---|
|  |  |  | int updateStatus(@Param("id") String id, @Param("data") String data, @Param("czbz") String czbz); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据库区代码、接口编码、数据id查询 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param inteId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Query("from ApiInfoData where inteId=:inteId and dataId=:dataId and kqdm=:kqdm") | 
|---|
|  |  |  | List<ApiInfoData> getDataByInteAndData(@Param("inteId") String inteId, @Param("dataId") String dataId, @Param("kqdm") String kqdm); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|