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

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonus.canteen.core.supply.purchase.domain.bo.DrpPurNotice;
import com.bonus.canteen.core.supply.purchase.domain.vo.DrpPurNoticePageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface DrpPurchasePurNoticeMapper extends BaseMapper<DrpPurNotice> {
   @Select({"select dpn.notice_id,dpn.plan_id,dpn.supplier_single_id,dpn.supplier_id,ds.supplier_name,dpn.notice_time,dpn.notice_status,dpn.error_reason,dpn.notice_type,dpn.notice_process,dpn.notice_style,dpn.create_by from drp_pur_notice dpn LEFT JOIN drp_supplier ds on ds.supplier_id = dpn.supplier_id ${ew.customSqlSegment} order by notice_time desc"})
   Page<DrpPurNoticePageVO> pagePurNotice(Page<DrpPurNoticePageVO> resultPage, @Param("ew") QueryWrapper<DrpPurNotice> queryWrapper);
}
