package com.ruoyi.gysl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.gysl.entity.*;
import com.ruoyi.gysl.entity.request.BasicInformationPageReq;
import com.ruoyi.gysl.entity.response.BasicInformationResponse;
import com.ruoyi.gysl.entity.response.ProjectExcelInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 基本信息(BasicInformation)表数据库访问层
 *
 * @author makejava
 * @since 2025-02-24 09:25:51
 */
public interface BasicInformationMapper extends BaseMapper<BasicInformation> {

    /**
     * 导出项目数据
     */
    List<ProjectExcelInfo> selectProjectList();

    /**
     * 分页查询所有数据
     *
     * @param page             分页对象
     * @param req 查询实体
     * @return 所有数据
     */
    Page<BasicInformation> page(Page<BasicInformation> page, @Param("req") BasicInformationPageReq req);


    /**
     * 有经纬度的项目列表
     */
    Page<BasicInformation> projectList(Page<BasicInformation> page);


    /**
     * copy表的新增
     */
    int insert1( BasicInformation basicInformation);
    int insert2(PlanInformation planInformation);
    int insert3(WysmxInformation wysmxInformations);
    int insert4(QyrzInformation qyrzInformation);
    int insert5(ProjectOtherInfo projectOtherInfos);

    /**
     * copy表的删除
     */
    int delete1(@Param("id") Long id);
    int delete2(@Param("id") Long id);
    int delete3(@Param("id") Long id);
    int delete4(@Param("id") Long id);
    int delete5(@Param("id") Long id);

    /**
     * copy表查询
     */
    BasicInformation select1(@Param("id") Long id);
    PlanInformation select2(@Param("id") Long id);
    List<WysmxInformation>  select3(@Param("id") Long id);
    QyrzInformation select4(@Param("id") Long id);
    List<ProjectOtherInfo> select5(@Param("id") Long id);

    /**
     * 根据项目id集合查询项目
     */
    List<BasicInformationResponse> idListToProject(@Param("idList") List<String> idList);


}

