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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.supply.purchase.domain.bo.DrpInquiry;
import com.bonus.canteen.core.supply.purchase.domain.param.DrpInquiryPageDTO;
import com.bonus.canteen.core.supply.purchase.domain.vo.DrpInquiryPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface DrpPurchaseInquiryMapper extends BaseMapper<DrpInquiry> {
   @Update({"update drp_inquiry A set A.del_flag = #{delFlag} where A.inquiry_id = #{inquiryId}"})
   void deleteByInquiryId(@Param("inquiryId") String inquiryId, @Param("delFlag") Integer delFlag);

   List<DrpInquiryPageVO> selectAllList( @Param("content") DrpInquiryPageDTO content);

   @Update({"update drp_inquiry A set A.status = #{status} where A.inquiry_id = #{inquiryId}"})
   void cancelInquiry(@Param("inquiryId") String inquiryId, @Param("status") Integer status);

}
