package com.zjty.autotest.dao;

import com.zjty.autotest.pojo.sjq.TestReport;
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;

/**
 * 数据访问接口
 * @author Administrator
 *
 */
public interface TestReportDao extends JpaRepository<TestReport,String>, JpaSpecificationExecutor<TestReport> {
    @Query(value = "SELECT input_report FROM test_report WHERE result_id = :resultId",nativeQuery = true)
	String findByInResultId(String resultId);

    @Query(value = "select out_report from test_report where result_id =:resultId",nativeQuery = true)
    String findByOutResultId(String resultId);
    @Query(value = "select * from test_report where result_id=:resultId",nativeQuery = true)
    TestReport findByResultId(String resultId);
    @Modifying
    int deleteByResultId(String resultId);
}
