|  |  |  | 
|---|
|  |  |  | package com.fzzy.api.view.repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.fzzy.api.entity.Api1212; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import org.springframework.data.jpa.repository.JpaRepository; | 
|---|
|  |  |  | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; | 
|---|
|  |  |  | import org.springframework.data.jpa.repository.Modifying; | 
|---|
|  |  |  | import org.springframework.data.jpa.repository.Query; | 
|---|
|  |  |  | import org.springframework.data.repository.query.Param; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface Api1212Rep extends JpaRepository<Api1212, String>, JpaSpecificationExecutor<Api1212> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface Api1212Rep extends JpaRepository<Api1212, Integer>, JpaSpecificationExecutor<Api1212> { | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | @Modifying | 
|---|
|  |  |  | @Query("update Api1212 set czbz =:czbz where id=:id") | 
|---|
|  |  |  | void updateStatus(@Param("id") Integer id, @Param("czbz") String czbz); | 
|---|
|  |  |  | void updateStatus(@Param("id") String id, @Param("czbz") String czbz); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Query("from Api1212 where kqdm=:kqdm and zhgxsj >=:start and zhgxsj <:end order by zhgxsj ") | 
|---|
|  |  |  | List<Api1212> findPushDataByTime(@Param("kqdm") String kqdm, @Param("start") Date start, @Param("end") Date end); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Query("from Api1212 where id=:id ") | 
|---|
|  |  |  | List<Api1212> getDataById(@Param("id") String id); | 
|---|
|  |  |  | } | 
|---|