package com.hr.repository.jpa;

import com.hr.param.IpInterfaceParam;
import com.hr.repository.domain.IpInterfacePO;
import com.hr.vo.IpInterfaceVO;
import com.yy.basedevelop.common.data.BasePageResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 接口表;(ip_interface)表数据库访问层
 * @author : Longhoo
 * @date : 2025-10-10
 */
public interface IpInterfaceRepository extends JpaRepository<IpInterfacePO,Long>, JpaSpecificationExecutor<IpInterfacePO> {

//    IpInterfacePO findById(Long id);

    IpInterfacePO findByInterfaceName(String interfaceName);
    IpInterfacePO findByInterfaceNo(String interfaceNo);

    BasePageResult<IpInterfaceVO> queryPage(@Param("interfaceName") String interfaceName, @Param("statusList") List<String> statusList);

    Integer countEnableInterfaceRef(@Param("iid") Long iid);

    Integer countEnableAccountRef(@Param("id") Long id);
}