package com.ann.demo.repository;

import com.ann.demo.entity.filing.ArchiveDetail;
import com.ann.demo.entity.filing.ArchiveDetail20201218;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: LeiJiaXin
 * @Date: 2019/7/12 9:10
 */
@Repository
public interface ArchiveDetail20201218Repository extends JpaRepository<ArchiveDetail20201218, String> {

    @Query("select o.id from ArchiveDetail o where o.applyId = ?1 and o.masterID = ?2 and o.flag = 0")
    public String findIdByApplyIdAndMasterID(String applyId, String masterId);

    public List<ArchiveDetail20201218> getAllBySource(String source);
}

