package com.sunxung.factoring.mapper.project;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunxung.factoring.entity.project.ProjectCoreEnterprise;
import com.sunxung.factoring.entity.project.vo.SearchBusinessProcessingTask;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 项目核心企业 Mapper 接口
 * </p>
 *
 * @author liutao
 * @since 2023-11-25
 */
public interface ProjectCoreEnterpriseMapper extends BaseMapper<ProjectCoreEnterprise> {

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    ProjectCoreEnterprise findById(@Param("id") Long id);

    /**
     * 查询所有核心企业授信
     *
     * @param search
     * @return
     */
    List<ProjectCoreEnterprise> findBySearch(SearchBusinessProcessingTask search);

    /**
     * 根据项目id获取项目核心企业
     *
     * @param cProjectInformationId
     * @return
     */
    ProjectCoreEnterprise getByProjectInfoId(@Param("cProjectInformationId") Long cProjectInformationId);

    /**
     * 根据企业信息Id查询
     *
     * @param enterpriseId
     * @return
     */
    List<ProjectCoreEnterprise> getByEnterpriseId(@Param("enterpriseId") Long enterpriseId);
}
