package com.bonus.canteen.core.supply.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonus.canteen.core.supply.domain.DrpSupplierQualification;
import com.bonus.canteen.core.supply.dto.DrpSupplierQualificationExpireVO;
import com.bonus.canteen.core.supply.dto.DrpSupplierQualificationPageDTO;
import com.bonus.canteen.core.supply.vo.DrpSupplierQualificationPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DrpSupplierQualificationMapper extends BaseMapper<DrpSupplierQualification> {
   @Select({"select id,qualification_num,qualification_name,validity,img_url,supplier_id,main_flag,del_flag,crtime,crby,uptime,upby,cert_id from drp_supplier_qualification ${ew.customSqlSegment} order by main_flag"})
   List<DrpSupplierQualificationPageVO> pageSupplierQualification(@Param("ew") LambdaQueryWrapper<DrpSupplierQualification> queryWrapper);

   List<DrpSupplierQualificationExpireVO> expire( @Param("content") DrpSupplierQualificationPageDTO content);
}
