package com.jeeplus.test.program.configuration.projectList.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.test.program.configuration.projectList.domain.ProgramProjectListInfo;
import com.jeeplus.test.program.configuration.projectList.service.dto.ContractDto;
import com.jeeplus.test.program.configuration.projectList.service.dto.ExportFileDto;
import com.jeeplus.test.workContract.domain.WorkContractInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProjectListMapper extends BaseMapper<ProgramProjectListInfo> {

    IPage<WorkContractInfo> findContractPageList(Page<WorkContractInfo> page, @Param("dto") ContractDto dto);

    void updateStatusById(@Param("id")String id, @Param("status")String status);

    IPage<ProgramProjectListInfo> findPageList(Page<ProgramProjectListInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper);

    List<ProgramProjectListInfo> findInfoList(@Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper);

    List<ExportFileDto> findList(@Param("infoList")List<ProgramProjectListInfo> infoList);

    IPage<ProgramProjectListInfo> findPage(Page<ProgramProjectListInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramProjectListInfo> wrapper);

    String selectInvoiceFlag(@Param("id") String id);

    ProgramProjectListInfo getById(@Param("id")String id);
}
