package com.huimv.manage.eartag.dao.repo;

import com.huimv.manage.eartag.dao.entity.SysBusiConfigParamEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface SysBusiConfigParamRepo extends JpaRepository<SysBusiConfigParamEntity, Integer>, JpaSpecificationExecutor<SysBusiConfigParamEntity> {

    @Query(nativeQuery = true,value = "SELECT count(*) AS total FROM sys_busi_config_param WHERE param_id=:paramId AND id !=:id")
    List<Object[]> getRepeatTotal(String paramId, Integer id);
}