package cn.quant.baa.pay.jpa.repository;

import cn.quant.baa.pay.dict.StatusCode;
import cn.quant.baa.pay.jpa.entity.BatchCycleTriggerEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * Created by Administrator on 2021/8/22 0022.
 */
@Repository
public interface BatchCycleTriggerRepository extends JpaRepository<BatchCycleTriggerEntity, Long> {

    @Query("SELECT trigger FROM BatchCycleTriggerEntity trigger WHERE trigger.targetId=:targetId AND  trigger.entityCode=:entityCode")
    BatchCycleTriggerEntity findOne(@Param("targetId") Long targetId, @Param("entityCode") String entityCode);
}
