| | |
| | | import com.fzzy.api.entity.ApiInfoData; |
| | | 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.List; |
| | | |
| | | public interface ApiInfoDataRep extends JpaRepository<ApiInfoData, String>, JpaSpecificationExecutor<ApiInfoData> { |
| | |
| | | |
| | | /** |
| | | * 根据数据内容ID查询数据 |
| | | * |
| | | * @param dataId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据接口编码查询数据 |
| | | * |
| | | * @param inteId |
| | | * @return |
| | | */ |
| | | @Query("from ApiInfoData where inteId=:inteId ") |
| | | List<ApiInfoData> getDataByInteId(@Param("inteId") String inteId); |
| | | |
| | | /** |
| | | * 根据表单主键更新操作标志状态 |
| | | * |
| | | * @param id 主键ID |
| | | * @param czbz 操作标志 |
| | | * @return |
| | | */ |
| | | @Transactional |
| | | @Modifying |
| | | @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); |
| | | |
| | | } |